diff options
| author | Tom Yu <tlyu@mit.edu> | 2007-01-31 00:53:11 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2007-01-31 00:53:11 +0000 |
| commit | 7c225b931d85a61928cb6dfbff2e54801086990e (patch) | |
| tree | 84efad3d19568cdbb5ae4d72f9011ec8f5fc9264 /src/lib | |
| parent | a633bc0799f01a73297d3800b752c39db60c797b (diff) | |
Fix merge botches:
restore krb5_get_init_creds_opt_set_change_password_prompt()
undo accidental reversion of preauth_tryagain change to
krb5_get_init_creds()
ticket: 5420
status: open
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19131 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/krb5/krb/get_in_tkt.c | 33 | ||||
| -rw-r--r-- | src/lib/krb5/krb/gic_opt.c | 9 |
2 files changed, 30 insertions, 12 deletions
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index efde9147b..ee0a1127e 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -1114,18 +1114,27 @@ krb5_get_init_creds(krb5_context context, &get_data_rock, options))) goto cleanup; } else { - /* retrying after an error other than PREAUTH_NEEDED, using e-data - * to figure out what to change */ - if (krb5_do_preauth_tryagain(context, - &request, - encoded_request_body, - encoded_previous_request, - preauth_to_use, &request.padata, - err_reply, - &salt, &s2kparams, &etype, &as_key, - prompter, prompter_data, - gak_fct, gak_data, - &get_data_rock, options)) { + if (preauth_to_use != NULL) { + /* + * Retry after an error other than PREAUTH_NEEDED, + * using e-data to figure out what to change. + */ + ret = krb5_do_preauth_tryagain(context, + &request, + encoded_request_body, + encoded_previous_request, + preauth_to_use, &request.padata, + err_reply, + &salt, &s2kparams, &etype, + &as_key, + prompter, prompter_data, + gak_fct, gak_data, + &get_data_rock, options); + } else { + /* No preauth supplied, so can't query the plug-ins. */ + ret = KRB5KRB_ERR_GENERIC; + } + if (ret) { /* couldn't come up with anything better */ ret = err_reply->error + ERROR_TABLE_BASE_krb5; } diff --git a/src/lib/krb5/krb/gic_opt.c b/src/lib/krb5/krb/gic_opt.c index c96782088..bbf2eb286 100644 --- a/src/lib/krb5/krb/gic_opt.c +++ b/src/lib/krb5/krb/gic_opt.c @@ -64,6 +64,15 @@ krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt, krb5_data *salt) opt->salt = salt; } +void KRB5_CALLCONV +krb5_get_init_creds_opt_set_change_password_prompt(krb5_get_init_creds_opt *opt, int prompt) +{ + if (prompt) + opt->flags |= KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT; + else + opt->flags &= ~KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT; +} + /* * Extending the krb5_get_init_creds_opt structure. The original * krb5_get_init_creds_opt structure is defined publicly. The |
