summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2019-03-12 09:19:19 +1100
committerDarren Tucker <dtucker@dtucker.net>2019-03-12 09:19:19 +1100
commitdaa7505aadca68ba1a2c70cbdfce423208eb91ee (patch)
tree5a928d2516bac7be6f0fde98dfdb7eb7b266dec9 /match.c
parentfd10cf027b56f9aaa80c9e3844626a05066589a4 (diff)
Use Cygwin-specific matching only for users+groups.
Patch from vinschen at redhat.com, updated a little by me.
Diffstat (limited to 'match.c')
-rw-r--r--match.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/match.c b/match.c
index ff0815ef9..fcf69596d 100644
--- a/match.c
+++ b/match.c
@@ -111,8 +111,6 @@ match_pattern(const char *s, const char *pattern)
111 /* NOTREACHED */ 111 /* NOTREACHED */
112} 112}
113 113
114#ifndef HAVE_CYGWIN /* Cygwin version in openbsd-compat/bsd-cygwin_util.c */
115
116/* 114/*
117 * Tries to match the string against the 115 * Tries to match the string against the
118 * comma-separated sequence of subpatterns (each possibly preceded by ! to 116 * comma-separated sequence of subpatterns (each possibly preceded by ! to
@@ -172,18 +170,16 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
172 return got_positive; 170 return got_positive;
173} 171}
174 172
175#endif
176
177/* Match a list representing users or groups. */ 173/* Match a list representing users or groups. */
178int 174int
179match_usergroup_pattern_list(const char *string, const char *pattern) 175match_usergroup_pattern_list(const char *string, const char *pattern)
180{ 176{
181#ifndef HAVE_CYGWIN 177#ifdef HAVE_CYGWIN
182 /* Case sensitive match */ 178 /* Windows usernames may be Unicode and are not case sensitive */
183 return match_pattern_list(string, pattern, 0); 179 return cygwin_ug_match_pattern_list(string, pattern);
184#else 180#else
185 /* Case insensitive match */ 181 /* Case insensitive match */
186 return match_pattern_list(string, pattern, 1); 182 return match_pattern_list(string, pattern, 0);
187#endif 183#endif
188} 184}
189 185