As the NFSv4 ACL mapping code doesn't map write directory into the DELETE_CHILD permission bit (which we require before allowing a delete) no one can delete files without an explicit DELETE_CHILD bit set on the directory. Reported by Jens Elkner <jel+iws@iws.cs.uni-magdeburg.de>
Created attachment 3948 [details] Patch for 3.3.x.
Fixed in all branches 3.2.x and above. Jeremy.
This bugfix has put a fix for a ZFS-only idiosyncrasy into the generic NFS4 framework. This is not the right place, it's eg wrong for GPFS and prevents properly managing ACLs from Windows clients. Certain vendors carry a patch that reverts this change... Will post a fix that moves the change to ZFS-only.
Some notes as to why ZFS rightly needs this special handling: https://forums.freenas.org/index.php?threads/windows-ad-share-permission.54764/ https://lists.freebsd.org/pipermail/svn-src-head/2016-June/088709.html https://bugs.freenas.org/issues/24130
Created attachment 13638 [details] Patch for 4.6 and 4.7 cherry-picked from master
Re-assigning to Karolin for inclusion in 4.7.next, 4.6.next.
(In reply to Jeremy Allison from comment #6) Pushed to autobuild-v4-{7,6}-test.
Created attachment 13735 [details] Possible patch for master
compiled with latest patch 2017-10-28 14:16 UTC, on freebsd 11.1 and samba 4.6.9. compile error is resolved but samba usage is impossible for me. when i try to connect with windows 10 client is get this in log: Oct 28 20:37:15 giganas smbd[6174]: [2017/10/28 20:37:15.207829, 2] ../source3/smbd/process.c:2876(deadtime_fn) Oct 28 20:37:15 giganas smbd[6174]: Closing idle connection Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.162592, 0] ../lib/util/fault.c:78(fault_report) Oct 28 20:37:16 giganas smbd[6265]: =============================================================== Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.163103, 0] ../lib/util/fault.c:79(fault_report) Oct 28 20:37:16 giganas smbd[6265]: INTERNAL ERROR: Signal 11 in pid 6265 (4.6.9) Oct 28 20:37:16 giganas smbd[6265]: Please read the Trouble-Shooting section of the Samba HOWTO Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.163362, 0] ../lib/util/fault.c:81(fault_report) Oct 28 20:37:16 giganas smbd[6265]: =============================================================== Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.163535, 0] ../source3/lib/util.c:791(smb_panic_s3) Oct 28 20:37:16 giganas smbd[6265]: PANIC (pid 6265): internal error Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.179301, 0] ../source3/lib/util.c:902(log_stack_trace) Oct 28 20:37:16 giganas smbd[6265]: BACKTRACE: 7 stack frames: Oct 28 20:37:16 giganas smbd[6265]: #0 0x8046bec5e <log_stack_trace+0x1e> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:16 giganas smbd[6265]: #1 0x8046bea58 <smb_panic_s3+0x98> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:16 giganas smbd[6265]: #2 0x80211d4c7 <smb_panic+0x27> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:16 giganas smbd[6265]: #3 0x80211da70 <string_sub_once> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:16 giganas smbd[6265]: #4 0x80211d493 <fault_setup+0x73> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:16 giganas smbd[6265]: #5 0x801cd8926 <pthread_sigmask+0x536> at /lib/libthr.so.3 Oct 28 20:37:16 giganas smbd[6265]: #6 0x801cd7ecf <pthread_getspecific+0xe5f> at /lib/libthr.so.3 Oct 28 20:37:16 giganas smbd[6265]: [2017/10/28 20:37:16.180372, 0] ../source3/lib/dumpcore.c:310(dump_core) Oct 28 20:37:16 giganas smbd[6265]: unable to change to %N.core Oct 28 20:37:16 giganas smbd[6265]: refusing to dump core Oct 28 20:37:16 giganas smbd[6157]: [2017/10/28 20:37:16.208039, 1] ../source3/smbd/server.c:878(remove_child_pid) Oct 28 20:37:16 giganas smbd[6157]: Scheduled cleanup of brl and lock database after unclean shutdown Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.077798, 0] ../lib/util/fault.c:78(fault_report) Oct 28 20:37:17 giganas smbd[6266]: =============================================================== Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.078391, 0] ../lib/util/fault.c:79(fault_report) Oct 28 20:37:17 giganas smbd[6266]: INTERNAL ERROR: Signal 11 in pid 6266 (4.6.9) Oct 28 20:37:17 giganas smbd[6266]: Please read the Trouble-Shooting section of the Samba HOWTO Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.078653, 0] ../lib/util/fault.c:81(fault_report) Oct 28 20:37:17 giganas smbd[6266]: =============================================================== Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.078825, 0] ../source3/lib/util.c:791(smb_panic_s3) Oct 28 20:37:17 giganas smbd[6266]: PANIC (pid 6266): internal error Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.094654, 0] ../source3/lib/util.c:902(log_stack_trace) Oct 28 20:37:17 giganas smbd[6266]: BACKTRACE: 7 stack frames: Oct 28 20:37:17 giganas smbd[6266]: #0 0x8046bec5e <log_stack_trace+0x1e> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:17 giganas smbd[6266]: #1 0x8046bea58 <smb_panic_s3+0x98> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:17 giganas smbd[6266]: #2 0x80211d4c7 <smb_panic+0x27> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:17 giganas smbd[6266]: #3 0x80211da70 <string_sub_once> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:17 giganas smbd[6266]: #4 0x80211d493 <fault_setup+0x73> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:17 giganas smbd[6266]: #5 0x801cd8926 <pthread_sigmask+0x536> at /lib/libthr.so.3 Oct 28 20:37:17 giganas smbd[6266]: #6 0x801cd7ecf <pthread_getspecific+0xe5f> at /lib/libthr.so.3 Oct 28 20:37:17 giganas smbd[6266]: [2017/10/28 20:37:17.095729, 0] ../source3/lib/dumpcore.c:310(dump_core) Oct 28 20:37:17 giganas smbd[6266]: unable to change to %N.core Oct 28 20:37:17 giganas smbd[6266]: refusing to dump core Oct 28 20:37:36 giganas smbd[6161]: [2017/10/28 20:37:36.261808, 1] ../source3/smbd/smbd_cleanupd.c:99(smbd_cleanupd_unlock) Oct 28 20:37:36 giganas smbd[6161]: smbd_cleanupd_unlock: Cleaning up brl and lock database after unclean shutdown Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.986585, 0] ../lib/util/fault.c:78(fault_report) Oct 28 20:37:36 giganas smbd[6285]: =============================================================== Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.986800, 0] ../lib/util/fault.c:79(fault_report) Oct 28 20:37:36 giganas smbd[6285]: INTERNAL ERROR: Signal 11 in pid 6285 (4.6.9) Oct 28 20:37:36 giganas smbd[6285]: Please read the Trouble-Shooting section of the Samba HOWTO Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.986943, 0] ../lib/util/fault.c:81(fault_report) Oct 28 20:37:36 giganas smbd[6285]: =============================================================== Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.987024, 0] ../source3/lib/util.c:791(smb_panic_s3) Oct 28 20:37:36 giganas smbd[6285]: PANIC (pid 6285): internal error Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.994013, 0] ../source3/lib/util.c:902(log_stack_trace) Oct 28 20:37:36 giganas smbd[6285]: BACKTRACE: 7 stack frames: Oct 28 20:37:36 giganas smbd[6285]: #0 0x8046bec5e <log_stack_trace+0x1e> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:36 giganas smbd[6285]: #1 0x8046bea58 <smb_panic_s3+0x98> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:36 giganas smbd[6285]: #2 0x80211d4c7 <smb_panic+0x27> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:36 giganas smbd[6285]: #3 0x80211da70 <string_sub_once> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:36 giganas smbd[6285]: #4 0x80211d493 <fault_setup+0x73> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:36 giganas smbd[6285]: #5 0x801cd8926 <pthread_sigmask+0x536> at /lib/libthr.so.3 Oct 28 20:37:36 giganas smbd[6285]: #6 0x801cd7ecf <pthread_getspecific+0xe5f> at /lib/libthr.so.3 Oct 28 20:37:36 giganas smbd[6285]: [2017/10/28 20:37:36.994478, 0] ../source3/lib/dumpcore.c:310(dump_core) Oct 28 20:37:36 giganas smbd[6285]: unable to change to %N.core Oct 28 20:37:36 giganas smbd[6285]: refusing to dump core Oct 28 20:37:37 giganas smbd[6157]: [2017/10/28 20:37:37.007304, 1] ../source3/smbd/server.c:878(remove_child_pid) Oct 28 20:37:37 giganas smbd[6157]: Scheduled cleanup of brl and lock database after unclean shutdown Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.838639, 0] ../lib/util/fault.c:78(fault_report) Oct 28 20:37:37 giganas smbd[6286]: =============================================================== Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.838760, 0] ../lib/util/fault.c:79(fault_report) Oct 28 20:37:37 giganas smbd[6286]: INTERNAL ERROR: Signal 11 in pid 6286 (4.6.9) Oct 28 20:37:37 giganas smbd[6286]: Please read the Trouble-Shooting section of the Samba HOWTO Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.838819, 0] ../lib/util/fault.c:81(fault_report) Oct 28 20:37:37 giganas smbd[6286]: =============================================================== Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.838859, 0] ../source3/lib/util.c:791(smb_panic_s3) Oct 28 20:37:37 giganas smbd[6286]: PANIC (pid 6286): internal error Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.842688, 0] ../source3/lib/util.c:902(log_stack_trace) Oct 28 20:37:37 giganas smbd[6286]: BACKTRACE: 7 stack frames: Oct 28 20:37:37 giganas smbd[6286]: #0 0x8046bec5e <log_stack_trace+0x1e> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:37 giganas smbd[6286]: #1 0x8046bea58 <smb_panic_s3+0x98> at /usr/local/lib/libsmbconf.so.0 Oct 28 20:37:37 giganas smbd[6286]: #2 0x80211d4c7 <smb_panic+0x27> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:37 giganas smbd[6286]: #3 0x80211da70 <string_sub_once> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:37 giganas smbd[6286]: #4 0x80211d493 <fault_setup+0x73> at /usr/local/lib/libsamba-util.so.0 Oct 28 20:37:37 giganas smbd[6286]: #5 0x801cd8926 <pthread_sigmask+0x536> at /lib/libthr.so.3 Oct 28 20:37:37 giganas smbd[6286]: #6 0x801cd7ecf <pthread_getspecific+0xe5f> at /lib/libthr.so.3 Oct 28 20:37:37 giganas smbd[6286]: [2017/10/28 20:37:37.842925, 0] ../source3/lib/dumpcore.c:310(dump_core) Oct 28 20:37:37 giganas smbd[6286]: unable to change to %N.core Oct 28 20:37:37 giganas smbd[6286]: refusing to dump core Oct 28 20:37:39 giganas smbd[6157]: [2017/10/28 20:37:39.348000, 0] ../source3/smbd/server.c:972(smbd_accept_connection) Oct 28 20:37:39 giganas smbd[6157]: accept: Software caused connection abort Oct 28 20:37:57 giganas smbd[6161]: [2017/10/28 20:37:57.038680, 1] ../source3/smbd/smbd_cleanupd.c:99(smbd_cleanupd_unlock) Oct 28 20:37:57 giganas smbd[6161]: smbd_cleanupd_unlock: Cleaning up brl and lock database after unclean shutdown Oct 28 20:38:15 giganas smbd[6263]: [2017/10/28 20:38:15.233493, 2] ../source3/smbd/process.c:2876(deadtime_fn) Oct 28 20:38:15 giganas smbd[6263]: Closing idle connection Oct 28 20:39:15 giganas smbd[6325]: [2017/10/28 20:39:15.303686, 2] ../source3/smbd/process.c:2876(deadtime_fn) Oct 28 20:39:15 giganas smbd[6325]: Closing idle connection
(In reply to Mike from comment #9) Looks like a different issue, please file a new PR. Thanks!
Created attachment 13750 [details] Additional patch for 4.6 and 4.7 cherry-picked from master
Looks like the patch with id 13638 brakes compilation of vfs_zfsacl. I get this error now in the linking stage: Waf: Leaving directory `/home/pbulk/build/pbd/samba-pbd/work/samba-4.7.1/bin' Build failed: -> task failed (err #1): {task: cc vfs_zfsacl.c -> vfs_zfsacl_40.o} Missing node signature for bld:///home/pbulk/build/pbd/samba-pbd/work/samba-4.7.1/source3/modules/vfs_zfsacl_40.o (required by {task: cc_link nfs4_acls_1.o,vfs_zfsacl_40.o -> libvfs_module_zfsacl.so}) Which can be traced back to this error in the compiling stage: ../source3/modules/vfs_zfsacl.c: In function 'zfs_get_nt_acl_common': ../source3/modules/vfs_zfsacl.c:69:37: error: 'ace' undeclared (first use in this function) if (S_ISDIR(psbuf->st_ex_mode) && (ace->aceMask & SMB_ACE4_ADD_FILE)) { ^ ../source3/modules/vfs_zfsacl.c:69:37: note: each undeclared identifier is reported only once for each function it appears in In the patch with id 13638 the very last change introduces an action on the 'ace' object which does not seem to be set or even declared at that point. Unfortunately I am not well versed enough in C, well more specifically the samba vfs sub system. (I'm happy to test potential patches though, I have a build server setup were I compile samba on for SmartOS/illumos)
(In reply to Jorge Schrauwen from comment #12) Fixed by attachment 13750 [details].
Ah let me try with that one applied as it looks like it did not make it into 4.7.1
(In reply to Ralph Böhme from comment #13) Everything looks good with that additional patch applied. Compiled and my setup that uses zfsacl still seems to work.
Comment on attachment 13750 [details] Additional patch for 4.6 and 4.7 cherry-picked from master Can someone please ACK the backport? Thanks!
Reassigning to Karolin for inclusion in 4.6 and 4.7. Karolin, the earlier patchset for 4.6 and 4.7 that you already pushed to the branches caused a regression (build-failure) on FreeBSD. The "additional patch" fixes that...
(In reply to Ralph Böhme from comment #17) Pushed additional patch to autobuild-v4-{7,6}-test.
Pushed to both branches. Closing out bug report. Thanks!
*** Bug 13162 has been marked as a duplicate of this bug. ***