Description: Fix pam_tty_audit log_passwd support and regression.
 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.
Author: Tomas Mraz <tmraz@fedoraproject.org>
Origin: upstream, https://github.com/linux-pam/linux-pam/commit/c5f829931a22c65feffee16570efdae036524bee
Bug-Ubuntu: https://launchpad.net/bugs/1666203
--- pam-1.1.8.orig/modules/pam_tty_audit/pam_tty_audit.c
+++ pam-1.1.8/modules/pam_tty_audit/pam_tty_audit.c
@@ -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,
       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;
