1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

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

Jeremy.
This commit is contained in:
Jeremy Allison
-
parent 34b0e2acb0
commit c8ca70f99e

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);