]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In can_delete_file_in_directory(), parent_smb_fname() -> SMB_VFS_PARENT_PAT...
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2021 18:10:53 +0000 (11:10 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 Jun 2021 05:39:30 +0000 (05:39 +0000)
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/file_access.c

index 5ffb4fea6c40853643866d1ba64437c796b63c63..3bb4036cfdb7fcfc6a549e493f660a1d667a482f 100644 (file)
@@ -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;
        }