use getpwnamn_r if it exists
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14842 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -145,7 +145,15 @@ krb5_kuserok (krb5_context context,
|
|||||||
krb5_error_code ret;
|
krb5_error_code ret;
|
||||||
krb5_boolean result = FALSE;
|
krb5_boolean result = FALSE;
|
||||||
|
|
||||||
pwd = getpwnam (luser); /* XXX - Should use k_getpwnam? */
|
#ifdef HAVE_GETPWNAM_R
|
||||||
|
char pwbuf[2048];
|
||||||
|
struct passwd pw;
|
||||||
|
|
||||||
|
if(getpwnam_r(luser, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0)
|
||||||
|
return FALSE;
|
||||||
|
#else
|
||||||
|
pwd = getpwnam (luser);
|
||||||
|
#endif
|
||||||
if (pwd == NULL)
|
if (pwd == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user