[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

small fix for kpasswd...



Hello,

kpasswd has a small bug where kpasswd reports success to the user even if 
there is not an admin_server specified in the krb5.conf file.

The following fixes the problem for me:
=================================================================
@@ -271,7 +271,7 @@ krb5_change_password (krb5_context  conte
     if (ret)
        goto out;

-    while (krb5_krbhst_next(context, handle, &hi) == 0) {
+    while ((ret = krb5_krbhst_next(context, handle, &hi)) == 0) {
        struct addrinfo *ai, *a;

        ret = krb5_krbhst_get_addrinfo(context, hi, &ai);
=================================================================

With this, the correct error message is displayed to the user.  In the case of 
no admin_server specified, the list is empty and the check at the bottom of 
krb5_change_password for ret == KRB5_KDC_UNREACH isn't successful since ret 
was never set.

This is against the 0.4f.pre1 snapshot.

Thanks,
Wynn