]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/modules: ensure catia_set_dos_attributes passes on pathref
authorNoel Power <noel.power@suse.com>
Wed, 17 Feb 2021 09:34:40 +0000 (09:34 +0000)
committerJeremy Allison <jra@samba.org>
Thu, 11 Mar 2021 17:50:30 +0000 (17:50 +0000)
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_catia.c

index 0a3fa5ca7917d14a2b020848dab429851ea6e38f..977d5d561c6bdc70d59433daeaa26fc96ea6976a 100644 (file)
@@ -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,