summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-02-09 15:50:44 +0000
committerJeremy Allison <jra@samba.org>2000-02-09 15:50:44 +0000
commitfe05c85250f04935030be6abc5d3924a06897bdd (patch)
tree96465f30b68963e2500c576bdf48298d1af996f0 /source3
parentf452de7ed622669ce203b58e5a528a0933da58ac (diff)
downloadsamba-fe05c85250f04935030be6abc5d3924a06897bdd.tar.gz
samba-fe05c85250f04935030be6abc5d3924a06897bdd.tar.bz2
samba-fe05c85250f04935030be6abc5d3924a06897bdd.zip
Fixed wildcard match bug with '****' with smbclient. Found by Andrew (damn him! :-).
Jeremy. (This used to be commit c8ca70f99ee2eae5e29ddf0dd4bc231fbcd188f2)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index a824887e88..564fc88222 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -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);