Lines Matching refs:krb5_ctx
87 struct krb5_ctx *ctx = (struct krb5_ctx *) memctx;
96 static struct krb5_ctx *
99 struct krb5_ctx *krb5_ctx;
106 krb5_ctx = talloc_zero(mem_ctx, struct krb5_ctx);
107 if (!krb5_ctx) return NULL;
109 krb5_ctx->illegal_path_re = pcre_compile2(ILLEGAL_PATH_PATTERN, 0,
111 if (krb5_ctx->illegal_path_re == NULL) {
117 talloc_set_destructor((TALLOC_CTX *) krb5_ctx, re_destructor);
120 krb5_ctx->opts = talloc_zero_array(krb5_ctx, struct dp_option, KRB5_OPTS);
121 if (!krb5_ctx->opts) goto fail;
123 krb5_ctx->opts[i].opt_name = default_krb5_opts[i].opt_name;
124 krb5_ctx->opts[i].type = default_krb5_opts[i].type;
125 krb5_ctx->opts[i].def_val = default_krb5_opts[i].def_val;
126 switch (krb5_ctx->opts[i].type) {
128 ret = dp_opt_set_string(krb5_ctx->opts, i,
132 ret = dp_opt_set_blob(krb5_ctx->opts, i,
136 ret = dp_opt_set_int(krb5_ctx->opts, i,
140 ret = dp_opt_set_bool(krb5_ctx->opts, i,
147 ret = dp_opt_set_string(krb5_ctx->opts, KRB5_REALM, realm);
150 return krb5_ctx;
153 talloc_free(krb5_ctx);
212 kr->krb5_ctx = create_dummy_krb5_ctx(kr, realm);
213 if (!kr->krb5_ctx) {
215 "Failed to create dummy krb5_ctx\n");
226 ret = krb5_get_simple_upn(kr, kr->krb5_ctx, NULL, kr->pd->user, NULL,
235 ret = dp_opt_set_string(kr->krb5_ctx->opts, KRB5_CCNAME_TMPL,
241 ret = dp_opt_set_int(kr->krb5_ctx->opts, KRB5_AUTH_TIMEOUT, timeout);
250 dp_opt_get_cstring(kr->krb5_ctx->opts,
252 kr->krb5_ctx->illegal_path_re, true, true);