(krb5_kuserok): preserve old behviour of function and return FALSE
when there isn't a local account for `luser'. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11707 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -51,6 +51,10 @@ krb5_kuserok (krb5_context context,
|
||||
krb5_error_code ret;
|
||||
krb5_boolean b;
|
||||
|
||||
pwd = getpwnam (luser); /* XXX - Should use k_getpwnam? */
|
||||
if (pwd == NULL)
|
||||
return FALSE;
|
||||
|
||||
ret = krb5_get_default_realms (context, &realms);
|
||||
if (ret)
|
||||
return FALSE;
|
||||
@@ -78,9 +82,6 @@ krb5_kuserok (krb5_context context,
|
||||
}
|
||||
krb5_free_host_realm (context, realms);
|
||||
|
||||
pwd = getpwnam (luser); /* XXX - Should use k_getpwnam? */
|
||||
if (pwd == NULL)
|
||||
return FALSE;
|
||||
snprintf (buf, sizeof(buf), "%s/.k5login", pwd->pw_dir);
|
||||
f = fopen (buf, "r");
|
||||
if (f == NULL)
|
||||
|
Reference in New Issue
Block a user