]> granicus.if.org Git - linux-pam/commitdiff
Initialize the fake_item from item.
authorTomas Mraz <tmraz@fedoraproject.org>
Wed, 15 Jun 2011 18:59:53 +0000 (20:59 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Wed, 15 Jun 2011 18:59:53 +0000 (20:59 +0200)
ChangeLog
modules/pam_access/pam_access.c

index 3ab0e9b8e137a0be222f4230f9b3d88999d690b0..017de86c6d4502e5a98716936dd58d8cb3ee8b0a 100644 (file)
--- 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.
index daee47daaf7b3c93922d9607b5e796de8db54385..0eb1e8c6e1bb7e819273f09ebfa8325d7e976d15 100644 (file)
@@ -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) &&