From owner-freebsd-bugs Tue Dec 23 12:50:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06846 for bugs-outgoing; Tue, 23 Dec 1997 12:50:04 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id MAA06830; Tue, 23 Dec 1997 12:50:00 -0800 (PST) (envelope-from gnats) Date: Tue, 23 Dec 1997 12:50:00 -0800 (PST) Message-Id: <199712232050.MAA06830@hub.freebsd.org> To: freebsd-bugs Cc: From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: kern/5362: mount incorrectly reports / as an NFS export Reply-To: j@uriah.heep.sax.de (J Wunsch) Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk The following reply was made to PR kern/5362; it has been noted by GNATS. 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. ;-)