diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2010-08-04 13:00:59 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2010-08-04 13:00:59 +0000 |
commit | 0e73991710adce250f8cc56040528ae25e68bad0 (patch) | |
tree | 61b59602b9e275313747ffee90039c88508e4934 /modules/pam_access/pam_access.c | |
parent | c9dd97e696e70900869af7f50f647c2517aab405 (diff) | |
download | pam-0e73991710adce250f8cc56040528ae25e68bad0.tar.gz pam-0e73991710adce250f8cc56040528ae25e68bad0.tar.bz2 pam-0e73991710adce250f8cc56040528ae25e68bad0.zip |
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.c | 3 |
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; |