]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: In check_parent_access(), parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME().
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2021 19:11:36 +0000 (12:11 -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/open.c

index 919ccf4cab88ae1b6a591703fc9a546856607ac2..ba8d4fbabee65248401e3d10381039094290a4fc 100644 (file)
@@ -325,7 +325,6 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
        bool delete_on_close_set;
        int ret;
        TALLOC_CTX *frame = talloc_stackframe();
-       bool ok;
 
        /*
         * NB. When dirfsp != conn->cwd_fsp, we must
@@ -334,9 +333,12 @@ NTSTATUS check_parent_access(struct connection_struct *conn,
 
        SMB_ASSERT(dirfsp == conn->cwd_fsp);
 
-       ok = parent_smb_fname(frame, smb_fname, &parent_dir, NULL);
-       if (!ok) {
-               status = NT_STATUS_NO_MEMORY;
+       status = SMB_VFS_PARENT_PATHNAME(conn,
+                                        frame,
+                                        smb_fname,
+                                        &parent_dir,
+                                        NULL);
+       if (!NT_STATUS_IS_OK(status)) {
                goto out;
        }