From: Ralph Boehme Date: Thu, 12 Nov 2020 11:28:30 +0000 (+0100) Subject: s3/libadouble: use openat_pathref_fsp() in ad_convert_finderinfo() X-Git-Tag: samba-4.14.0rc1~358 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=be4a4b511693c75165e7ead599f8652e70ec0155;p=thirdparty%2Fsamba.git s3/libadouble: use openat_pathref_fsp() in ad_convert_finderinfo() Ensures we have a pathref handle in the smb_fname we pass to SMB_VFS_CREATE_FILE(). Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 46e5bbe9508..3382a84e609 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -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 */