]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: use smb1_strip_dfs_path() in reply_search()
authorRalph Boehme <slow@samba.org>
Thu, 30 Mar 2023 14:43:58 +0000 (16:43 +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 7efc4fe6d1af478bdbbb819e2bf46c9763872c5c..3fc2cc8e793752e64f40bacfeaa1c588c8e2547a 100644 (file)
@@ -1210,6 +1210,12 @@ void reply_search(struct smb_request *req)
                struct smb_filename *smb_dname = NULL;
                uint32_t ucf_flags = ucf_flags_from_smb_request(req);
 
+               nt_status = smb1_strip_dfs_path(ctx, &ucf_flags, &path);
+               if (!NT_STATUS_IS_OK(nt_status)) {
+                       reply_nterror(req, nt_status);
+                       goto out;
+               }
+
                nt_status = filename_convert_smb1_search_path(ctx,
                                        conn,
                                        path,