svn commit: r209430 - stable/8/lib/libpam/modules/pam_lastlog
Dag-Erling Smorgrav
des at FreeBSD.org
Tue Jun 22 15:01:23 UTC 2010
Author: des
Date: Tue Jun 22 15:01:23 2010
New Revision: 209430
URL: http://svn.freebsd.org/changeset/base/209430
Log:
merge r196650 (check that tty != NULL, prevents segfault on session close)
Modified:
stable/8/lib/libpam/modules/pam_lastlog/pam_lastlog.c
Directory Properties:
stable/8/lib/libpam/ (props changed)
Modified: stable/8/lib/libpam/modules/pam_lastlog/pam_lastlog.c
==============================================================================
--- stable/8/lib/libpam/modules/pam_lastlog/pam_lastlog.c Tue Jun 22 10:46:57 2010 (r209429)
+++ stable/8/lib/libpam/modules/pam_lastlog/pam_lastlog.c Tue Jun 22 15:01:23 2010 (r209430)
@@ -183,6 +183,11 @@ pam_sm_close_session(pam_handle_t *pamh
pam_err = pam_get_item(pamh, PAM_TTY, (const void **)&tty);
if (pam_err != PAM_SUCCESS)
goto err;
+ if (tty == NULL) {
+ PAM_LOG("No PAM_TTY");
+ pam_err = PAM_SERVICE_ERR;
+ goto err;
+ }
if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0)
tty = (const char *)tty + strlen(_PATH_DEV);
if (*(const char *)tty == '\0')
More information about the svn-src-stable
mailing list