s3/lib: Use ms_fnmatch_protocol in mask_match
authorVolker Lendecke <vl@samba.org>
Tue, 25 Oct 2016 10:28:44 +0000 (12:28 +0200)
committerRalph Boehme <slow@samba.org>
Sun, 22 Jan 2017 17:30:12 +0000 (18:30 +0100)
This avoids the talloc/free through push_ucs2_talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/util.c

index 565d71cbf6c202145779a60f1bbfe3c24ce61f8d..d525be6d6bba454065d82626797505e9df31a631 100644 (file)
@@ -1753,7 +1753,7 @@ bool mask_match(const char *string, const char *pattern, bool is_case_sensitive)
        if (ISDOT(pattern))
                return False;
 
-       return ms_fnmatch(pattern, string, Protocol <= PROTOCOL_LANMAN2, is_case_sensitive) == 0;
+       return ms_fnmatch_protocol(pattern, string, Protocol, is_case_sensitive) == 0;
 }
 
 /*******************************************************************