Implement krb5_get_init_creds_opt_set_change_password_prompt()
This commit is contained in:

committed by
Nicolas Williams

parent
0ae6147483
commit
7422cd1f6b
@@ -195,6 +195,13 @@ krb5_get_init_creds_opt_set_default_flags(krb5_context context,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||||
|
krb5_get_init_creds_opt_set_change_password_prompt(krb5_get_init_creds_opt *opt,
|
||||||
|
int change_password_prompt)
|
||||||
|
{
|
||||||
|
opt->flags |= KRB5_GET_INIT_CREDS_OPT_CHANGE_PASSWORD_PROMPT;
|
||||||
|
opt->change_password_prompt = change_password_prompt;
|
||||||
|
}
|
||||||
|
|
||||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||||
krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt,
|
krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt,
|
||||||
|
@@ -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_tkt_life (options, 60);
|
||||||
krb5_get_init_creds_opt_set_forwardable (options, FALSE);
|
krb5_get_init_creds_opt_set_forwardable (options, FALSE);
|
||||||
krb5_get_init_creds_opt_set_proxiable (options, FALSE);
|
krb5_get_init_creds_opt_set_proxiable (options, FALSE);
|
||||||
if (old_options && old_options->flags & KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST)
|
if (old_options &&
|
||||||
krb5_get_init_creds_opt_set_preauth_list (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,
|
||||||
old_options->preauth_list_length);
|
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_code_string);
|
||||||
krb5_data_zero (&result_string);
|
krb5_data_zero (&result_string);
|
||||||
@@ -2684,6 +2689,10 @@ krb5_get_init_creds_password(krb5_context context,
|
|||||||
if (prompter == NULL)
|
if (prompter == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
if ((options->flags & KRB5_GET_INIT_CREDS_OPT_CHANGE_PASSWORD_PROMPT) &&
|
||||||
|
!options->change_password_prompt)
|
||||||
|
goto out;
|
||||||
|
|
||||||
ret = change_password (context,
|
ret = change_password (context,
|
||||||
client,
|
client,
|
||||||
ctx->password,
|
ctx->password,
|
||||||
|
@@ -748,6 +748,7 @@ struct _krb5_get_init_creds_opt {
|
|||||||
int forwardable;
|
int forwardable;
|
||||||
int proxiable;
|
int proxiable;
|
||||||
int anonymous;
|
int anonymous;
|
||||||
|
int change_password_prompt;
|
||||||
krb5_enctype *etype_list;
|
krb5_enctype *etype_list;
|
||||||
int etype_list_length;
|
int etype_list_length;
|
||||||
krb5_addresses *address_list;
|
krb5_addresses *address_list;
|
||||||
@@ -771,6 +772,7 @@ typedef struct _krb5_get_init_creds_opt krb5_get_init_creds_opt;
|
|||||||
#define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 /* no supported */
|
#define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 /* no supported */
|
||||||
#define KRB5_GET_INIT_CREDS_OPT_ANONYMOUS 0x0100
|
#define KRB5_GET_INIT_CREDS_OPT_ANONYMOUS 0x0100
|
||||||
#define KRB5_GET_INIT_CREDS_OPT_DISABLE_TRANSITED_CHECK 0x0200
|
#define KRB5_GET_INIT_CREDS_OPT_DISABLE_TRANSITED_CHECK 0x0200
|
||||||
|
#define KRB5_GET_INIT_CREDS_OPT_CHANGE_PASSWORD_PROMPT 0x0400
|
||||||
|
|
||||||
/* krb5_init_creds_step flags argument */
|
/* krb5_init_creds_step flags argument */
|
||||||
#define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x0001
|
#define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x0001
|
||||||
|
@@ -97,6 +97,11 @@ Kerberos 5 Library (libkrb5, -lkrb5)
|
|||||||
.Fa "int anonymous"
|
.Fa "int anonymous"
|
||||||
.Fc
|
.Fc
|
||||||
.Ft void
|
.Ft void
|
||||||
|
.Fo krb5_get_init_creds_opt_set_change_password_prompt
|
||||||
|
.Fa "krb5_get_init_creds_opt *opt"
|
||||||
|
.Fa "int change_password_prompt"
|
||||||
|
.Fc
|
||||||
|
.Ft void
|
||||||
.Fo krb5_get_init_creds_opt_set_default_flags
|
.Fo krb5_get_init_creds_opt_set_default_flags
|
||||||
.Fa "krb5_context context"
|
.Fa "krb5_context context"
|
||||||
.Fa "const char *appname"
|
.Fa "const char *appname"
|
||||||
|
@@ -350,6 +350,7 @@ EXPORTS
|
|||||||
krb5_get_init_creds_opt_set_address_list
|
krb5_get_init_creds_opt_set_address_list
|
||||||
krb5_get_init_creds_opt_set_addressless
|
krb5_get_init_creds_opt_set_addressless
|
||||||
krb5_get_init_creds_opt_set_anonymous
|
krb5_get_init_creds_opt_set_anonymous
|
||||||
|
krb5_get_init_creds_opt_set_change_password_prompt
|
||||||
krb5_get_init_creds_opt_set_canonicalize
|
krb5_get_init_creds_opt_set_canonicalize
|
||||||
krb5_get_init_creds_opt_set_default_flags
|
krb5_get_init_creds_opt_set_default_flags
|
||||||
krb5_get_init_creds_opt_set_etype_list
|
krb5_get_init_creds_opt_set_etype_list
|
||||||
|
@@ -346,6 +346,7 @@ HEIMDAL_KRB5_2.0 {
|
|||||||
krb5_get_init_creds_opt_set_address_list;
|
krb5_get_init_creds_opt_set_address_list;
|
||||||
krb5_get_init_creds_opt_set_addressless;
|
krb5_get_init_creds_opt_set_addressless;
|
||||||
krb5_get_init_creds_opt_set_anonymous;
|
krb5_get_init_creds_opt_set_anonymous;
|
||||||
|
krb5_get_init_creds_opt_set_change_password_prompt;
|
||||||
krb5_get_init_creds_opt_set_canonicalize;
|
krb5_get_init_creds_opt_set_canonicalize;
|
||||||
krb5_get_init_creds_opt_set_default_flags;
|
krb5_get_init_creds_opt_set_default_flags;
|
||||||
krb5_get_init_creds_opt_set_etype_list;
|
krb5_get_init_creds_opt_set_etype_list;
|
||||||
|
Reference in New Issue
Block a user