]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libadouble: use openat_pathref_fsp() in readdir_attr_meta_finderi_stream()
authorRalph Boehme <slow@samba.org>
Thu, 12 Nov 2020 11:37:52 +0000 (12:37 +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().

As the create_disposition is FILE_OPEN we just return the error if
openat_pathref_fsp() fails

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

index 6576ea1dbaa96a09a162db25a58211a62ea8c27b..352606b0f4a1e8c57e7755ce36d02019c8a86748 100644 (file)
@@ -895,6 +895,11 @@ static bool readdir_attr_meta_finderi_stream(
                return false;
        }
 
+       status = openat_pathref_fsp(handle->conn->cwd_fsp, stream_name);
+       if (!NT_STATUS_IS_OK(status)) {
+               return false;
+       }
+
        status = SMB_VFS_CREATE_FILE(
                handle->conn,                           /* conn */
                NULL,                                   /* req */