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

Dag-Erling Smørgrav des at FreeBSD.org
Wed Oct 1 07:15:03 UTC 2014


Author: des
Date: Wed Oct  1 07:15:02 2014
New Revision: 272348
URL: https://svnweb.freebsd.org/changeset/base/272348

Log:
  Consistently cast tty and user to const char * in printf()-like contexts.

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	Wed Oct  1 05:43:29 2014	(r272347)
+++ head/lib/libpam/modules/pam_login_access/pam_login_access.c	Wed Oct  1 07:15:02 2014	(r272348)
@@ -85,20 +85,21 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int
 		if (login_access(user, rhost) != 0)
 			return (PAM_SUCCESS);
 		PAM_VERBOSE_ERROR("%s is not allowed to log in from %s",
-		    user, rhost);
+		    (const char *)user, (const char *)rhost);
 	} 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)
 			return (PAM_SUCCESS);
 		PAM_VERBOSE_ERROR("%s is not allowed to log in on %s",
-		    user, tty);
+		    (const char *)user, (const char *)tty);
 	} else {
 		PAM_LOG("Checking login.access for user %s",
 		    (const char *)user);
 		if (login_access(user, "***unknown***") != 0)
 			return (PAM_SUCCESS);
-		PAM_VERBOSE_ERROR("%s is not allowed to log in", user);
+		PAM_VERBOSE_ERROR("%s is not allowed to log in",
+		    (const char *)user);
 	}
 
 	return (PAM_AUTH_ERR);


More information about the svn-src-head mailing list