Package: pam
Version: 1.1.8-3.6
Followup-For: Bug #778664
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch

Dear Maintainer,


In Ubuntu, the attached patch was applied to achieve the following:

The patch fixes the issue, please see LP bug 1666203.
Following fix was
implemented as mentioned by the reporter of the LP bug: 
https://github.com/linux-pam/linux-pam/commit/c5f829931a22c65feffee16570efdae036524bee

I tested the patch and it indeed resolves the issue: pam_tty_audit now
works as expected and users are still able to login after adding:
session required pam_tty_audit.so enable=root
to
/etc/pam.d/common-session

"aureport --tty" shows the expected output.

  * Fix: pam_tty_audit failed in pam_open_session (LP: #1666203)


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers bionic-updates
  APT policy: (500, 'bionic-updates'), (500, 'bionic-security'), (500, 
'bionic'), (100, 'bionic-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-44-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru pam-1.1.8/debian/control pam-1.1.8/debian/control
--- pam-1.1.8/debian/control    2018-04-04 23:56:02.000000000 +0200
+++ pam-1.1.8/debian/control    2019-02-03 01:01:57.000000000 +0100
@@ -2,8 +2,7 @@
 Section: libs
 Priority: optional
 Uploaders: Sam Hartman <hartm...@debian.org>, Roger Leigh <rle...@debian.org>
-Maintainer: Ubuntu Developers <ubuntu-devel-disc...@lists.ubuntu.com>
-XSBC-Original-Maintainer: Steve Langasek <vor...@debian.org>
+Maintainer: Steve Langasek <vor...@debian.org>
 Standards-Version: 3.9.8
 Build-Depends: libcrack2-dev (>= 2.8), bzip2, debhelper (>= 9), quilt (>= 
0.48-1), flex, libdb-dev, libselinux1-dev [linux-any], po-debconf, 
dh-autoreconf, autopoint, libaudit-dev [linux-any], pkg-config, libfl-dev, 
libfl-dev:native, docbook-xsl, docbook-xml, xsltproc, libxml2-utils, w3m
 Build-Conflicts-Indep: fop
diff -Nru pam-1.1.8/modules/pam_tty_audit/pam_tty_audit.c 
pam-1.1.8/modules/pam_tty_audit/pam_tty_audit.c
--- pam-1.1.8/modules/pam_tty_audit/pam_tty_audit.c     2018-04-04 
23:56:02.000000000 +0200
+++ pam-1.1.8/modules/pam_tty_audit/pam_tty_audit.c     2019-02-03 
01:01:57.000000000 +0100
@@ -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 @@
       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;

Reply via email to