Tested with Samba 4.17.12 (but same code in 4.21). When using "vfs objects = acl_tdb" it is not possible to remove files or irectories in share. The log always shows "rmdir_internals: couldn't remove .... : No such file or directory" The cause is in file source3/modules/vfs_acl_tdb.c in function unlinkat_acl_tdb() The call "vfs_stat(handle->conn, smb_fname_tmp);" does a stat with the filename only, without the full path. It always fails! Removing this stat call and let the rest of the code do its job, all works.
Created attachment 18540 [details] patch Do you have the chance to test the attached patch?
The patch does not work. The call to full_path_from_dirfsp_atname() creates just the relative path for the share. But vfs_stat() obviously needs the full path. I just removed the call to vfs_stat() and removal is possible then. But I found another problem. Removing a directory works fine then, but removing a file causes an error. The file is removed, but a "no such file or directory" is returned anyway. And samba crashes with panic. In the log it shows: dbwrap_lock_order_lock: Lock order violation: Trying /var/lib/samba/file_ntacls.tdb at 1 while /run/samba/locking.tdb at 1 is locked
I just changed the Importance to "Critical", because in this status the vfs_acl_tdb is not usable.
Created attachment 18586 [details] Patch Next try. The stat call is required to remove the right acl from the tdb.
(In reply to Volker Lendecke from comment #4) This looks really promising. All errors are gone on the first check. But I will do more tests. Thank you!
(In reply to armin from comment #5) No more errors found. Patch works here. Thank you!
https://gitlab.com/samba-team/samba/-/merge_requests/4000
This bug was referenced in samba master: 93bc238aa91ec8041648d17e11bf235132974eda 93a6d36239dd2ce2b3863945f8b9b59cb6aa911a
Created attachment 18622 [details] Patch cherry-picked from master builds in both 4.21 and 4.22
Reassigning to Jule for inclusion in 4.21 and 4.22.
Pushed to autobuild-v4-{22,21}-test.
This bug was referenced in samba v4-21-test: fbd038e3db901b1fcffd9947afb4a0313696354e 1f9c1dad691db9279c3e450a50952bb8fc0e4590
This bug was referenced in samba v4-22-test: 34a2e467259cad93b12caaf2b7a4dbfa68f68929 d731cc875f2f14b9410141f983d993069bcd8f18
This bug was referenced in samba v4-21-stable (Release samba-4.21.5): fbd038e3db901b1fcffd9947afb4a0313696354e 1f9c1dad691db9279c3e450a50952bb8fc0e4590
Closing out bug report. Thanks!
This bug was referenced in samba v4-22-stable (Release samba-4.22.1): 34a2e467259cad93b12caaf2b7a4dbfa68f68929 d731cc875f2f14b9410141f983d993069bcd8f18