summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMark Eichin <eichin@mit.edu>1996-02-24 00:29:47 +0000
committerMark Eichin <eichin@mit.edu>1996-02-24 00:29:47 +0000
commitf22a2e012d9a2c725ce35cc07cc97c9521146764 (patch)
treea7ec9e6b955068014190e139f888a494df84fc69 /src
parent7f4d534cdac7f2c4d534ea0b7115d2fdc5f4df17 (diff)
downloadkrb5-f22a2e012d9a2c725ce35cc07cc97c9521146764.tar.gz
krb5-f22a2e012d9a2c725ce35cc07cc97c9521146764.tar.xz
krb5-f22a2e012d9a2c725ce35cc07cc97c9521146764.zip
one step closer to *really* only depending on krb5.conf. (I don't know
of any others, but this was a big one.) Sat Feb 10 02:46:27 1996 Mark Eichin <eichin@cygnus.com> * main.c (initialize_realms): look for [kdc] profile=path for default alternate kdc profile (environment variable still overrides it.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7507 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/kdc/ChangeLog6
-rw-r--r--src/kdc/main.c21
2 files changed, 26 insertions, 1 deletions
diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog
index 168b6f270..6b62634e6 100644
--- a/src/kdc/ChangeLog
+++ b/src/kdc/ChangeLog
@@ -1,3 +1,9 @@
+Sat Feb 10 02:46:27 1996 Mark Eichin <eichin@cygnus.com>
+
+ * main.c (initialize_realms): look for [kdc] profile=path for
+ default alternate kdc profile (environment variable still
+ overrides it.)
+
Wed Feb 21 23:28:33 1996 Richard Basch <basch@lehman.com>
* kerberos_v4.c: Improve checking of DES keys
diff --git a/src/kdc/main.c b/src/kdc/main.c
index c05f2ee0a..6391bd74d 100644
--- a/src/kdc/main.c
+++ b/src/kdc/main.c
@@ -729,8 +729,25 @@ initialize_realms(kcontext, argc, argv)
krb5_pointer aprof;
const char *hierarchy[3];
extern char *optarg;
+ char *db_prof;
+
+ {
+ /* handle kdc file config */
+ const char* conf_names[3];
+ char **conf_val = 0;
+ conf_names[0] = "kdc";
+ conf_names[1] = "profile";
+ conf_names[2] = 0;
+
+ retval = profile_get_values(kcontext->profile, conf_names, &conf_val);
+ if(!retval && conf_val) {
+ db_prof = strdup(conf_val);
+ } else {
+ db_prof = strdup(DEFAULT_KDC_PROFILE);
+ }
+ }
- if (!krb5_aprof_init(DEFAULT_KDC_PROFILE, KDC_PROFILE_ENV, &aprof)) {
+ if (!krb5_aprof_init(db_prof, KDC_PROFILE_ENV, &aprof)) {
hierarchy[0] = "kdcdefaults";
hierarchy[1] = "kdc_ports";
hierarchy[2] = (char *) NULL;
@@ -830,6 +847,8 @@ initialize_realms(kcontext, argc, argv)
kdc_active_realm = kdc_realmlist[0];
if (default_ports)
free(default_ports);
+
+ free(db_prof);
return;
}