From: Noel Power Date: Wed, 17 Feb 2021 09:34:40 +0000 (+0000) Subject: s3/modules: ensure catia_set_dos_attributes passes on pathref X-Git-Tag: tevent-0.11.0~1592 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14564477d55dafebf2036c822930e1a02a47472a;p=thirdparty%2Fsamba.git s3/modules: ensure catia_set_dos_attributes passes on pathref Signed-off-by: Noel Power Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 0a3fa5ca791..977d5d561c6 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -2207,15 +2207,21 @@ static NTSTATUS catia_set_dos_attributes(struct vfs_handle_struct *handle, errno = map_errno_from_nt_status(status); return status; } - mapped_smb_fname = synthetic_smb_fname(talloc_tos(), + status = synthetic_pathref(talloc_tos(), + handle->conn->cwd_fsp, mapped_name, NULL, &smb_fname->st, smb_fname->twrp, - smb_fname->flags); - if (mapped_smb_fname == NULL) { - TALLOC_FREE(mapped_name); - return NT_STATUS_NO_MEMORY; + smb_fname->flags, + &mapped_smb_fname); + /* + * how about NT_STATUS_OBJECT_NAME_NOT_FOUND / link ? not sure + * if we let that go and return success or not :/ + */ + + if (!NT_STATUS_IS_OK(status)) { + return status; } status = SMB_VFS_NEXT_SET_DOS_ATTRIBUTES(handle,