krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_get_error(krb5_context context, krb5_get_init_creds_opt *opt, KRB_ERROR **error) { krb5_error_code ret; *error = NULL; ret = require_ext_opt(context, opt, "init_creds_opt_get_error"); if (ret) return ret; if (opt->opt_private->error == NULL) return 0; *error = malloc(sizeof(**error)); if (*error == NULL) { krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); return ENOMEM; } ret = copy_KRB_ERROR(opt->opt_private->error, *error); if (ret) krb5_clear_error_message(context); return 0; }
krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_set_pac_request(krb5_context context, krb5_get_init_creds_opt *opt, krb5_boolean req_pac) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req"); if (ret) return ret; opt->opt_private->req_pac = req_pac ? KRB5_INIT_CREDS_TRISTATE_TRUE : KRB5_INIT_CREDS_TRISTATE_FALSE; return 0; }
krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_set_pa_password(krb5_context context, krb5_get_init_creds_opt *opt, const char *password, krb5_s2k_proc key_proc) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_pa_password"); if (ret) return ret; opt->opt_private->password = password; opt->opt_private->key_proc = key_proc; return 0; }
krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_set_win2k(krb5_context context, krb5_get_init_creds_opt *opt, krb5_boolean req) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_win2k"); if (ret) return ret; if (req) opt->opt_private->flags |= KRB5_INIT_CREDS_NO_C_CANON_CHECK; else opt->opt_private->flags &= ~KRB5_INIT_CREDS_NO_C_CANON_CHECK; return 0; }
krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_set_canonicalize(krb5_context context, krb5_get_init_creds_opt *opt, krb5_boolean req) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_canonicalize"); if (ret) return ret; if (req) opt->opt_private->flags |= KRB5_INIT_CREDS_CANONICALIZE; else opt->opt_private->flags &= ~KRB5_INIT_CREDS_CANONICALIZE; return 0; }
krb5_error_code KRB5_LIB_FUNCTION krb5_get_init_creds_opt_set_addressless(krb5_context context, krb5_get_init_creds_opt *opt, krb5_boolean addressless) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_pac_req"); if (ret) return ret; if (addressless) opt->opt_private->addressless = KRB5_INIT_CREDS_TRISTATE_TRUE; else opt->opt_private->addressless = KRB5_INIT_CREDS_TRISTATE_FALSE; return 0; }
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_get_init_creds_opt_set_process_last_req(krb5_context context, krb5_get_init_creds_opt *opt, krb5_gic_process_last_req func, void *ctx) { krb5_error_code ret; ret = require_ext_opt(context, opt, "init_creds_opt_set_process_last_req"); if (ret) return ret; opt->opt_private->lr.func = func; opt->opt_private->lr.ctx = ctx; return 0; }