Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  9 May 2000 07:27:17 -0700 (PDT)
From:      jpmg@eng.cam.ac.uk
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/18466: install via nfs or ftp media silently truncates long pathname and hence fails
Message-ID:  <20000509142717.CDDE337B87F@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000509142717.CDDE337B87F>