summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMiro Jurisic <meeroh@mit.edu>1999-07-26 16:34:48 +0000
committerMiro Jurisic <meeroh@mit.edu>1999-07-26 16:34:48 +0000
commit2fd5cdff2c634835c0b6e871a0720515ee4006a8 (patch)
tree02642d0d277a87524bccf4f0a4de958467c9d860 /src
parentec302dab0de052ced36051b4a577c60de07caf2c (diff)
downloadkrb5-2fd5cdff2c634835c0b6e871a0720515ee4006a8.tar.gz
krb5-2fd5cdff2c634835c0b6e871a0720515ee4006a8.tar.xz
krb5-2fd5cdff2c634835c0b6e871a0720515ee4006a8.zip
merged changes from the Mac_V2_0_derivatives branch and added krb5_get_profile
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11598 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/krb5/os/init_os_ctx.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c
index 668336c2b..edfbb5dc3 100644
--- a/src/lib/krb5/os/init_os_ctx.c
+++ b/src/lib/krb5/os/init_os_ctx.c
@@ -202,7 +202,7 @@ os_get_default_config_files(pfiles, secure)
#ifdef macintosh
files = malloc(3 * sizeof(FSSpec));
if (files != 0) {
- OSErr err = GetMacProfileFileSpec(&(files [0]), "\pkrb Configuration");
+ OSErr err = GetMacProfileFileSpec(&(files [0]), "\pKerberos5 Configuration");
if (err == noErr) {
err = GetMacProfileFileSpec( &(files [1]), "\pkrb5.ini");
}
@@ -391,6 +391,35 @@ krb5_os_init_context(ctx)
return retval;
}
+krb5_error_code
+krb5_get_profile (ctx, profile)
+ krb5_context ctx;
+ profile_t* profile;
+{
+ krb5_error_code retval = 0;
+ profile_filespec_t *files = 0;
+
+ retval = os_get_default_config_files(&files, ctx->profile_secure);
+
+ if (!retval)
+ retval = profile_init(files, profile);
+
+ if (files)
+ free_filespecs(files);
+
+ if (retval == ENOENT)
+ return KRB5_CONFIG_CANTOPEN;
+
+ if ((retval == PROF_SECTION_NOTOP) ||
+ (retval == PROF_SECTION_SYNTAX) ||
+ (retval == PROF_RELATION_SYNTAX) ||
+ (retval == PROF_EXTRA_CBRACE) ||
+ (retval == PROF_MISSING_OBRACE))
+ return KRB5_CONFIG_BADFORMAT;
+
+ return retval;
+}
+
#ifndef macintosh
krb5_error_code