Bug 18466 - [sysinstall] install via nfs or ftp media silently truncates long pathname and hence fails
Summary: [sysinstall] install via nfs or ftp media silently truncates long pathname an...
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-qa (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-05-09 15:30 UTC by jpmg
Modified: 2005-03-21 06:29 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jpmg 2000-05-09 15:30:04 UTC
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.

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)?
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
Comment 1 Matt Dillon freebsd_committer freebsd_triage 2000-05-14 19:09:08 UTC
Responsible Changed
From-To: freebsd-bugs->dillon

Assigned to dillon.  tentitive patch under review by Jordan 
Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2003-02-23 02:15:05 UTC
Responsible Changed
From-To: dillon->freebsd-bugs

Back to the free pool.
Comment 3 John W. De Boskey freebsd_committer freebsd_triage 2003-02-27 03:38:31 UTC
Responsible Changed
From-To: freebsd-bugs->jwd

Take ownership, have tested patch
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2004-07-22 07:39:43 UTC
State Changed
From-To: open->feedback

Is this still a problem with modern versions of FreeBSD?  Was the 
patch discussed, ever committed?
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2004-09-13 07:01:50 UTC
Responsible Changed
From-To: jwd->freebsd-qa

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
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2005-03-21 06:27:29 UTC
State Changed
From-To: feedback->closed

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.