From: Theodore Tso Date: Mon, 1 May 1995 17:29:03 +0000 (+0000) Subject: init_os_ctx.c (krb5_set_config_files): New function. Provides a X-Git-Tag: krb5-1.0-beta5~85 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fb50f4390983e90f121829bfe469eb2a462678c6;p=krb5.git init_os_ctx.c (krb5_set_config_files): New function. Provides a way to set a new set of config files for a particular OS context. init_os_ctx.c (krb5_os_init_context): Don't return an error if profile_init() returns an error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5668 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 7d7792bef..db46bdf58 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -3,6 +3,15 @@ Sun Apr 30 16:03:59 1995 Ezra Peisach * osconfig.c: Global variables krb5_config_file and krb5_trans_file conditionalized on OLD_CONFIG_FILES. +Sat Apr 29 07:07:22 1995 Theodore Y. Ts'o + + * init_os_ctx.c (krb5_set_config_files): New function. Provides a + way to set a new set of config files for a particular OS + context. + + * init_os_ctx.c (krb5_os_init_context): Don't return an error if + profile_init() returns an error. + Fri Apr 28 09:58:31 EDT 1995 Paul Park (pjpark@mit.edu) Move adm_conn.c from libkrb5 to libkadm. diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index bb742b157..b12a61a76 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -79,8 +79,32 @@ krb5_os_init_context(ctx) if (retval) ctx->profile = 0; #endif + /* + * We ignore errors if the profile can not be initialized, + * since there must be a way to get a context even if the + * default krb5.conf file doesn't exist. + */ + + return 0; +} + +krb5_error_code INTERFACE +krb5_set_config_files(ctx, filenames) + krb5_context ctx; + char **filenames; +{ + krb5_error_code retval; + profile_t profile; + + retval = profile_init(filenames, &profile); + if (retval) + return retval; + + if (ctx->profile) + profile_release(ctx->profile); + ctx->profile = profile; - return retval; + return 0; } void