Looks like: vfswrap_fget_nt_acl() has been broken for POSIX ACLs on directories since 4.13. In 4.12 we have: /* can it happen that fsp_name == NULL ? */ if (fsp->is_directory || fsp->fh->fd == -1) { status = posix_get_nt_acl(fsp->conn, fsp->fsp_name, security_info, mem_ctx, ppdesc); TALLOC_FREE(frame); return status; } and posix_get_nt_acl() will add in the default POSIX ACL for directories. But in 4.13 and onwards we have: /* Get the ACL from the fd. */ posix_acl = SMB_VFS_SYS_ACL_GET_FD(fsp, frame); which never returns the default POSIX ACL for directories. Seems like no one noticed. Have a patch, need a bugnumber.
Created attachment 16608 [details] git-am fix for master.
Hmmm. fake_acls module might enable me to test this..
Comment on attachment 16608 [details] git-am fix for master. Lgtm, feel free to push.
https://gitlab.com/samba-team/samba/-/merge_requests/1967
Created attachment 16613 [details] git-am fix for master. Hi Ralph, turns out it wasn't too hard to add a regression test, so I did. Core of the patch hasn't changed, just an additional torture test before, and removal of the knownfail.d/ in the patch. MR: is https://gitlab.com/samba-team/samba/-/merge_requests/1967
This bug was referenced in samba master: 544289b54bbf85098f4cc354f655290600c7f5ba b7f62e13933da14c381f70cd46ad13849b108e68
Created attachment 16619 [details] git-am fix for 4.14.next, 4.13.next. This is only the cherry-pick of the code fix from master, backporting the test is too messy. So long as we have the test in master we should be good.
Re-assigning to Karolin for inclusion in 4.14.next, 4.13.next.
(In reply to Jeremy Allison from comment #9) Pushed to autobuild-v4-{14,13}-test.
This bug was referenced in samba v4-14-test: 42726c3f665516a22006e2c6af8367ab377e15c4
This bug was referenced in samba v4-13-test: abcddbae481034e35da7062e46ac86bc1c0b37d1
Pushed to both branches. Closing out bug report. Thanks!
This bug was referenced in samba v4-14-stable (Release samba-4.14.5): 42726c3f665516a22006e2c6af8367ab377e15c4
This bug was referenced in samba v4-13-stable (Release samba-4.13.10): abcddbae481034e35da7062e46ac86bc1c0b37d1