From 67a73548140b5134a0389e47ad169805ea970641 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 12 Nov 2020 12:25:56 +0100 Subject: [PATCH] s3/libadouble: use openat_pathref_fsp() in ad_convert_xattr() 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 --- source3/lib/adouble.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index f7c5d98715e..46e5bbe9508 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -1106,6 +1106,14 @@ static bool ad_convert_xattr(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)) + { + ok = false; + goto fail; + } + status = SMB_VFS_CREATE_FILE( handle->conn, /* conn */ NULL, /* req */