From: Ralph Boehme Date: Thu, 12 Nov 2020 11:34:21 +0000 (+0100) Subject: s3/libadouble: use openat_pathref_fsp() in ad_open_rsrc() X-Git-Tag: samba-4.14.0rc1~354 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=368b8158cb737089fb471019de4bfadf5c0d57e2;p=thirdparty%2Fsamba.git s3/libadouble: use openat_pathref_fsp() in ad_open_rsrc() 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/lib/adouble.c b/source3/lib/adouble.c index 99f948103c8..0155c2ccc8d 100644 --- a/source3/lib/adouble.c +++ b/source3/lib/adouble.c @@ -2109,6 +2109,11 @@ static int ad_open_rsrc(vfs_handle_struct *handle, share_access &= ~FILE_SHARE_WRITE; } + status = openat_pathref_fsp(handle->conn->cwd_fsp, adp_smb_fname); + if (!NT_STATUS_IS_OK(status)) { + return -1; + } + status = SMB_VFS_CREATE_FILE( handle->conn, /* conn */ NULL, /* req */