summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mraz <tm@t8m.info>2008-12-17 13:49:42 +0000
committerTomas Mraz <tm@t8m.info>2008-12-17 13:49:42 +0000
commit96377420e795eaa52f3d8017dfec557f8c5948a0 (patch)
tree849f8572c8250c683b8272b7921367ecdf5d776a
parente27b98c9a7358790088f47b3d5d24f39b3d9e858 (diff)
Relevant BUGIDs:
Purpose of commit: bugfix Commit summary: --------------- 2008-12-17 Tomas Mraz <t8m@centrum.cz> * modules/pam_tty_audit/pam_tty_audit.c (pam_sm_open_session): Do not abort on unknown option. Avoid double free of old_status. (pam_sm_close_session): Use LOG_DEBUG for restored status message.
-rw-r--r--ChangeLog6
-rw-r--r--modules/pam_tty_audit/pam_tty_audit.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c6de4582..6f14ba4d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-17 Tomas Mraz <t8m@centrum.cz>
+
+ * modules/pam_tty_audit/pam_tty_audit.c (pam_sm_open_session): Do
+ not abort on unknown option. Avoid double free of old_status.
+ (pam_sm_close_session): Use LOG_DEBUG for restored status message.
+
2008-12-12 Thorsten Kukuk <kukuk@thkukuk.de>
* release version 1.0.90
diff --git a/modules/pam_tty_audit/pam_tty_audit.c b/modules/pam_tty_audit/pam_tty_audit.c
index d57dbbe3..080f4950 100644
--- a/modules/pam_tty_audit/pam_tty_audit.c
+++ b/modules/pam_tty_audit/pam_tty_audit.c
@@ -240,7 +240,6 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
else
{
pam_syslog (pamh, LOG_ERR, "unknown option `%s'", argv[i]);
- return PAM_SESSION_ERR;
}
}
if (command == CMD_NONE)
@@ -265,7 +264,7 @@ pam_sm_open_session (pam_handle_t *pamh, int flags, int argc, const char **argv)
new_status.enabled = (command == CMD_ENABLE ? 1 : 0);
if (old_status->enabled == new_status.enabled)
{
- free (old_status);
+ open_only = 1; /* to clean up old_status */
goto ok_fd;
}
@@ -327,7 +326,7 @@ pam_sm_close_session (pam_handle_t *pamh, int flags, int argc,
return PAM_SESSION_ERR;
}
close (fd);
- pam_syslog (pamh, LOG_ERR, "restored status to %d", status->enabled);
+ pam_syslog (pamh, LOG_DEBUG, "restored status to %d", status->enabled);
}
return PAM_SUCCESS;
}