[Bug 115361] [zfs] "zfs get setuid" doesn't reflect setuid state as set by "zfs mount"

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 20 16:34:20 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=115361

--- Comment #9 from Alan Somers <asomers at FreeBSD.org> ---
To restate the bug:

"zfs mount -o update,setuid <FILESYSTEM>" works, but "zfs get setuid
<FILESYSTEM>" doesn't reflect the new state of the mount option.  Steps to
reproduce:

$ sudo zpool create foo da1
$ sudo zfs create foo/fs
$ sudo cp -a /sbin/ping /foo/fs
$ zfs get setuid foo/fs
NAME    PROPERTY  VALUE   SOURCE
foo/fs  setuid    on      default
$ mount | grep foo.fs
foo/fs on /foo/fs (zfs, local, nfsv4acls)
$ /foo/fs/ping -c 1 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=55 time=3.419 ms

--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 3.419/3.419/3.419/0.000 ms
$ sudo zfs mount -o update,nosetuid foo/fs
$ mount | grep foo.fs
foo/fs on /foo/fs (zfs, local, nosuid, nfsv4acls)
# XXX "zfs get" will return the wrong value
$ zfs get setuid foo/fs
NAME    PROPERTY  VALUE   SOURCE
foo/fs  setuid    on      default
$ /foo/fs/ping -c 1 8.8.8.8
ping: ssend socket: Operation not permitted

In the above transcript, the output of "mount" matches what is expected, as
does the behavior of ping (which requires setuid to run).  Only the output of
"zfs get" is wrong.

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


More information about the freebsd-fs mailing list