(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:
Love Hörnquist Åstrand
2003-03-13 19:53:43 +00:00
parent 42111080d7
commit 175d6d3dbf

View File

@@ -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)