]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: copy_internals(). parent_smb_fname() -> SMB_VFS_PARENT_PATHNAME().
authorJeremy Allison <jra@samba.org>
Wed, 26 May 2021 18:40:32 +0000 (11:40 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 2 Jun 2021 05:39:30 +0000 (05:39 +0000)
Off-topic. This function is insane and should be removed..

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/nttrans.c

index 00f551595d77c69f5f40d0b726c034dfd6f4ffb2..75162b5f61cfc064745b4591ca6c7fab6a50ee9f 100644 (file)
@@ -1570,7 +1570,6 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
        NTSTATUS status = NT_STATUS_OK;
        struct smb_filename *parent = NULL;
        struct smb_filename *pathref = NULL;
-       bool ok;
 
        if (!CAN_WRITE(conn)) {
                status = NT_STATUS_MEDIA_WRITE_PROTECTED;
@@ -1678,12 +1677,12 @@ static NTSTATUS copy_internals(TALLOC_CTX *ctx,
           creates the file. This isn't the correct thing to do in the copy
           case. JRA */
 
-       ok = parent_smb_fname(talloc_tos(),
-                             smb_fname_dst,
-                             &parent,
-                             NULL);
-       if (!ok) {
-               status = NT_STATUS_NO_MEMORY;
+       status = SMB_VFS_PARENT_PATHNAME(conn,
+                                        talloc_tos(),
+                                        smb_fname_dst,
+                                        &parent,
+                                        NULL);
+       if (!NT_STATUS_IS_OK(status)) {
                goto out;
        }
        if (smb_fname_dst->fsp == NULL) {