mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
s3:smbd: improve !delete_file logic in close_remove_share_mode()
This makes it much easier to understand the logic (at least for me). It will make the following changes easier. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15125 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
095da847e7
commit
ce868b095c
@ -364,8 +364,14 @@ static NTSTATUS close_remove_share_mode(files_struct *fsp,
|
||||
*/
|
||||
|
||||
normal_close = (close_type == NORMAL_CLOSE || close_type == SHUTDOWN_CLOSE);
|
||||
if (!normal_close) {
|
||||
/*
|
||||
* Never try to delete the file for ERROR_CLOSE
|
||||
*/
|
||||
delete_file = false;
|
||||
}
|
||||
|
||||
if (!normal_close || !delete_file) {
|
||||
if (!delete_file) {
|
||||
status = NT_STATUS_OK;
|
||||
goto done;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user