1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-04 08:22:08 +03:00

Fixed wildcard match bug with '****' with smbclient. Found by Andrew (damn him! :-).

Jeremy.
(This used to be commit c8ca70f99e)
This commit is contained in:
Jeremy Allison
2000-02-09 15:50:44 +00:00
parent f452de7ed6
commit fe05c85250

View File

@ -1321,8 +1321,9 @@ BOOL mask_match(char *str, char *regexp, BOOL case_sig, BOOL trans2)
#endif
/* Remove any *? and ** as they are meaningless */
pstring_sub(t_pattern, "*?", "*");
pstring_sub(t_pattern, "**", "*");
for(p = t_pattern; *p; p++)
while( *p == '*' && (p[1] == '?' || p[1] == '*'))
(void)pstrcpy( &p[1], &p[2]);
if (strequal(t_pattern,"*"))
return(True);