mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r5513: Fix for bug #2201 - use same logic with "delete readonly"
when setting the delete on close flag as we do in SMBunlink calls. Jeremy. (This used to be commit 7a94eaf1811c79ae52ee78b1cd9cfc691e1d65a0)
This commit is contained in:
parent
139ce45d7a
commit
34a5c5a580
@ -2958,10 +2958,12 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close, u
|
||||
* Only allow delete on close for writable files.
|
||||
*/
|
||||
|
||||
if (dosmode & aRONLY) {
|
||||
DEBUG(10,("set_delete_on_close_internal: file %s delete on close flag set but file attribute is readonly.\n",
|
||||
fsp->fsp_name ));
|
||||
return NT_STATUS_CANNOT_DELETE;
|
||||
if (!lp_delete_readonly(SNUM(fsp->conn))) {
|
||||
if (dosmode & aRONLY) {
|
||||
DEBUG(10,("set_delete_on_close_internal: file %s delete on close flag set but file attribute is readonly.\n",
|
||||
fsp->fsp_name ));
|
||||
return NT_STATUS_CANNOT_DELETE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user