mirror of
https://github.com/samba-team/samba.git
synced 2025-08-29 13:49:30 +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 7a94eaf181
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
139ce45d7a
commit
34a5c5a580
@ -2958,11 +2958,13 @@ NTSTATUS set_delete_on_close_internal(files_struct *fsp, BOOL delete_on_close, u
|
||||
* Only allow delete on close for writable files.
|
||||
*/
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Only allow delete on close for writable shares.
|
||||
|
Reference in New Issue
Block a user