smbd: fix has_other_nonposix_opens_fn()
authorRalph Boehme <slow@samba.org>
Fri, 13 Oct 2023 08:54:44 +0000 (10:54 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 13 Nov 2023 19:34:29 +0000 (19:34 +0000)
commit95443320847967ea6412e59b5b7d3853fffe588a
tree8d591609ebbad5ab055325bb769ee9a0859b0423
parent8ccc809f931f5ea8c8893042c1552f7352f0805b
smbd: fix has_other_nonposix_opens_fn()

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
selftest/knownfail.d/samba.tests.smb3unix.samba.tests.smb3unix.Smb3UnixTests [deleted file]
source3/smbd/close.c