smbd: use smb1_strip_dfs_path() in reply_open()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:02:08 +0000 (16:02 +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 461910a571cb29e68e3adaff137fbcc26aa1e490..c8cc800fe30a99aa6d8f5f3c5c41c7fbbfd2489a 100644 (file)
@@ -1602,6 +1602,11 @@ void reply_open(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,