smbd: use metadata_fsp() with SMB_VFS_FSET_DOS_ATTRIBUTES()
authorRalph Boehme <slow@samba.org>
Fri, 29 Jul 2022 12:56:21 +0000 (14:56 +0200)
committerJule Anger <janger@samba.org>
Tue, 6 Sep 2022 07:54:13 +0000 (07:54 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15126
MR: https://gitlab.com/samba-team/samba/-/merge_requests/2643

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 55e55804bb2d0f21c1bbe207257bb40555f3b7a2)

source3/smbd/dosmode.c

index cefde1dc9f0c5e6e25939d4bac169a0cd6fd102b..06727de600caa4f4195725a6e9a322e71f0255a7 100644 (file)
@@ -960,9 +960,8 @@ int file_set_dosmode(connection_struct *conn,
 
        if (smb_fname->fsp != NULL) {
                /* Store the DOS attributes in an EA by preference. */
-               status = SMB_VFS_FSET_DOS_ATTRIBUTES(conn,
-                                                    smb_fname->fsp,
-                                                    dosmode);
+               status = SMB_VFS_FSET_DOS_ATTRIBUTES(
+                       conn, metadata_fsp(smb_fname->fsp), dosmode);
        } else {
                status = NT_STATUS_OBJECT_NAME_NOT_FOUND;
        }