Date: Mon, 29 Sep 2014 11:20:20 +0000 From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: Dimitry Andric <dim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r272281 - head/lib/libpam/modules/pam_login_access Message-ID: <4929EC39-0862-4547-B044-44C396529F74@FreeBSD.org> In-Reply-To: <A31E0109-A986-451F-8472-D548868AD4AD@FreeBSD.org> References: <201409291036.s8TAaFUs040310@svn.freebsd.org> <A31E0109-A986-451F-8472-D548868AD4AD@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 Sep 2014, at 11:10 , Dimitry Andric <dim@FreeBSD.org> wrote: > On 29 Sep 2014, at 12:36, Bjoern A. Zeeb <bz@FreeBSD.org> wrote: >> Author: bz >> Date: Mon Sep 29 10:36:14 2014 >> New Revision: 272281 >> URL: http://svnweb.freebsd.org/changeset/base/272281 >>=20 >> Log: >> Hopefully fix build breakage with gcc passing void * instead of char = * >> to "%s" format string after r272280. >>=20 >> PR: 83099 193927 >> MFC after: 3 days >> X-MFC with: r272280 >>=20 >> Modified: >> head/lib/libpam/modules/pam_login_access/pam_login_access.c >>=20 >> Modified: head/lib/libpam/modules/pam_login_access/pam_login_access.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 08:57:36 2014 (r272280) >> +++ head/lib/libpam/modules/pam_login_access/pam_login_access.c = Mon Sep 29 10:36:14 2014 (r272281) >> @@ -94,7 +94,8 @@ pam_sm_acct_mgmt(pam_handle_t *pamh, int >> PAM_VERBOSE_ERROR("%s is not allowed to log in on %s", >> user, tty); >> } else { >> - PAM_LOG("Checking login.access for user %s", user); >> + PAM_LOG("Checking login.access for user %s", >> + (const char *)user); >> if (login_access(user, "***unknown***") !=3D 0) >> return (PAM_SUCCESS); >> PAM_VERBOSE_ERROR("%s is not allowed to log in", user); >>=20 >=20 > Just a few lines after the one you fixed it accesses the same variable > again. Why doesn't it warn there? And why is 'user' not a char * to > begin with? :) For the latter ask des. the PAM_VERBOSE_ERROR goes into a function which (if remembering = correctly) does the va_start and asprintf rather than just being a macro = to printf. The arguments are not casted anywhere to that macro but I = am, again, sure des will have an opinion on it;-) =97=20 Bjoern A. Zeeb "Come on. Learn, goddamn it.", WarGames, 1983
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4929EC39-0862-4547-B044-44C396529F74>