]> granicus.if.org Git - linux-pam/commitdiff
Relevant BUGIDs: 1427401
authorThorsten Kukuk <kukuk@thkukuk.de>
Wed, 22 Feb 2006 18:19:25 +0000 (18:19 +0000)
committerThorsten Kukuk <kukuk@thkukuk.de>
Wed, 22 Feb 2006 18:19:25 +0000 (18:19 +0000)
Purpose of commit: bugfix

Commit summary:
---------------

2006-02-22  Thorsten Kukuk  <kukuk@thkukuk.de>

        * configure.in: Fix check for incomplete libaudit installations
        (Patch from Ruediger Oertel <ro@suse.de>)

        * modules/pam_lastlog/pam_lastlog.c (last_login_write): Initialize
        correct last_login field [#1427401]

ChangeLog
configure.in
modules/pam_lastlog/pam_lastlog.c

index d5b2ee96a28c89a2a60e0e2a5e04fc9010e8a0c5..2a35d48bf2c929983397d843b6a1c40c44584c65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-22  Thorsten Kukuk  <kukuk@thkukuk.de>
+
+       * configure.in: Fix check for incomplete libaudit installations
+       (Patch from Ruediger Oertel <ro@suse.de>)
+
+       * modules/pam_lastlog/pam_lastlog.c (last_login_write): Initialize
+       correct last_login field [#1427401]
+
 2006-02-17  Thorsten Kukuk  <kukuk@thkukuk.de>
 
        * doc/man/Makefile.am: Add new manual pages.
index 10d65b216592fe9200b27b95980a7bcf8a5431fd..6959c852112b3bdc6434de4979514ead70709151 100644 (file)
@@ -307,10 +307,11 @@ AC_SUBST(LIBCRACK)
 AM_CONDITIONAL([HAVE_LIBCRACK], [test ! -z "$LIBCRACK"])
 
 dnl Look for Linux Auditing library - see documentation
-AC_CHECK_HEADER([libaudit.h])
-AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")
+AC_CHECK_HEADER([libaudit.h],
+  [AC_CHECK_LIB(audit, audit_log_user_message, LIBAUDIT=-laudit, LIBAUDIT="")]
+)
 AC_SUBST(LIBAUDIT)
-if test ! -z "$LIBAUDIT" ; then
+if test ! -z "$LIBAUDIT" -a "ac_cv_header_libaudit_h" != "no" ; then
     AC_DEFINE([HAVE_LIBAUDIT], 1, [Defined if audit support should be compiled in])
 fi
 
index 24a13ef671435fb960519ba6e5b0f024ed5becce..7e6353352b60417c870c65115e52ec7970cf9dad 100644 (file)
@@ -274,7 +274,7 @@ last_login_write(pam_handle_t *pamh, int announce, int last_fd,
     terminal_line = get_tty(pamh);
 
     /* copy to last_login */
-    last_login.ll_host[0] = '\0';
+    last_login.ll_line[0] = '\0';
     strncat(last_login.ll_line, terminal_line, sizeof(last_login.ll_line)-1);
     terminal_line = NULL;