diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-10-02 05:09:16 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:32 -0500 |
commit | 6185fbad47e63f64599582ec9246f2df7c416942 (patch) | |
tree | 02e759fd007e011350bf9cb61a81996d6ec335b4 /source4 | |
parent | 45717794c3d63ddf30fc1cfd040029b1ffd58063 (diff) | |
download | samba-6185fbad47e63f64599582ec9246f2df7c416942.tar.gz samba-6185fbad47e63f64599582ec9246f2df7c416942.tar.bz2 samba-6185fbad47e63f64599582ec9246f2df7c416942.zip |
r2776: if there are no wildcard characters then use StrCaseCmp()
note that this is not just an optimisation, it fixes a rare edge case
when LANMAN1 is negotiated
(This used to be commit 8d879cf54c2fe09d62a5c28b02a070cb80984744)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/ms_fnmatch.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/lib/ms_fnmatch.c b/source4/lib/ms_fnmatch.c index d072eb6a50..507d2aea4a 100644 --- a/source4/lib/ms_fnmatch.c +++ b/source4/lib/ms_fnmatch.c @@ -150,6 +150,12 @@ int ms_fnmatch(const char *pattern, const char *string, enum protocol_types prot string = "."; } + if (strpbrk(pattern, "<>*?\"") == NULL) { + /* this is not just an optmisation - it is essential + for LANMAN1 correctness */ + return StrCaseCmp(pattern, string); + } + pstrcpy_wa(p, pattern); pstrcpy_wa(s, string); |