Bug 12300 - samba allows deleting readonly file regardless of "delete readonly=no"
samba allows deleting readonly file regardless of "delete readonly=no"
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
unspecified
All All
: P5 major
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-30 05:42 UTC by Petr Klikorka
Modified: 2016-09-30 07:16 UTC (History)
1 user (show)

See Also:


Attachments
patch (465 bytes, patch)
2016-09-30 05:42 UTC, Petr Klikorka
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Klikorka 2016-09-30 05:42:47 UTC
Created attachment 12517 [details]
patch

It is possible to delete readonly files on samba share regardless of "delete readonly=no" setting, when a windows client uses this API call:

CreateFile(file_path, DELETE, FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL|FILE_FLAG_DELETE_ON_CLOSE, NULL);

For instance, the windows 10 file explorer uses this method.

The attached patch seems to solve this bug.