Subject: kern/32286: exporting more than one directory to the world in one filesystems failed
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Wolfgang Stukenbrock <Wolfgang.Stukenbrock@nagler-company.com>
List: netbsd-bugs
Date: 12/12/2005 14:40:00
>Number:         32286
>Category:       kern
>Synopsis:       exporting more than one directory to the world in one filesystems failed
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 12 14:40:00 +0000 2005
>Originator:     Wolfgang Stukenbrock
>Release:        NetBSD 2.1
>Organization:
Dr. Nagler & Company GmbH
>Environment:
	
	
System: NetBSD s012 2.1 NetBSD 2.1 (NSW-S012) #10: Mon Dec 12 12:03:54 CET 2005 wgstuken@s011:/export/netbsd-2.1/usr/src/sys/arch/i386/compile/NSW-S012 i386
Architecture: i386
Machine: i386
>Description:
	NetBSD 2.1 fails to export more than one direcotry of a filesystem to the world.
	The problems seems to be the "default" network entry added by mountd to the directories.
	The problem will only happen while exporting to the world. (syslog message see next section below)
	
	The failing call in mountd is the call to mount() that will return EPERM while adding the "default" network entry.
>How-To-Repeat:
	Setup an export file linke the follwoing:

#
# export the sources of netbsd to the whole world - they are not secret
#
/export/NetBSD-2.1/src  -ro
/export/NetBSD-2.1/xsrc -ro

END OF EXPORTFILE
	
	Than try to export it. You will get the message:
Dec 12 15:22:09 s012 mountd[1955]: "/export/NetBSD-2.1/xsrc -ro", line 10: Can't change attributes for /export/NetBSD-2.1/xsrc to Default: Operation not permitted

	If a third world export is added the problem appears at the two last entries of the export file. It will work only for the first.
>Fix:
	Not known.
	Either there is a problem inside the mount() call or there is a problem with the "default" network entry.
	An export like "/export/NetBSD-2.1/xsrc -ro -network 0.0.0.0/0" will work and may be used as aworkaround for this problem.

>Unformatted: