From owner-freebsd-bugs Tue May 9 7:30: 8 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id CC95F37BE26 for ; Tue, 9 May 2000 07:30:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id HAA43368; Tue, 9 May 2000 07:30:05 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id CDDE337B87F; Tue, 9 May 2000 07:27:17 -0700 (PDT) Message-Id: <20000509142717.CDDE337B87F@hub.freebsd.org> Date: Tue, 9 May 2000 07:27:17 -0700 (PDT) From: jpmg@eng.cam.ac.uk To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/18466: install via nfs or ftp media silently truncates long pathname and hence fails Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 18466 >Category: misc >Synopsis: install via nfs or ftp media silently truncates long pathname and hence fails >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 09 07:30:04 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Patrick Gosling >Release: 4.0-RELEASE >Organization: University of Cambridge, Department of Engineering >Environment: irrelevant - install media selection problem >Description: If installation media is selected as NFS or ftp, and the path to the media is overlong, the installer silently truncates the entered path, and hence fails without a usefully informative error message. If the path (not including ftp:// in the case of ftp) exceeds 64 chars in length as allowed for it in the "char name[DEV_NAME_MAX]" member of the "Device ftpDevice" or "Device nfsDevice" structure (see /usr/src/release/sysinstall/{media.c,sysinstall.h}), this problem will occur. >How-To-Repeat: Try to install freebsd off a mirror such as ftp://ftp.mirror.ac.uk/sites/ftp.freebsd.org/pub/FreeBSD/releases/i386/4.0-RELEASE >Fix: Choices seem to be a) dynamically allocate the ftpDevice.name and nfsDevice.name arrays (I think this is probably a very bad idea) b) at least trap the problem and generate an informative error message (I don't particularly like this) c) up DEV_NAME_MAX to a reasonable value for standards-allowable path lengths. (probably the least offensive change, but could easily have knock-on effects I haven't noticed). A case could be made for _POSIX_PATH_MAX (512 bytes)? >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message