From: Mark Eichin Date: Sat, 24 Feb 1996 00:29:47 +0000 (+0000) Subject: one step closer to *really* only depending on krb5.conf. (I don't know X-Git-Tag: krb5-1.0-beta6~488 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f22a2e012d9a2c725ce35cc07cc97c9521146764;p=krb5.git 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 * 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 --- 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 + + * 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 * 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; }