]> granicus.if.org Git - linux-pam/commitdiff
Fix pam_tty_audit log_passwd support and regression.
authorTomas Mraz <tmraz@fedoraproject.org>
Wed, 25 Sep 2013 10:40:05 +0000 (12:40 +0200)
committerTomas Mraz <tmraz@fedoraproject.org>
Wed, 25 Sep 2013 10:40:05 +0000 (12:40 +0200)
modules/pam_tty_audit/pam_tty_audit.c: Add missing "config.h" include.
(pam_sm_open_session): Always copy the old status as initialization of new.

modules/pam_tty_audit/pam_tty_audit.c

index 7dc373956fff72cc63d65b071927fc523b1f970b..cc862550e3831619fc8b252ba7ab220a0a443787 100644 (file)
@@ -36,6 +36,7 @@
    USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
    DAMAGE. */
 
+#include "config.h"
 #include <errno.h>
 #include <fnmatch.h>
 #include <stdlib.h>
@@ -275,6 +276,8 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
       return PAM_SESSION_ERR;
     }
 
+  memcpy(&new_status, old_status, sizeof(new_status));
+
   new_status.enabled = (command == CMD_ENABLE ? 1 : 0);
 #ifdef HAVE_STRUCT_AUDIT_TTY_STATUS_LOG_PASSWD
   new_status.log_passwd = log_passwd;