summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorCorinna Vinschen <vinschen@redhat.com>2019-02-20 13:41:25 +0100
committerDarren Tucker <dtucker@dtucker.net>2019-02-22 15:22:53 +1100
commit37638c752041d591371900df820f070037878a2d (patch)
treec568d26fa3747cfe35d86b46df84d5bcc0417245 /match.c
parentbed1d43698807a07bb4ddb93a46b0bd84b9970b3 (diff)
Cygwin: implement case-insensitive Unicode user and group name matching
The previous revert enabled case-insensitive user names again. This patch implements the case-insensitive user and group name matching. To allow Unicode chars, implement the matcher using wchar_t chars in Cygwin-specific code. Keep the generic code changes as small as possible. Cygwin: implement case-insensitive Unicode user and group name matching Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Diffstat (limited to 'match.c')
-rw-r--r--match.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/match.c b/match.c
index bb3e95f67..b50ae4057 100644
--- a/match.c
+++ b/match.c
@@ -111,6 +111,8 @@ 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
114/* 116/*
115 * Tries to match the string against the 117 * Tries to match the string against the
116 * comma-separated sequence of subpatterns (each possibly preceded by ! to 118 * comma-separated sequence of subpatterns (each possibly preceded by ! to
@@ -170,6 +172,8 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
170 return got_positive; 172 return got_positive;
171} 173}
172 174
175#endif
176
173/* 177/*
174 * Tries to match the host name (which must be in all lowercase) against the 178 * Tries to match the host name (which must be in all lowercase) against the
175 * comma-separated sequence of subpatterns (each possibly preceded by ! to 179 * comma-separated sequence of subpatterns (each possibly preceded by ! to