svn commit: r209441 - releng/8.1/lib/libpam/modules/pam_lastlog

Dag-Erling Smorgrav des at FreeBSD.org
Tue Jun 22 19:56:07 UTC 2010


Author: des
Date: Tue Jun 22 19:56:07 2010
New Revision: 209441
URL: http://svn.freebsd.org/changeset/base/209441

Log:
  merge r196650 from head (via stable/8): tty might be NULL
  
  Approved by:	re (kib@)

Modified:
  releng/8.1/lib/libpam/modules/pam_lastlog/pam_lastlog.c
Directory Properties:
  releng/8.1/lib/libpam/   (props changed)

Modified: releng/8.1/lib/libpam/modules/pam_lastlog/pam_lastlog.c
==============================================================================
--- releng/8.1/lib/libpam/modules/pam_lastlog/pam_lastlog.c	Tue Jun 22 19:42:27 2010	(r209440)
+++ releng/8.1/lib/libpam/modules/pam_lastlog/pam_lastlog.c	Tue Jun 22 19:56:07 2010	(r209441)
@@ -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-all mailing list