aboutsummaryrefslogtreecommitdiff
path: root/modules/pam_group/pam_group.c
diff options
context:
space:
mode:
authorSteve Langasek <vorlon@debian.org>2010-08-31 17:23:27 -0700
committerSteve Langasek <vorlon@debian.org>2019-01-08 21:47:21 -0800
commit6c6f451aff56e368041dd4076ad61d8f51635b7f (patch)
treeed1162733e6688167c56704ffbf4e63c602abf35 /modules/pam_group/pam_group.c
parent0b7e86d2422eb0ddabce5ffcd59ee31525a4e8af (diff)
parentb70316c593cbc8e5c9155e5c6597497090c6eb88 (diff)
downloadpam-6c6f451aff56e368041dd4076ad61d8f51635b7f.tar.gz
pam-6c6f451aff56e368041dd4076ad61d8f51635b7f.tar.bz2
pam-6c6f451aff56e368041dd4076ad61d8f51635b7f.zip
merge upstream version 1.1.2
Diffstat (limited to 'modules/pam_group/pam_group.c')
-rw-r--r--modules/pam_group/pam_group.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c
index 3dc7f78e..310b2622 100644
--- a/modules/pam_group/pam_group.c
+++ b/modules/pam_group/pam_group.c
@@ -660,6 +660,9 @@ static int check_account(pam_handle_t *pamh, const char *service,
/* If buffer starts with @, we are using netgroups */
if (buffer[0] == '@')
good &= innetgr (&buffer[1], NULL, user, NULL);
+ /* otherwise, if the buffer starts with %, it's a UNIX group */
+ else if (buffer[0] == '%')
+ good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]);
else
good &= logic_field(pamh,user, buffer, count, is_same);
D(("with user: %s", good ? "passes":"fails" ));