Probable boolean logic error

Michael McConville mmcco at mykolab.com
Tue Dec 5 23:28:08 EST 2017


Hi guys.

The below if condition is obviously always true in its current state.
It seems that the author meant to use && rather than ||.

Thanks for your time,
Michael McConville
University of Utah

diff --git a/src/windows/leashdll/krb5routines.c b/src/windows/leashdll/krb5routines.c
index 3911720ae..ff5eb4980 100644
--- a/src/windows/leashdll/krb5routines.c
+++ b/src/windows/leashdll/krb5routines.c
@@ -255,7 +255,7 @@ LeashKRB5_renew(void)
     pkrb5_cc_set_flags(ctx, cc, KRB5_TC_NOTICKET);
 #endif
     if (code) {
-        if ( code != KRB5KDC_ERR_ETYPE_NOSUPP ||
+        if ( code != KRB5KDC_ERR_ETYPE_NOSUPP &&
              code != KRB5_KDC_UNREACH)
             Leash_krb5_error(code, "krb5_get_renewed_creds()", 0, &ctx, &cc);
         goto cleanup;


More information about the krbdev mailing list