summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-06-05 06:41:44 +0100
committerColin Watson <cjwatson@debian.org>2019-06-05 06:41:44 +0100
commit102062f825fb26a74295a1c089c00c4c4c76b68a (patch)
tree3db66bc8c8483cce66516dff36f6ef56065143d9 /match.c
parent3d246f10429fc9a37b98eabef94fe8dc7c61002b (diff)
parentfd0fa130ecf06d7d092932adcd5d77f1549bfc8d (diff)
Import openssh_8.0p1.orig.tar.gz
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