summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mraz <tmraz@fedoraproject.org>2011-06-15 20:59:53 +0200
committerTomas Mraz <tmraz@fedoraproject.org>2011-06-15 20:59:53 +0200
commit50e4a02c87e91807db381cf308fdbf993a82105c (patch)
treea7b8d794afd40588e9faf68e88123e9f1f9cf003
parent2daaafacf771746a11849ada2166f8ac2bab1348 (diff)
Initialize the fake_item from item.
-rw-r--r--ChangeLog3
-rw-r--r--modules/pam_access/pam_access.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ab0e9b8..017de86c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,9 @@
memleak in error path.
(pam_sm_open_session): Avoid memleak and fd leak in error path.
+ * modules/pam_access/pam_access.c (user_match): Initialize the
+ fake_item from item.
+
2011-06-14 Thorsten Kukuk <kukuk@thkukuk.de>
* configure.in: Check for libtirpc by default.
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c
index daee47da..0eb1e8c6 100644
--- a/modules/pam_access/pam_access.c
+++ b/modules/pam_access/pam_access.c
@@ -525,6 +525,7 @@ user_match (pam_handle_t *pamh, char *tok, struct login_info *item)
/* split user@host pattern */
if (item->hostname == NULL)
return NO;
+ memcpy (&fake_item, item, sizeof(fake_item));
fake_item.from = item->hostname;
*at = 0;
return (user_match (pamh, tok, item) &&