summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-03 17:44:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:36 -0500
commit5480cfc26b798dd7a5a46af9c69e0921c679b3c9 (patch)
treec9d1df4b2d6b871f4c1a20f972c7b565e96b710f
parentfef54a21b19b3475adfdcdde636f00a3f6be0fb9 (diff)
downloadsamba-5480cfc26b798dd7a5a46af9c69e0921c679b3c9.tar.gz
samba-5480cfc26b798dd7a5a46af9c69e0921c679b3c9.tar.bz2
samba-5480cfc26b798dd7a5a46af9c69e0921c679b3c9.zip
r2213: Optimisation. Passes masktest against W2K3.
Jeremy. (This used to be commit 5dc3324c4f1ae10c96b6d385531369e0eeee4c40)
-rw-r--r--source3/lib/ms_fnmatch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/lib/ms_fnmatch.c b/source3/lib/ms_fnmatch.c
index 24232c3b52..42c91bd18d 100644
--- a/source3/lib/ms_fnmatch.c
+++ b/source3/lib/ms_fnmatch.c
@@ -179,6 +179,9 @@ static int ms_fnmatch_w(const smb_ucs2_t *pattern, const smb_ucs2_t *string,
break;
case UCS2_CHAR('*'):
+ while (*p == UCS2_CHAR('*')) {
+ p++;
+ }
for (; *n; n++) {
if (ms_fnmatch_w(p, n, protocol, case_sensitive) == 0) return 0;
}