diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2019-03-06 22:14:23 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2019-03-08 15:10:07 +1100 |
commit | fd10cf027b56f9aaa80c9e3844626a05066589a4 (patch) | |
tree | d444bc6fe48f7254dcf17f36d56e485b5b604719 /groupaccess.c | |
parent | ab5fee8eb6a011002fd9e32b1597f02aa8804a25 (diff) |
upstream: Move checks for lists of users or groups into their own
function. This is a no-op on OpenBSD but will make things easier in
-portable, eg on systems where these checks should be case-insensitive. ok
djm@
OpenBSD-Commit-ID: 8bc9c8d98670e23f8eaaaefe29c1f98e7ba0487e
Diffstat (limited to 'groupaccess.c')
-rw-r--r-- | groupaccess.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/groupaccess.c b/groupaccess.c index 43367990d..80d301915 100644 --- a/groupaccess.c +++ b/groupaccess.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: groupaccess.c,v 1.16 2015/05/04 06:10:48 djm Exp $ */ | 1 | /* $OpenBSD: groupaccess.c,v 1.17 2019/03/06 22:14:23 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2001 Kevin Steves. All rights reserved. | 3 | * Copyright (c) 2001 Kevin Steves. All rights reserved. |
4 | * | 4 | * |
@@ -103,11 +103,8 @@ ga_match_pattern_list(const char *group_pattern) | |||
103 | int i, found = 0; | 103 | int i, found = 0; |
104 | 104 | ||
105 | for (i = 0; i < ngroups; i++) { | 105 | for (i = 0; i < ngroups; i++) { |
106 | #ifndef HAVE_CYGWIN | 106 | switch (match_usergroup_pattern_list(groups_byname[i], |
107 | switch (match_pattern_list(groups_byname[i], group_pattern, 0)) { | 107 | group_pattern)) { |
108 | #else | ||
109 | switch (match_pattern_list(groups_byname[i], group_pattern, 1)) { | ||
110 | #endif | ||
111 | case -1: | 108 | case -1: |
112 | return 0; /* Negated match wins */ | 109 | return 0; /* Negated match wins */ |
113 | case 0: | 110 | case 0: |