From 0e73991710adce250f8cc56040528ae25e68bad0 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 4 Aug 2010 13:00:59 +0000 Subject: Relevant BUGIDs: #3035919, #3002340, #3037155 Purpose of commit: bugfix Commit summary: --------------- 2010-08-04 Thorsten Kukuk * modules/pam_access/pam_access.c (user_match): Make sure that user@host will not match @@netgroup. Bug #3035919. * modules/pam_group/pam_group.c (check_account): Add '%' for UNIX groups. * modules/pam_group/group.conf: Add example for '%'. * modules/pam_group/group.conf.5.xml: Document '%' syntax. Bug #3002340, #3037155. --- modules/pam_access/pam_access.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/pam_access') diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index e9f0caa3..daee47da 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -521,7 +521,8 @@ user_match (pam_handle_t *pamh, char *tok, struct login_info *item) * name of the user's primary group. */ - if ((at = strchr(tok + 1, '@')) != 0) { /* split user@host pattern */ + if (tok[0] != '@' && (at = strchr(tok + 1, '@')) != 0) { + /* split user@host pattern */ if (item->hostname == NULL) return NO; fake_item.from = item->hostname; -- cgit v1.2.3