svn commit: r271617 - head/lib/libpam/modules/pam_login_access

Dag-Erling Smørgrav des at FreeBSD.org
Mon Sep 15 11:32:08 UTC 2014


Author: des
Date: Mon Sep 15 11:32:08 2014
New Revision: 271617
URL: http://svnweb.freebsd.org/changeset/base/271617

Log:
  r271256 fixed one segfault condition but introduced another due to the
  wrong operator being used in the tty check.
  
  Reported by:	avg@
  MFH:		3 days

Modified:
  head/lib/libpam/modules/pam_login_access/pam_login_access.c

Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c
==============================================================================
--- head/lib/libpam/modules/pam_login_access/pam_login_access.c	Mon Sep 15 11:17:36 2014	(r271616)
+++ head/lib/libpam/modules/pam_login_access/pam_login_access.c	Mon Sep 15 11:32:08 2014	(r271617)
@@ -86,7 +86,7 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
 			return (PAM_SUCCESS);
 		PAM_VERBOSE_ERROR("%s is not allowed to log in from %s",
 		    user, rhost);
-	} else if (tty != NULL || *(const char *)tty != '\0') {
+	} else if (tty != NULL && *(const char *)tty != '\0') {
 		PAM_LOG("Checking login.access for user %s on tty %s",
 		    (const char *)user, (const char *)tty);
 		if (login_access(user, tty) != 0)


More information about the svn-src-all mailing list