From root@blackfire.com  Tue Jan 14 09:34:55 1997
Received: from blackfire.com (hill153.uwyo.edu [129.72.150.153])
          by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id JAA24876
          for <FreeBSD-gnats-submit@freebsd.org>; Tue, 14 Jan 1997 09:34:46 -0800 (PST)
Received: (qmail 633 invoked by uid 0); 14 Jan 1997 17:35:53 -0000
Message-Id: <19970114173553.632.qmail@blackfire.com>
Date: 14 Jan 1997 17:35:53 -0000
From: root@blackfire.com
Reply-To: root@blackfire.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: mountd does not like any lines but the first one (/etc/exports)
X-Send-Pr-Version: 3.2

>Number:         2495
>Category:       bin
>Synopsis:       mountd does not like any lines in /etc/exports except 1st one
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 14 09:40:01 PST 1997
>Closed-Date:    Tue Jan 14 11:27:51 PST 1997
>Last-Modified:  Tue Jan 14 11:50:01 PST 1997
>Originator:     System Administrator
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>Environment:

	FreeBSD 3.0-CURRENT, running on a dual-homed host, exporting several
	drives to one host.

	Client is running FreeBSD 2.1.6-RELEASE.

>Description:

	This prvents me from being able to mount any directories except first
	one.

>How-To-Repeat:

	Use the following /etc/exports:
/usr/home	-maproot=0	ai
/usr/local/bin	-maproot=0	ai
/usr/local/etc	-maproot=0	ai
/usr/local/sbin	-maproot=0	ai

Directories can be individually removed, ANY of the above works if it is the
FIRST entry.  The '-maproot=0' can be removed with no effect on 2-4 lines.

Client gives access denied errors.  If mountd is compiled from FreeBSD-current
source, with the DEBUG define, it gives the following output:
(I have put a star before each line that appears in the logs when compiled
without DEBUG)

bash# ./mountd
Getting export list.
Got line /usr/home		-maproot=0		ai
Making new ep fs=0x20015,0x1
doing opt -maproot=0		ai
got host ai
Got line /usr/local/bin		-maproot=0		ai
Found ep fs=0x20015,0x1
doing opt -maproot=0		ai
got host ai
* Can't change attributes for /usr/local/bin.
Bad exports list line /usr/local/bin		-maprootGot line /usr/local/etc		-maproot=0		ai
Found ep fs=0x20015,0x1
doing opt -maproot=0		ai
got host ai
* Can't change attributes for /usr/local/etc.
Bad exports list line /usr/local/etc		-maprootGot line /usr/local/sbin		-maproot=0		ai
Found ep fs=0x20015,0x1
doing opt -maproot=0		ai
got host ai
* Can't change attributes for /usr/local/sbin.
Bad exports list line /usr/local/sbin		-maprootGetting mount list.
Here we go.

At this point, it talks to the first directory only...

>Fix:
	
	None known.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wollman 
State-Changed-When: Tue Jan 14 11:27:51 PST 1997 
State-Changed-Why:  
You can only have one set of export controls for each filesystem. 
If this is not documented, then feel free t osend in a doc-bug PR. 

From: John-Mark Gurney <jmg@nike.efn.org>
To: root@blackfire.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG,
        GNATS Management <gnats@freefall.freebsd.org>,
        freebsd-bugs@freefall.freebsd.org
Subject: Re: bin/2495: mountd does not like any lines but the first one (/etc/exports)
Date: Tue, 14 Jan 1997 11:40:58 -0800 (PST)

 On 14 Jan 1997 root@blackfire.com wrote:
 
 > >Synopsis:       mountd does not like any lines in /etc/exports except 1st one
 
 [...]
 
 > 	This prvents me from being able to mount any directories except first
 > 	one.
 > 
 > >How-To-Repeat:
 > 
 > 	Use the following /etc/exports:
 > /usr/home	-maproot=0	ai
 > /usr/local/bin	-maproot=0	ai
 > /usr/local/etc	-maproot=0	ai
 > /usr/local/sbin	-maproot=0	ai
 > 
 > Directories can be individually removed, ANY of the above works if it is the
 > FIRST entry.  The '-maproot=0' can be removed with no effect on 2-4 lines.
 > 
 > Client gives access denied errors.  If mountd is compiled from FreeBSD-current
 > source, with the DEBUG define, it gives the following output:
 > (I have put a star before each line that appears in the logs when compiled
 > without DEBUG)
 
 I hate to say it but read the mn page for mountd...  you will notice that
 you can only have ONE line that modifies a file system for a host...
 i.e..  to fix about have your /etc/exports like:
 /usr/home /usr/local/bin /usr/local/etc /usr/local/sbin -maproot=0 ai
 
 basicly...  I usually recommend using just one line per host... unless you
 want the permissions for all hosts...  also note...  say you have
 something like this:
 
 /usr/home systema
 /usr/anon/ftp
 
 this will export ONLY /usr/home to systema, but to everyone else can
 access /usr/anon/ftp...  this is a limitation of mountd/nfs (I'm not sure
 exactly were the limitation is)...
 
 hope this helps...
 
 John-Mark
 
 gurney_j@efn.org
 http://resnet.uoregon.edu/~gurney_j/
 Modem/FAX: (541) 683-6954   (FreeBSD Box)
 
 Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)
 
 
>Unformatted:
