summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1995-05-01 17:29:03 +0000
committerTheodore Tso <tytso@mit.edu>1995-05-01 17:29:03 +0000
commitfb50f4390983e90f121829bfe469eb2a462678c6 (patch)
treee99e9362fca158c0ca29b63d4fb1858a65a008d6 /src/lib
parent76a16d1dfaad6ef981dd5540241ec1b360a6debf (diff)
downloadkrb5-fb50f4390983e90f121829bfe469eb2a462678c6.tar.gz
krb5-fb50f4390983e90f121829bfe469eb2a462678c6.tar.xz
krb5-fb50f4390983e90f121829bfe469eb2a462678c6.zip
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/os/ChangeLog9
-rw-r--r--src/lib/krb5/os/init_os_ctx.c26
2 files changed, 34 insertions, 1 deletions
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 <epeisach@kangaroo.mit.edu>
* 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 <tytso@lurch.mit.edu>
+
+ * 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