summaryrefslogtreecommitdiff
path: root/libpam
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2007-07-06 08:23:13 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2007-07-06 08:23:13 +0000
commit4e66efa10ee4ea4dc5fcb22e48050ee7fd032187 (patch)
tree8acd12a91c51e5bbcaf53e70c619c3aeca55fd95 /libpam
parentd6b09ee15e6d0d9fe2a5e8383b39208edcc3c843 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix, release Commit summary: --------------- 2007-07-06 Thorsten Kukuk <kukuk@thkukuk.de> * release version 0.99.8.0 * configure.in: Check for audit_log_acct_message instead of audit_log_user_message. * libpam/pam_audit.c: Use audit_log_acct_message. Based on patch from Mark J Cox <mjc@redhat.com>. * libpam/Makefile.am: Bump version number of libpam. * modules/pam_umask/pam_umask.c (set_umask): mode_t is 32bit, not 64bit. * xtests/tst-pam_limits1.c: Fix printf arguments. * po/*.po: Merge po files with latest code changes.
Diffstat (limited to 'libpam')
-rw-r--r--libpam/Makefile.am2
-rw-r--r--libpam/pam_audit.c16
2 files changed, 9 insertions, 9 deletions
diff --git a/libpam/Makefile.am b/libpam/Makefile.am
index e96d6df8..33100e48 100644
--- a/libpam/Makefile.am
+++ b/libpam/Makefile.am
@@ -20,7 +20,7 @@ include_HEADERS = include/security/_pam_compat.h \
noinst_HEADERS = pam_prelude.h pam_private.h pam_tokens.h \
pam_modutil_private.h pam_static_modules.h
-libpam_la_LDFLAGS = -no-undefined -version-info 81:6:81 \
+libpam_la_LDFLAGS = -no-undefined -version-info 81:7:81 \
@LIBAUDIT@ $(LIBPRELUDE_LIBS) @LIBDL@
if STATIC_MODULES
libpam_la_LDFLAGS += `ls ../modules/pam_*/*.lo` \
diff --git a/libpam/pam_audit.c b/libpam/pam_audit.c
index ff1486aa..18a98f1f 100644
--- a/libpam/pam_audit.c
+++ b/libpam/pam_audit.c
@@ -27,18 +27,18 @@ _pam_audit_writelog(pam_handle_t *pamh, int audit_fd, int type,
{
static int old_errno = -1;
int rc;
- char buf[256];
+ char buf[32];
- snprintf(buf, sizeof(buf), "PAM: %s acct=%s ", message,
- (retval != PAM_USER_UNKNOWN && pamh->user) ? pamh->user : "?");
+ snprintf(buf, sizeof(buf), "PAM:%s", message);
- rc = audit_log_user_message( audit_fd, type, buf,
- pamh->rhost, NULL, pamh->tty, retval == PAM_SUCCESS );
+ rc = audit_log_acct_message (audit_fd, type, NULL, buf,
+ (retval != PAM_USER_UNKNOWN && pamh->user) ? pamh->user : "?",
+ -1, pamh->rhost, NULL, pamh->tty, retval == PAM_SUCCESS );
if (rc == -1 && errno != old_errno)
{
old_errno = errno;
- pam_syslog(pamh, LOG_CRIT, "audit_log_user_message() failed: %m");
+ pam_syslog (pamh, LOG_CRIT, "audit_log_acct_message() failed: %m");
}
pamh->audit_state |= PAMAUDIT_LOGGED;
@@ -73,11 +73,11 @@ _pam_auditlog(pam_handle_t *pamh, int action, int retval, int flags)
type = AUDIT_USER_AUTH;
break;
case PAM_OPEN_SESSION:
- message = "session open";
+ message = "session_open";
type = AUDIT_USER_START;
break;
case PAM_CLOSE_SESSION:
- message = "session close";
+ message = "session_close";
type = AUDIT_USER_END;
break;
case PAM_ACCOUNT: