Backport change to switch preference back to krb5_change_password() from
krb5_set_password(), which would only work against kadmin from krb5 1.7
or later. #676526
diff --git a/src/v5.c b/src/v5.c
index b3e4fcf..216c905 100644
--- a/src/v5.c
+++ b/src/v5.c
@@ -1884,28 +1884,30 @@ v5_cc_retrieve_match(void)
#endif
}
-#ifdef HAVE_KRB5_SET_PASSWORD
+#if defined(HAVE_KRB5_CHANGE_PASSWORD)
int
v5_change_password(krb5_context ctx, krb5_creds *creds, char *password,
int *result_code,
krb5_data *result_code_string,
krb5_data *result_string)
{
- return krb5_set_password(ctx, creds, password, creds->client,
- result_code,
- result_code_string, result_string);
+ return krb5_change_password(ctx, creds, password,
+ result_code,
+ result_code_string, result_string);
}
-#else
+#elif defined(HAVE_KRB5_SET_PASSWORD)
int
v5_change_password(krb5_context ctx, krb5_creds *creds, char *password,
int *result_code,
krb5_data *result_code_string,
krb5_data *result_string)
{
- return krb5_change_password(ctx, creds, password,
- result_code,
- result_code_string, result_string);
+ return krb5_set_password(ctx, creds, password, creds->client,
+ result_code,
+ result_code_string, result_string);
}
+#else
+#error "Don't know how to change passwords!"
#endif
int