From nobody@FreeBSD.ORG  Tue May  9 07:27:17 2000
Return-Path: <nobody@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
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: install via nfs or ftp media silently truncates long pathname and hence fails
X-Send-Pr-Version: www-1.0

>Number:         18466
>Category:       bin
>Synopsis:       [sysinstall] install via nfs or ftp media silently truncates long pathname and hence fails
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-qa
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue May 09 07:30:04 PDT 2000
>Closed-Date:    Mon Mar 21 06:29:03 GMT 2005
>Last-Modified:  Mon Mar 21 06:29:03 GMT 2005
>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:
Responsible-Changed-From-To: freebsd-bugs->dillon 
Responsible-Changed-By: dillon 
Responsible-Changed-When: Sun May 14 11:09:08 PDT 2000 
Responsible-Changed-Why:  
Assigned to dillon.  tentitive patch under review by Jordan 
Responsible-Changed-From-To: dillon->freebsd-bugs 
Responsible-Changed-By: keramida 
Responsible-Changed-When: Sat Feb 22 18:15:05 PST 2003 
Responsible-Changed-Why:  
Back to the free pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18466 
Responsible-Changed-From-To: freebsd-bugs->jwd 
Responsible-Changed-By: jwd 
Responsible-Changed-When: Wed Feb 26 19:38:31 PST 2003 
Responsible-Changed-Why:  
Take ownership, have tested patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18466 
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Thu Jul 22 06:39:43 GMT 2004 
State-Changed-Why:  
Is this still a problem with modern versions of FreeBSD?  Was the 
patch discussed, ever committed? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18466 
Responsible-Changed-From-To: jwd->freebsd-qa 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Sep 13 06:01:50 GMT 2004 
Responsible-Changed-Why:  
Reassign to QA alias. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18466 

Adding to audit trail from personal email received by linimon:

Date: Thu, 22 Jul 2004 09:11:21 -0400
From: John <jwd@bsdwins.com>

It was applied to current, I need to put it into 4.x

http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/sysinstall/media.c

I sent mail to the submitter, no response. I take care of it.

-John
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Mar 21 06:27:29 GMT 2005 
State-Changed-Why:  
From personal email received, this bug was fixed in 5.x almost two years 
ago.  (I have added this email to the audit trail).  Since there will 
be no more releases on 4.X, put on bugmeister hat and declare this PR 
to be OBE. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18466 
>Unformatted:
