Bug 13673 - File with READ_ONLY attribute can be incorrectly opened with DELETE_ON_CLOSE
File with READ_ONLY attribute can be incorrectly opened with DELETE_ON_CLOSE
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
4.9.1
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-02 20:06 UTC by Christof Schmitt
Modified: 2018-11-08 09:33 UTC (History)
2 users (show)

See Also:


Attachments
git-am fix for 4.9.next, 4.8.next. (11.86 KB, patch)
2018-11-06 18:53 UTC, Jeremy Allison
cs: review+
Details
Patches for 4.8 (11.78 KB, patch)
2018-11-06 18:55 UTC, Christof Schmitt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christof Schmitt 2018-11-02 20:06:01 UTC
MS-FSA has:

2.1.5.1.2.1 Algorithm to Check Access to an Existing File
...
If ((File.FileAttributes.FILE_ATTRIBUTE_READONLY || File.Volume.IsReadOnly) &&
CreateOptions.FILE_DELETE_ON_CLOSE), then return STATUS_CANNOT_DELETE.


smbd does not return the STATUS_CANNOT_DELETE status, but allows the
CREATE to succeed. Patch to follow.
Comment 1 Jeremy Allison 2018-11-06 18:53:50 UTC
Created attachment 14604 [details]
git-am fix for 4.9.next, 4.8.next.

git-am fix for 4.9.next, 4.8.next, back-ported from master.
Comment 2 Christof Schmitt 2018-11-06 18:55:21 UTC
Created attachment 14605 [details]
Patches for 4.8
Comment 3 Jeremy Allison 2018-11-06 19:04:29 UTC
Re-assigning to Karolin for inclusion in 4.9.next, 4.8.next.
Comment 4 Karolin Seeger 2018-11-07 07:43:12 UTC
(In reply to Jeremy Allison from comment #3)
Pushed to autobuild-v4-{9,8}-test.
Comment 5 Karolin Seeger 2018-11-08 09:33:50 UTC
(In reply to Karolin Seeger from comment #4)
Pushed to both branches.
Closing out bug report.

Thanks!