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)
committerVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2022 15:32:35 +0000 (15:32 +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>
source3/smbd/dosmode.c

index 5fc130ac66992b6e1e7f3decc16f288e250386dc..dd07b5f38823cdb8185f1459a8dfdde8303bb2c2 100644 (file)
@@ -933,9 +933,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;
        }