From owner-svn-src-head@FreeBSD.ORG Wed Oct 1 07:15:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38015558; Wed, 1 Oct 2014 07:15:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2453A1DF; Wed, 1 Oct 2014 07:15:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s917F3Mt012077; Wed, 1 Oct 2014 07:15:03 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s917F3gG012076; Wed, 1 Oct 2014 07:15:03 GMT (envelope-from des@FreeBSD.org) Message-Id: <201410010715.s917F3gG012076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Wed, 1 Oct 2014 07:15:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272348 - head/lib/libpam/modules/pam_login_access X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Oct 2014 07:15:03 -0000 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);