Given two opens on a file:
1. Windows open with delete-on-close
2. POSIX open with delete-on-close set
When handle 1 is closed processing in has_other_nonposix_opens_fn() will not
delete the file as (fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) is false, so
has_other_nonposix_opens() will return true which is wrong.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15517
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 13 19:34:29 UTC 2023 on atb-devel-224
+++ /dev/null
-^samba.tests.smb3unix.samba.tests.smb3unix.Smb3UnixTests.test_delete_on_close\(fileserver_smb1\)
if (e->name_hash != fsp->name_hash) {
return false;
}
- if ((fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) &&
- (e->flags & SHARE_MODE_FLAG_POSIX_OPEN)) {
+ if (e->flags & SHARE_MODE_FLAG_POSIX_OPEN) {
return false;
}
if (e->share_file_id == fh_get_gen_id(fsp->fh)) {