From akm@marty.sneaker.net.au Mon Dec 22 06:54:53 1997 Received: from marty.sneaker.net.au (root@marty.sneaker.net.au [203.30.3.4]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id GAA26661 for ; Mon, 22 Dec 1997 06:54:50 -0800 (PST) (envelope-from akm@marty.sneaker.net.au) Received: (from root@localhost) by marty.sneaker.net.au (8.8.7/8.8.5) id BAA01511; Tue, 23 Dec 1997 01:56:23 +1100 (EST) Message-Id: <199712221456.BAA01511@marty.sneaker.net.au> Date: Tue, 23 Dec 1997 01:56:23 +1100 (EST) From: akm@sneaker.net.au Reply-To: akm@sneaker.net.au To: FreeBSD-gnats-submit@freebsd.org Subject: mount incorrectly reports / as an NFS export X-Send-Pr-Version: 3.2 >Number: 5362 >Category: kern >Synopsis: [mount] mount incorrectly reports / as an NFS export >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 22 07:00:01 PST 1997 >Closed-Date: Fri Apr 14 17:46:13 GMT 2006 >Last-Modified: Fri Apr 14 17:46:13 GMT 2006 >Originator: Andrew Milton >Release: FreeBSD 3.0-971006-SNAP i386 >Organization: Sneaker Net >Environment: P133 (also on P233MMX) Adaptec PCI 2940 Ultra Fast Wide Busmaster Adapter 48 Mb RAM 3 x 2.1 IBM Ultra Fast Wide disks. 1 x NEC 3x Speed SCSI CDROM >Description: mount incorrectly reports / as being NFS exported when /cdrom is present in /exports but has not yet been mounted. This tends to scare people until they realise what has gone wrong :-) NFS mounting / is not possible. after mounting /cdrom mount reports correct results. after umounting /cdrom, mount reports correct results from that point forward. >How-To-Repeat: I have this in my /etc/exports: /export/ftp/FreeBSD/3.0-971006-SNAP /cdrom -alldirs -mapall=nobody I am also sharing /cdrom, and /export/dos, and /home/* via samba root@marty~# mount /dev/sd0a on / (NFS exported, local) /dev/sd2s1e on /export (NFS exported, local) /dev/sd1s1e on /home (local) /dev/sd0s1f on /usr (local) /dev/sd0s1e on /var (local) procfs on /proc (local) root@marty~# mount /cdrom root@marty~# mount /dev/sd0a on / (local) /dev/sd2s1e on /export (NFS exported, local) /dev/sd1s1e on /home (local) /dev/sd0s1f on /usr (local) /dev/sd0s1e on /var (local) procfs on /proc (local) /dev/cd0a on /cdrom (NFS exported, local, read-only) root@marty~# umount /cdrom root@marty~# mount /dev/sd0a on / (local) /dev/sd2s1e on /export (NFS exported, local) /dev/sd1s1e on /home (local) /dev/sd0s1f on /usr (local) /dev/sd0s1e on /var (local) procfs on /proc (local) >Fix: Unknown. >Release-Note: >Audit-Trail: From: j@uriah.heep.sax.de (J Wunsch) To: freebsd-gnats-submit@freebsd.org Cc: akm@sneaker.net.au Subject: Re: kern/5362: mount incorrectly reports / as an NFS export Date: Tue, 23 Dec 1997 21:29:23 +0100 (MET) akm@sneaker.net.au wrote: > mount incorrectly reports / as being NFS exported when /cdrom is > present in /exports but has not yet been mounted. This tends to scare > people until they realise what has gone wrong :-) ....but it is technically absolutely correct. Look, you've mentioned /cdrom in your exports file, and by the time you look at the actual state of the filesystem, this means you have exported your root filesystem, with the restriction that only /cdrom (which is part of the root filesystem) is allowed to be mounted. Anyone is free to NFS-mount this (hopefully empty) directory. Another incarnation of this same problem (with a more annoying error message) occurs if you export something else that's in your root filesystem earlier in the same exports file. With /cdrom not being mounted yet, this means you've got two lines referring to the root filesystem, which is an error. Maybe this can be changed by a new flag for export(5), something that specifies that a particular entry is only meant to be exported in case it's the root of a mounted filesystem. -- 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. ;-) Responsible-Changed-From-To: freebsd-bugs->peter Responsible-Changed-By: peter Responsible-Changed-When: Sat Apr 25 22:30:12 PDT 1998 Responsible-Changed-Why: I'll see if I can tidy this up so that it's a little less suprising.. Responsible-Changed-From-To: peter->freebsd-bugs Responsible-Changed-By: peter Responsible-Changed-When: Mon Mar 29 11:19:19 PST 2004 Responsible-Changed-Why: This PR is about a feature of our mount system that isn't clearly explaned enough. Return it to the pool, its obvious I've been neglecting it for a while. http://www.freebsd.org/cgi/query-pr.cgi?pr=5362 State-Changed-From-To: open->closed State-Changed-By: maxim State-Changed-When: Fri Apr 14 17:45:23 UTC 2006 State-Changed-Why: It seems for me the issue was fixed in HEAD and RELENG_6 at least. http://www.freebsd.org/cgi/query-pr.cgi?pr=5362 >Unformatted: