From f2004cdbca0cb79dc15ad3b91fc375c1dd687608 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Wed, 20 Jul 2011 19:14:34 +0000 Subject: Add krb5_init_context_profile API ticket: 6929 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25026 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/init_os_ctx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/lib/krb5/os/init_os_ctx.c') diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 98b8ae2307..1ed1bc0df7 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -358,7 +358,7 @@ os_init_paths(krb5_context ctx, krb5_boolean kdc) } krb5_error_code -krb5_os_init_context(krb5_context ctx, krb5_boolean kdc) +krb5_os_init_context(krb5_context ctx, profile_t profile, krb5_flags flags) { krb5_os_context os_ctx; krb5_error_code retval = 0; @@ -378,7 +378,11 @@ krb5_os_init_context(krb5_context ctx, krb5_boolean kdc) PLUGIN_DIR_INIT(&ctx->libkrb5_plugins); ctx->preauth_context = NULL; - retval = os_init_paths(ctx, kdc); + /* Use the profile we were handed, or create one from config files. */ + if (profile) + retval = profile_copy(profile, &ctx->profile); + else + retval = os_init_paths(ctx, (flags & KRB5_INIT_CONTEXT_KDC) != 0); if (retval) return retval; -- cgit