diff --git a/selftest/knownfail.d/smb2_del_on_close_nonwrite b/selftest/knownfail.d/smb2_del_on_close_nonwrite deleted file mode 100644 index 7e81a1118d0..00000000000 --- a/selftest/knownfail.d/smb2_del_on_close_nonwrite +++ /dev/null @@ -1 +0,0 @@ -^samba3.smbtorture_s3.plain.SMB2-DEL-ON-CLOSE-NONWRITE-DELETE-NO.smbtorture\(fileserver\) diff --git a/source3/smbd/dir.c b/source3/smbd/dir.c index 6180eba2fac..059de584d17 100644 --- a/source3/smbd/dir.c +++ b/source3/smbd/dir.c @@ -2029,11 +2029,17 @@ NTSTATUS can_delete_directory_fsp(files_struct *fsp) } if (!is_visible_fsp(direntry_fname->fsp)) { - TALLOC_FREE(talloced); - TALLOC_FREE(fullname); - TALLOC_FREE(smb_dname_full); - TALLOC_FREE(direntry_fname); - continue; + /* + * Hidden file. + * Allow if "delete veto files = yes" + */ + if (lp_delete_veto_files(SNUM(conn))) { + TALLOC_FREE(talloced); + TALLOC_FREE(fullname); + TALLOC_FREE(smb_dname_full); + TALLOC_FREE(direntry_fname); + continue; + } } TALLOC_FREE(talloced);