diff options
author | Jeremy Allison <jra@samba.org> | 1998-05-20 02:01:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-05-20 02:01:21 +0000 |
commit | bff8dd86eeaa12c393e1fc70d230538c13801865 (patch) | |
tree | c0ff6f0a91379c450db100f3713eb18f186f8c0a /source3/smbd | |
parent | 00516da27e0293f66549488e87321a49bb4af4fd (diff) | |
download | samba-bff8dd86eeaa12c393e1fc70d230538c13801865.tar.gz samba-bff8dd86eeaa12c393e1fc70d230538c13801865.tar.bz2 samba-bff8dd86eeaa12c393e1fc70d230538c13801865.zip |
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)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 11 |
1 files changed, 10 insertions, 1 deletions
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++; |