I?ve been looking at an issue when compiling Samba on FreeBSD 13 with the vfs_zfsacl module. It seems the logic that detect O_PATH support in Samba doesn?t work right with FreeBSD 13 (since it has implemented O_PATH support) and especially with the acl_get_fd() function. This is a bug (or rather a missing feature) in FreeBSD that there is a patch for now (dunno when it?ll appear in a release version). However, one question that has surfaced is if Samba also requires support to change/set ACLs via O_PATH-opened file descriptors? I?m trying to test things but figured I?d put this here too if someone with more internal knowledge of the Samba VFS O_PATH-related stuff knows :-) https://bugzilla.samba.org/show_bug.cgi?id=15376? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271704? - Peter
On Tue, May 30, 2023 at 09:57:37AM +0200, Peter Eriksson via samba wrote:>I?ve been looking at an issue when compiling Samba on FreeBSD 13 with the vfs_zfsacl module. > >It seems the logic that detect O_PATH support in Samba doesn?t work right with FreeBSD 13 (since it has implemented O_PATH support) and especially with the acl_get_fd() function. This is a bug (or rather a missing feature) in FreeBSD that there is a patch for now (dunno when it?ll appear in a release version). > >However, one question that has surfaced is if Samba also requires support to change/set ACLs via O_PATH-opened file descriptors? I?m trying to test things but figured I?d put this here too if someone with more internal knowledge of the Samba VFS O_PATH-related stuff knows :-) > > >https://bugzilla.samba.org/show_bug.cgi?id=15376? > >https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271704?Samba uses a horrible hack, as far as I know Linux specific, to do this. Once it has a O_PATH fd, it then uses the path based xattr call on the string /proc/<pid>/fd/<fdnum> where fdnum is the O_PATH fd we already opened. This is proven safe.
Hey Andrew, On 5/30/23 09:57, Peter Eriksson via samba wrote:> I?ve been looking at an issue when compiling Samba on FreeBSD 13 with > the vfs_zfsacl module. > > It seems the logic that detect O_PATH support in Samba doesn?t work > right with FreeBSD 13 (since it has implemented O_PATH support) and > especially with the acl_get_fd() function. This is a bug (or rather a > missing feature) in FreeBSD that there is a patch for now (dunno when > it?ll appear in a release version). > > However, one question that has surfaced is if Samba also requires > support to change/set ACLs via O_PATH-opened file descriptors? I?m > trying to test things but figured I?d put this here too if someone > with more internal knowledge of the Samba VFS O_PATH-related stuff > knows :-) > > > https://bugzilla.samba.org/show_bug.cgi?id=15376 > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271704are you aware of this? -slow -- Ralph Boehme, Samba Team https://samba.org/ SerNet Samba Team Lead https://sernet.de/en/team-samba SAMBA+ Samba packages https://samba.plus/ -------------- next part -------------- A non-text attachment was scrubbed... Name: OpenPGP_signature Type: application/pgp-signature Size: 840 bytes Desc: OpenPGP digital signature URL: <http://lists.samba.org/pipermail/samba/attachments/20230531/8a4ce446/OpenPGP_signature.sig>