]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r21770: For old DOS style searches we must remember if
authorJeremy Allison <jra@samba.org>
Fri, 9 Mar 2007 02:40:49 +0000 (02:40 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:18:31 +0000 (12:18 -0500)
the initial search had a wildcard in order to
correctly return no error on end of search.
Found by Samba4 torture tester.
Jeremy.

source/smbd/reply.c

index a9c94b81630e2e912d6f13567474e12dd7fc374b..225e0e7407dd5b3934b8227fd565df52c493778c 100644 (file)
@@ -1010,6 +1010,11 @@ int reply_search(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
                }
                string_set(&conn->dirpath,dptr_path(dptr_num));
                pstrcpy(mask, dptr_wcard(dptr_num));
+               /*
+                * For a 'continue' search we have no string. So
+                * check from the initial saved string.
+                */
+               mask_contains_wcard = ms_has_wild(mask);
        }
 
        p = smb_buf(outbuf) + 3;