From: Jeremy Allison Date: Wed, 26 May 2021 18:10:53 +0000 (-0700) Subject: s3: smbd: In can_delete_file_in_directory(), parent_smb_fname() -> SMB_VFS_PARENT_PAT... X-Git-Tag: tevent-0.11.0~679 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad99ee7578558358a79e748d53402fcc66ae72c3;p=thirdparty%2Fsamba.git s3: smbd: In can_delete_file_in_directory(), parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/file_access.c b/source3/smbd/file_access.c index 5ffb4fea6c4..3bb4036cfdb 100644 --- a/source3/smbd/file_access.c +++ b/source3/smbd/file_access.c @@ -39,6 +39,7 @@ bool can_delete_file_in_directory(connection_struct *conn, TALLOC_CTX *ctx = talloc_tos(); struct smb_filename *smb_fname_parent = NULL; bool ret; + NTSTATUS status; SMB_ASSERT(dirfsp == conn->cwd_fsp); @@ -52,8 +53,12 @@ bool can_delete_file_in_directory(connection_struct *conn, } /* Get the parent directory permission mask and owners. */ - ret = parent_smb_fname(ctx, smb_fname, &smb_fname_parent, NULL); - if (ret != true) { + status = SMB_VFS_PARENT_PATHNAME(conn, + ctx, + smb_fname, + &smb_fname_parent, + NULL); + if (!NT_STATUS_IS_OK(status)) { return false; }