smbd: use smb1_strip_dfs_path() in reply_setatr()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:01:42 +0000 (16:01 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 31 Mar 2023 05:12:32 +0000 (05:12 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb1_reply.c

index 3c53d8fe4e4c99efe599c2d1788d48611aa47d66..461910a571cb29e68e3adaff137fbcc26aa1e490 100644 (file)
@@ -921,6 +921,11 @@ void reply_setatr(struct smb_request *req)
        if (ucf_flags & UCF_GMT_PATHNAME) {
                extract_snapshot_token(fname, &twrp);
        }
+       status = smb1_strip_dfs_path(ctx, &ucf_flags, &fname);
+       if (!NT_STATUS_IS_OK(status)) {
+               reply_nterror(req, status);
+               goto out;
+       }
        status = filename_convert_dirfsp(ctx,
                                         conn,
                                         fname,