1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00

Fixed Samba's wildcard algorithm to be *exactly* the same

as NT.
You do not want to know how this code works :-).
Jeremy
This commit is contained in:
Jeremy Allison 0001-01-01 00:00:00 +00:00
parent 170070b9c7
commit 7adbd2dfc1

View File

@ -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++;