From: Ralph Boehme Date: Thu, 12 Nov 2020 11:30:18 +0000 (+0100) Subject: s3/libadouble: use openat_pathref_fsp() in ad_unconvert_open_ad() X-Git-Tag: samba-4.14.0rc1~357 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e70c61874aff29176712274ebf1e721b0d339910;p=thirdparty%2Fsamba.git s3/libadouble: use openat_pathref_fsp() in ad_unconvert_open_ad() 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 3382a84e609..5518d28596b 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -1480,6 +1480,13 @@ static bool ad_unconvert_open_ad(TALLOC_CTX *mem_ctx, NTSTATUS status; int ret; + status = openat_pathref_fsp(handle->conn->cwd_fsp, adpath); + 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, NULL, /* req */