(verify): move ret to where it's used

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11642 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2003-02-10 10:01:52 +00:00
parent 54a243b5ba
commit 11e49bd767

View File

@@ -618,8 +618,6 @@ verify_krb5(const char *password)
static int
verify(char *password)
{
int ret;
/*
* First try with root password, if allowed.
*/
@@ -664,19 +662,22 @@ verify(char *password)
#endif
#ifdef KRB4
/*
* Try to verify as user with kerberos 4.
*/
ret = krb_verify_user(name, inst, realm, password,
KRB_VERIFY_NOT_SECURE, NULL);
if (ret == KSUCCESS){
if (k_hasafs())
krb_afslog(NULL, NULL);
return 0;
{
int ret;
/*
* Try to verify as user with kerberos 4.
*/
ret = krb_verify_user(name, inst, realm, password,
KRB_VERIFY_NOT_SECURE, NULL);
if (ret == KSUCCESS){
if (k_hasafs())
krb_afslog(NULL, NULL);
return 0;
}
if (ret != INTK_BADPW)
warnx ("warning: %s",
(ret < 0) ? strerror(ret) : krb_get_err_text(ret));
}
if (ret != INTK_BADPW)
warnx ("warning: %s",
(ret < 0) ? strerror(ret) : krb_get_err_text(ret));
#endif
return -1;