Error messages from krb5_set_password

Jonathan Reams jreams at columbia.edu
Thu Feb 14 19:00:51 EST 2013


After upgrading from krb5-1.9.4 to krb5-1.11, our password sync plugin
started showing "Password change failed" for all our
password synchronizations, even though testing shows that password changes
succeed. Between these two versions, it looks like this function changed
how it gets the value of result_code_string, and that the
new krb5_chpw_result_code_string function has no value for success - which
is why it defaults to "Password change failed." It's just a cosmetic thing,
but I think this patch should bring back the reassuring "Success" message
to 1.11:

diff --git a/src/lib/krb5/krb/chpw.c b/src/lib/krb5/krb/chpw.c
index 76f415d..b67a588 100644
--- a/src/lib/krb5/krb/chpw.c
+++ b/src/lib/krb5/krb/chpw.c
@@ -269,6 +269,9 @@ krb5_chpw_result_code_string(krb5_context context, int
result_code,
     case KRB5_KPASSWD_INITIAL_FLAG_NEEDED:
         *code_string = _("Initial password required");
         break;
+    case 0:
+        *code_string = _("Success");
+        break;
     default:
         *code_string = _("Password change failed");
         break;

Does that make sense?

Jonathan


More information about the krbdev mailing list