]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libadouble: use openat_pathref_fsp() in ad_collect_one_stream()
authorRalph Boehme <slow@samba.org>
Thu, 12 Nov 2020 11:32:02 +0000 (12:32 +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 d4090c224d556ee128af656f657ffc3a10f12cab..99f948103c835b62b4985eec94b661e8d4b467ce 100644 (file)
@@ -1642,6 +1642,12 @@ static bool ad_collect_one_stream(struct vfs_handle_struct *handle,
                goto out;
        }
 
+       status = openat_pathref_fsp(handle->conn->cwd_fsp, sname);
+       if (!NT_STATUS_IS_OK(status)) {
+               ok = false;
+               goto out;
+       }
+
        status = SMB_VFS_CREATE_FILE(
                handle->conn,
                NULL,                           /* req */