Dangling symlinks are implicitly vetoed files in SMB2, they are not shown to the client. A directory containing a dangling symlink cannot be deleted by SMB2 even though the client cannot see the dangling symlink entry. We need to allow directories containing only dangling symlinks to be deleted by a Windows client when "delete veto files = yes" is set. Called out by Pavel Filipensky <pfilipen@redhat.com> on the samba-technical list. Have a patch, need bugid and regression test.
Created attachment 16863 [details] Raw patch that fixes this bug and also 4878 Storing it here so I don't lose it. This needs to be paired with regression tests.
This bug was referenced in samba master: 942123b95923f35a32df4196a072a3ed3468396a 295d7d026babe3cd5123d0f53adcb16868907f05 f254be19d6501a4f573843af97963e350a9ee2ed a37d16e7c55f85e3f2c9c8614755ea6307092d5f 26fecad2e66e91a3913d88ee2e0889f266e91d89 e9ef970eee5eca8ab3720279c54098e91d2dfda9 0b818c6b77e972626d0b071bebcf4ce55619fb84
Created attachment 16900 [details] git-am fix for 4.15.next. Cherry-picked from master. Note this must be applied *after* the fix in: https://bugzilla.samba.org/show_bug.cgi?id=14878
Reassigning to Jule for inclusion in 4.15.
Note to Jule: Please note the patches for these bugs *MUST* be applied in the following order: https://bugzilla.samba.org/show_bug.cgi?id=14878 https://bugzilla.samba.org/show_bug.cgi?id=14879 https://bugzilla.samba.org/show_bug.cgi?id=14892 in order to apply correctly. Thanks !
Pushed to autobuild-v4-15-test.
This bug was referenced in samba v4-15-test: 359517877d6462ff4398401748f921c8b79357a6 7a4173809a87350bc3580240232978042ec2ceca 0dba0917fd97e975d1daab5b0828644d026c2bc5 e00fe095e8cf7ab54bc82870b913762d2fdddbad 4793c4d5307472f0eb72f70f7dbf7324744e3f91 5023dbc04bfad7cc39e8c4de96f40c82e7a0288e a549dc219cba5bd61969e4919ae4142f52c133ea
Closing out bug report. Thanks!
Created attachment 17024 [details] patch for v4-14 a549dc2 s3: docs-xml: Clarify the "delete veto files" paramter. - as original 5023dbc s3: smbd: Fix logic in can_delete_directory_fsp() to cope with dangling symlinks. - modified to match 4.14 4793c4d s3: smbd: Fix logic in rmdir_internals() to cope with dangling symlinks. - modified to match 4.14 e00fe09 s3: smbd: Fix rmdir_internals() to do an early return if lp_delete_veto_files() is not set. - modified to match 4.14 0dba091 s3: VFS: xattr_tdb. Allow unlinkat to cope with dangling symlinks. - modified to match 4.14 7a41738 s3: VFS: streams_depot. Allow unlinkat to cope with dangling symlinks. - modified to match 4.14 3595178 s3: smbd: Add two tests showing the ability to delete a directory containing a dangling symlink over SMB2 depends on "delete veto files" setting. - as original
Jule, please also push the patch for 4.14. Thanks!
Pushed to autobuild-v4-14-test.
This bug was referenced in samba v4-14-test: 67c85f0ce8e2e8d5c4cc3a8752ac423aef3ef736 37804062ea7babdd7e304343fbc054d8946170dc 3d4761cf04ddf386e1565131351d28ca315b9626 66d688cea2bd4071128bbaa2afd810d89daab370 7034f9b765de5d9423c903761a3fe5549d7fe9a7 b61fb49a7a90a4b8fb2df6b9970db9bc5e16027d aef700ad3c800dc33ccf4c470d45416c97fde210
This bug was referenced in samba v4-15-stable (Release samba-4.15.3): 359517877d6462ff4398401748f921c8b79357a6 7a4173809a87350bc3580240232978042ec2ceca 0dba0917fd97e975d1daab5b0828644d026c2bc5 e00fe095e8cf7ab54bc82870b913762d2fdddbad 4793c4d5307472f0eb72f70f7dbf7324744e3f91 5023dbc04bfad7cc39e8c4de96f40c82e7a0288e a549dc219cba5bd61969e4919ae4142f52c133ea
This bug was referenced in samba v4-14-stable (Release samba-4.14.11): 67c85f0ce8e2e8d5c4cc3a8752ac423aef3ef736 37804062ea7babdd7e304343fbc054d8946170dc 3d4761cf04ddf386e1565131351d28ca315b9626 66d688cea2bd4071128bbaa2afd810d89daab370 7034f9b765de5d9423c903761a3fe5549d7fe9a7 b61fb49a7a90a4b8fb2df6b9970db9bc5e16027d aef700ad3c800dc33ccf4c470d45416c97fde210