Implement krb5_get_init_creds_opt_set_change_password_prompt()

This commit is contained in:
Florian Best
2015-11-30 16:20:32 +01:00
committed by Nicolas Williams
parent 0ae6147483
commit 7422cd1f6b
6 changed files with 29 additions and 4 deletions

View File

@@ -540,10 +540,15 @@ change_password (krb5_context context,
krb5_get_init_creds_opt_set_tkt_life (options, 60);
krb5_get_init_creds_opt_set_forwardable (options, FALSE);
krb5_get_init_creds_opt_set_proxiable (options, FALSE);
if (old_options && old_options->flags & KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST)
krb5_get_init_creds_opt_set_preauth_list (options,
old_options->preauth_list,
old_options->preauth_list_length);
if (old_options &&
(old_options->flags & KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST))
krb5_get_init_creds_opt_set_preauth_list(options,
old_options->preauth_list,
old_options->preauth_list_length);
if (old_options &&
(old_options->flags & KRB5_GET_INIT_CREDS_OPT_CHANGE_PASSWORD_PROMPT))
krb5_get_init_creds_opt_set_change_password_prompt(options,
old_options->change_password_prompt);
krb5_data_zero (&result_code_string);
krb5_data_zero (&result_string);
@@ -2684,6 +2689,10 @@ krb5_get_init_creds_password(krb5_context context,
if (prompter == NULL)
goto out;
if ((options->flags & KRB5_GET_INIT_CREDS_OPT_CHANGE_PASSWORD_PROMPT) &&
!options->change_password_prompt)
goto out;
ret = change_password (context,
client,
ctx->password,