summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'match.c')
-rw-r--r--match.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/match.c b/match.c
index bb3e95f67..fcf69596d 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.c,v 1.38 2018/07/04 13:49:31 djm Exp $ */ 1/* $OpenBSD: match.c,v 1.39 2019/03/06 22:14:23 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -170,6 +170,19 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
170 return got_positive; 170 return got_positive;
171} 171}
172 172
173/* Match a list representing users or groups. */
174int
175match_usergroup_pattern_list(const char *string, const char *pattern)
176{
177#ifdef HAVE_CYGWIN
178 /* Windows usernames may be Unicode and are not case sensitive */
179 return cygwin_ug_match_pattern_list(string, pattern);
180#else
181 /* Case insensitive match */
182 return match_pattern_list(string, pattern, 0);
183#endif
184}
185
173/* 186/*
174 * Tries to match the host name (which must be in all lowercase) against the 187 * 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 188 * comma-separated sequence of subpatterns (each possibly preceded by ! to