https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282995
Bug ID: 282995 Summary: mountd doesn't limit export with -alldirs Product: Base System Version: 14.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: b...@freebsd.org Reporter: m...@jellydonut.org Found this while testing some NFS export operations, initially reported https://lists.freebsd.org/archives/freebsd-stable/2024-November/002531.html mountd doesn't limit exports to a filesystem mountpoint when -alldirs is enabled. Per exports(5): EXAMPLES ... /cdrom -alldirs,quiet,ro -network 192.168.33.0 -mask 255.255.255.0 ... The file system rooted at /cdrom will be exported read-only to the entire network 192.168.33.0/24, including all its subdirectories. Since /cdrom is the conventional mountpoint for a CD-ROM device, this export will fail if no CD-ROM medium is currently mounted there since that line would then attempt to export a subdirectory of the root file system with the -alldirs option which is not allowed. The -quiet option will then suppress the error message for this condition that would normally be syslogged. As soon as an actual CD-ROM is going to be mounted, mount(8) will notify mountd(8) about this situation, and the /cdrom file system will be exported as intended. Note that without using the -alldirs option, the export would always succeed. While there is no CD-ROM medium mounted under /cdrom, it would export the (normally empty) directory /cdrom of the root file system instead. mountd is currnetly not working as indicated. If /cdrom is exported via mountd and is not at the time a filesystem mount-point, the root filesystem (/) is exported instead with the mountd warning: Nov 20 22:34:56 zfstest1 mountd[27724]: Warning: exporting /cdrom exports entire / file system More details provided via the lists link above -- You are receiving this mail because: You are the assignee for the bug.