From alainb@freegate.gna.org  Mon Sep  1 16:45:58 1997
Received: from ns.afp.com (ns2.afp.com [158.50.204.4])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA26757
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 1 Sep 1997 16:45:56 -0700 (PDT)
Received: from perrier.par.afp.com (perrier.par.afp.com [158.50.140.56])
	by ns.afp.com (8.8.6/8.8.5) with ESMTP id CAA07104
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 2 Sep 1997 02:44:54 +0200 (METDST)
Received: (from uucp@localhost)
	by perrier.par.afp.com (8.8.5/8.8.5) with UUCP id BAA15134
	for FreeBSD-gnats-submit@freebsd.org; Tue, 2 Sep 1997 01:41:29 +0200
Received: (from alainb@localhost)
	by freegate.gna.org (8.8.7/8.8.7) id BAA01469;
	Tue, 2 Sep 1997 01:33:15 +0200 (CEST)
Message-Id: <199709012333.BAA01469@freegate.gna.org>
Date: Tue, 2 Sep 1997 01:33:15 +0200 (CEST)
From: Alain Brauner <alainb@freegate.gna.org>
Reply-To: alainb@freegate.gna.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: Pb with -alldirs options in /etc/exports.
X-Send-Pr-Version: 3.2

>Number:         4448
>Category:       bin
>Synopsis:       mountd doesn't export a directory with -alldirs options.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep  1 16:50:01 PDT 1997
>Closed-Date:    Mon Sep 8 00:39:03 MEST 1997
>Last-Modified:  Mon Sep  8 00:39:31 MEST 1997
>Originator:     Alain Brauner
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
Private user
>Environment:

	I am using FreeBSD 2.2-STABLE ( just cvsupped ) in order to boot
	a diskless SUN Sparc IPX for NetBSD installation.
	So I need to export a SWAP space with the -alldirs options
	and the -r option of mountd.

>Description:

	When the -alldirs options is set, mountd -r cannot export the
	directory.
	It syslog: Could not remount "%s" and Bad export list line "%s"  
	Someone has already reported a similar problem when exporting
	an EXT2FS see PR# kern/3879

>How-To-Repeat:

	Just put /home -alldirs in your /etc/exports file for example
	and issue a killall -HUP mountd

>Fix:
	
	I made a Quick and Dirty Kludge (QDK), I simply remove the test in 
	mountd.c producing the error message and return(1) ...

	And i was able to boot & swap diskless and install NetBSD.

	NOTE: -alldirs just work as expected in my brand new NetBSD :-)

	Thank's again & again for your wonderfull work !
	

>Release-Note:
>Audit-Trail:

From: j@uriah.heep.sax.de (J Wunsch)
To: alainb@freegate.gna.org
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/4448: Pb with -alldirs options in /etc/exports.
Date: Sun, 7 Sep 1997 08:51:29 +0200

 As Alain Brauner wrote:
 
 > >Description:
 > 
 > 	When the -alldirs options is set, mountd -r cannot export the
 > 	directory.
 
 I cannot reproduce this.  -alldirs works as expected for me, with or
 withouth -r on mountd.
 
 > 	It syslog: Could not remount "%s" and Bad export list line "%s"
 
 This looks like an error in your /etc/exports file.  Please send us
 this file, plus the output of /sbin/mount.
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)
State-Changed-From-To: open->feedback 
State-Changed-By: joerg 
State-Changed-When: Sun Sep 7 12:03:53 MEST 1997 
State-Changed-Why:  

(see my mail) 

From: Alain Brauner <alainb@freegate.gna.org>
To: Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/4448: Pb with -alldirs options in /etc/exports.
Date: Sun, 7 Sep 1997 16:40:05 +0200 (CEST)

 On Sun, 7 Sep 1997, J Wunsch wrote:
 
 > As Alain Brauner wrote:
 > 
 > > >Description:
 > > 
 > > 	When the -alldirs options is set, mountd -r cannot export the
 > > 	directory.
 > 
 > I cannot reproduce this.  -alldirs works as expected for me, with or
 > withouth -r on mountd.
 > 
 > > 	It syslog: Could not remount "%s" and Bad export list line "%s"
 > 
 > This looks like an error in your /etc/exports file.  Please send us
 > this file, plus the output of /sbin/mount.
 > 
 
 Thank's for you reply.
 
 Ok, so i need to figure out what's wrong with my config.
 
 Here are some details:
 
 This system was installed from the 2.2.2-RELEASE CDROM and fully updated
 via cvsup to 2.2-STABLE ( tag=RELENG_2_2 ) from cvsup.FreeBSD.org.
 
 Last make world was done the 08/30/1997 in single user mode.
 
 I have a single big root fs on one scsi disk.
 
 I made an /export directory containing the root hierarchy of a
 NetBSD(SPARC) binaries and a SWAPFILE in order to install a Sun
 workstation via diskless boot.
 So i need the -alldirs and the -r option of mountd.
 
 /kernel and /etc/rc.conf are properly configured for use with NFS etc ...
 
 Here is the /etc/exports i use for this:
 
 /export		-alldirs	-root=0
 
 Here is the /etc/bootparams used:
 
 sun	root=freegate:/export/sun/root \
 	swap=freegate:/export/sun/swap/SWAPFILE
 
 Without changing anything mountd -r cannot export anything at boot time.
 
 Syslogd messages are:
 
 Sep 7 15:48:45 freegate mountd[305]: Could not remount /export: Invalid
 argument 
 Sep 7 15:48:45 freegate mountd[305]: Bad exports list line /export
 -alldirs        -root
 
 /sbin/mount just say: 
 
 /dev/sd0a on / (local) 
 procfs on /proc (local)  
 
 I clean, depend, recompile and reinstall all /usr/src/sbin stuff.
 It hasn't change anything for me.
 
 I also purge the /var/db/mountdtab file.
 
 So i dirtyly comment out the mountd portion of code saying Could not
 remount %s
 
 And i was able to complete my installation.
 
 I can just reproduce all this right away.
 
 May be something has going wrong when i update the os ?
 
 I also do a make includes on top of /etc/src to stay in phase with my
 latest cvsup before rebuilding mountd.
 
 NOTE: I did not find any troubles while using the -alldirs option in
 my brand new NetBSD.
 
 So i'am confused ...
 
 Thank's again for your support.
 
 Here is the diff for mountd:
 "$Id: mountd.c,v 1.11.2.7 1997/08/29 19:23:39 guido Exp $"
 
 
 ------------------------ CUT HERE -------------------------
 *** mountd.c.ori	Sun Sep  7 16:00:32 1997
 --- mountd.c	Sun Sep  7 16:02:39 1997
 ***************
 *** 1685,1695 ****
 --- 1685,1697 ----
   				   "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--;
 ------------------------ CUT HERE -------------------------
 
 
 > -- 
 > cheers, J"org
 > 
 > joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 > Never trust an operating system you don't have sources for. ;-)
 > 
 
 --
 FreeBSD:<Live free or die>
 Alain Brauner: alainb@freegate.gna.org
 93200 St DENIS France
 
 
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: joerg 
State-Changed-When: Mon Sep 8 00:39:03 MEST 1997 
State-Changed-Why:  

Alain: 
Ok, i just re-read the manpage, i will review my configuration. 

This pr is to be closed since it's only a local configuration problem. 
>Unformatted:
