Subject: bin/2242: mountd: -alldirs no longer works properly
To: None <gnats-bugs@NetBSD.ORG>
From: Jason Downs <downsj@teeny.org>
List: netbsd-bugs
Date: 03/20/1996 18:11:40
>Number:         2242
>Category:       bin
>Synopsis:       mountd no longer supports -alldirs properly
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 20 21:35:01 1996
>Last-Modified:
>Originator:     Jason Downs
>Organization:
Jason Downs
downsj@teeny.org  --> teeny.org: Free Software for a Free Internet <--
http://www.teeny.org/

			  Big Brother... Just say No.
	      No to unlimited wiretaps.  No to enforced `decency'.
>Release:        NetBSD-current 3/18/96
>Environment:
System: NetBSD threadway 1.1A NetBSD 1.1A (THREADWAY) #10: Tue Mar 12 18:51:11 PST 1996 downsj@threadway:/usr/src/sys/arch/i386/compile/THREADWAY i386


>Description:
	mountd(8) no longer properly supports the -alldirs exports option,
	making it difficult to set up diskless machines.

	-alldirs seems to only be supported if you're exporting the 
	physical mount point; exporting a directory that isn't the physical
	mount point with -alldirs results in:

	Mar 20 00:47:38 threadway mountd[64]: Could not remount /misc/hp300/system: Invalid argument
	Mar 20 00:47:38 threadway mountd[64]: Bad exports list line /misc/hp300/system -alldirs -maproot

>How-To-Repeat:
	Attempt to set up a diskless client.
>Fix:
	There's a silly bit of code I can't figure out a reason for.
	Commenting it out works around the problem.

*** orig/mountd.c	Wed Mar 20 18:10:56 1996
--- mountd.c	Wed Mar 20 00:53:50 1996
***************
*** 1603,1613 ****
--- 1603,1615 ----
  				   "Can't change attributes for %s.\n", dirp);
  				return (1);
  			}
+ 			/*
  			if (opt_flags & OP_ALLDIRS) {
  				syslog(LOG_ERR, "Could not remount %s: %m",
  					dirp);
  				return (1);
  			}
+ 			*/
  			/* back up over the last component */
  			while (*cp == '/' && cp > dirp)
  				cp--;
>Audit-Trail:
>Unformatted: