1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-10 13:57:47 +03:00

smbd: Log close_file_free() failure in copy_internals()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Volker Lendecke 2022-03-03 20:13:25 +01:00 committed by Ralph Boehme
parent fbb4bd365f
commit be6cc4cc23

View File

@ -1663,6 +1663,14 @@ NTSTATUS copy_internals(TALLOC_CTX *ctx,
set_close_write_time(fsp2, smb_fname_src->st.st_ex_mtime);
status = close_file_free(NULL, &fsp2, NORMAL_CLOSE);
if (!NT_STATUS_IS_OK(status)) {
DBG_WARNING("close_file_free() failed: %s\n",
nt_errstr(status));
/*
* We can't do much but leak the fsp
*/
goto out;
}
/* Grrr. We have to do this as open_file_ntcreate adds FILE_ATTRIBUTE_ARCHIVE when it
creates the file. This isn't the correct thing to do in the copy