]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libadouble: use openat_pathref_fsp() in ad_unconvert_open_ad()
authorRalph Boehme <slow@samba.org>
Thu, 12 Nov 2020 11:30:18 +0000 (12:30 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 16 Dec 2020 09:08:31 +0000 (09:08 +0000)
Ensures we have a pathref handle in the smb_fname we pass to
SMB_VFS_CREATE_FILE().

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

index 3382a84e60972ea038e6d7814a97a0b9c18af98d..5518d28596ba86977bede37da3411d86d38c96ae 100644 (file)
@@ -1480,6 +1480,13 @@ static bool ad_unconvert_open_ad(TALLOC_CTX *mem_ctx,
        NTSTATUS status;
        int ret;
 
+       status = openat_pathref_fsp(handle->conn->cwd_fsp, adpath);
+       if (!NT_STATUS_IS_OK(status) &&
+           !NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND))
+       {
+               return false;
+       }
+
        status = SMB_VFS_CREATE_FILE(
                handle->conn,
                NULL,                           /* req */