From 50e4a02c87e91807db381cf308fdbf993a82105c Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Wed, 15 Jun 2011 20:59:53 +0200 Subject: [PATCH] Initialize the fake_item from item. --- ChangeLog | 3 +++ modules/pam_access/pam_access.c | 1 + 2 files changed, 4 insertions(+) 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 * 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) && -- 2.40.0