]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/libadouble: use openat_pathref_fsp() in ad_convert_finderinfo()
authorRalph Boehme <slow@samba.org>
Thu, 12 Nov 2020 11:28:30 +0000 (12:28 +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 46e5bbe9508f9b6b6f66f0002c18aa2aa0fefba3..3382a84e60972ea038e6d7814a97a0b9c18af98d 100644 (file)
@@ -1243,6 +1243,13 @@ static bool ad_convert_finderinfo(vfs_handle_struct *handle,
 
        DBG_DEBUG("stream_name: %s\n", smb_fname_str_dbg(stream_name));
 
+       status = openat_pathref_fsp(handle->conn->cwd_fsp, stream_name);
+       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,                   /* conn */
                NULL,                           /* req */