From 11e49bd76712b4e165d95cbafaff65fe1b1bb458 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Mon, 10 Feb 2003 10:01:52 +0000 Subject: [PATCH] (verify): move ret to where it's used git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11642 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/xnlock/xnlock.c | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/appl/xnlock/xnlock.c b/appl/xnlock/xnlock.c index 303eba273..f4613f309 100644 --- a/appl/xnlock/xnlock.c +++ b/appl/xnlock/xnlock.c @@ -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;