smbd: use smb1_strip_dfs_path() in reply_getatr
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:01:17 +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 9ed6ac8613273e7501f46ab00627ad5b7cfcb7af..3c53d8fe4e4c99efe599c2d1788d48611aa47d66 100644 (file)
@@ -807,6 +807,11 @@ void reply_getatr(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,