From bff8dd86eeaa12c393e1fc70d230538c13801865 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 20 May 1998 02:01:21 +0000 Subject: Fixed Samba's wildcard algorithm to be *exactly* the same as NT. You do not want to know how this code works :-). Jeremy (This used to be commit 7adbd2dfc1eda0e147b7ab4b5ff5e71f173794af) --- source3/smbd/trans2.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index db44dc984d..372ab58b65 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -678,7 +678,16 @@ static int call_trans2findfirst(char *inbuf, char *outbuf, int bufsize, int cnum { p = mask; while (*p) { - if (*p == '<') *p = '*'; + if (*p == '<') { + pstring expnd; + if(p[1] != '"') { + pstrcpy( expnd, p+1 ); + *p++ = '*'; + *p = '.'; + safe_strcpy( p+1, expnd, p - mask - 1); + } else + *p = '*'; + } if (*p == '>') *p = '?'; if (*p == '"') *p = '.'; p++; -- cgit