Bug 15517 - Deletion of POSIX opens not handled correctly
Summary: Deletion of POSIX opens not handled correctly
Status: ASSIGNED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Ralph Böhme
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-13 09:41 UTC by Ralph Böhme
Modified: 2023-11-20 08:35 UTC (History)
1 user (show)

See Also:


Attachments
Patch for 4.18 and 4.19 cherry-picked from master (1.41 KB, patch)
2023-11-20 08:30 UTC, Ralph Böhme
slow: review? (jra)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Böhme 2023-11-13 09:41:24 UTC
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.

Have patch, need bugnumber.
Comment 1 Samba QA Contact 2023-11-13 19:35:05 UTC
This bug was referenced in samba master:

f09c5a3dcbb15bb138b6a11eadc04f1bd1d9e3fa
8ccc809f931f5ea8c8893042c1552f7352f0805b
95443320847967ea6412e59b5b7d3853fffe588a
Comment 2 Ralph Böhme 2023-11-20 08:30:40 UTC
Created attachment 18188 [details]
Patch for 4.18 and 4.19 cherry-picked from master
Comment 3 Ralph Böhme 2023-11-20 08:35:01 UTC
Comment on attachment 18188 [details]
Patch for 4.18 and 4.19 cherry-picked from master

Skipped the test in the backport as it has conflicts and prerequisites.