From f1607cda38eb9b57567912ee595d5bd6ca8902a7 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 20 Jan 2021 15:27:48 +0100 Subject: [PATCH] smbd: use synthetic_pathref() in delete_all_streams() This ensures backends can use the pathref fsp as needed. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- source3/smbd/close.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source3/smbd/close.c b/source3/smbd/close.c index f05619d1886..059b9f1518f 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -188,15 +188,16 @@ NTSTATUS delete_all_streams(connection_struct *conn, continue; } - smb_fname_stream = synthetic_smb_fname(talloc_tos(), - smb_fname->base_name, - stream_info[i].name, - NULL, - smb_fname->twrp, - (smb_fname->flags & - ~SMB_FILENAME_POSIX_PATH)); - - if (smb_fname_stream == NULL) { + status = synthetic_pathref(talloc_tos(), + conn->cwd_fsp, + smb_fname->base_name, + stream_info[i].name, + NULL, + smb_fname->twrp, + (smb_fname->flags & + ~SMB_FILENAME_POSIX_PATH), + &smb_fname_stream); + if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("talloc_aprintf failed\n")); status = NT_STATUS_NO_MEMORY; goto fail;