]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use smb1_strip_dfs_path() in reply_ntcreate_and_X()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 13:41:43 +0000 (15:41 +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_nttrans.c

index 4a0cfcc113362d930815fd7df7aa96a7b226549b..4c025fe9149c5133884ef4658df68eefcf58d06e 100644 (file)
@@ -628,6 +628,12 @@ void reply_ntcreate_and_X(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, ucf_flags, twrp, &dirfsp, &smb_fname);