[Bug 260894] Nonexportable file systems are usable over NFSv4

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 02 Jan 2022 23:54:00 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260894

            Bug ID: 260894
           Summary: Nonexportable file systems are usable over NFSv4
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

If I arrange for VFS_MOUNT to return EINVAL when MNT_EXPORT is set, add its
entry to /etc/fstab, and run "service mountd onereload", then the following
happens:

* mountd logs "can't export /mnt" to /var/log/messages.
* `showmount -e` does not list the file system.
* If I try to mount it from a client with NFS3, it always returns ESTALE.

However, I can still mount it from a client with NFS v4.2, and successfully
browse it.  This seems like a bug.  I would expect that mounting such a file
system with NFS v4.2 would work similarly to mounting a non-exported file
system: the mount would appear to succeed, but then `ls` would only show an
empty directory.

-- 
You are receiving this mail because:
You are the assignee for the bug.