BUG: https://bugzilla.samba.org/show_bug.cgi?id=13458
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15608
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
struct tevent_req *subreq = NULL;
struct timeval timeout;
bool rename;
+ bool delete_on_close;
NTSTATUS status;
rename = (file_info_level == SMB2_FILE_RENAME_INFORMATION_INTERNAL);
- if (!rename) {
+
+ if (file_info_level == SMB_FILE_DISPOSITION_INFORMATION) {
+ status = smb_check_file_disposition_info(
+ fsp,
+ (char *)state->data.data,
+ state->data.length,
+ &delete_on_close);
+ if (tevent_req_nterror(req, status)) {
+ return;
+ }
+ }
+
+ if (!rename && !delete_on_close) {
return;
}
return;
}
- /* Do the rename under the lock. */
+ /* Do the setinfo again under the lock. */
status = smbd_do_setfilepathinfo(state->fsp->conn,
state->smb2req->smb1req,
state,