summaryrefslogtreecommitdiff
path: root/modules/pam_access/pam_access.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2010-08-04 13:00:59 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2010-08-04 13:00:59 +0000
commit0e73991710adce250f8cc56040528ae25e68bad0 (patch)
tree61b59602b9e275313747ffee90039c88508e4934 /modules/pam_access/pam_access.c
parentc9dd97e696e70900869af7f50f647c2517aab405 (diff)
Relevant BUGIDs: #3035919, #3002340, #3037155
Purpose of commit: bugfix Commit summary: --------------- 2010-08-04 Thorsten Kukuk <kukuk@thkukuk.de> * 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.
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r--modules/pam_access/pam_access.c3
1 files changed, 2 insertions, 1 deletions
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;