From 7499adde081dc3aa8fe3e6065df3c564f9d5880b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Sat, 8 Dec 2007 23:52:12 +0000 Subject: [PATCH] Use hdb_db_dir(). git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22248 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kdc/config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/kdc/config.c b/kdc/config.c index fd0d0c717..bb1710f1d 100644 --- a/kdc/config.c +++ b/kdc/config.c @@ -45,7 +45,7 @@ struct dbinfo { struct dbinfo *next; }; -static const char *config_file; /* location of kdc config file */ +static char *config_file; /* location of kdc config file */ static int require_preauth = -1; /* 1 == require preauth for all principals */ static char *max_request_str; /* `max_request' as a string */ @@ -183,8 +183,11 @@ configure(krb5_context context, int argc, char **argv) { char **files; - if(config_file == NULL) - config_file = _PATH_KDC_CONF; + if (config_file == NULL) { + asprintf(&config_file, "%s/kdc.conf", hdb_db_dir(context)); + if (config_file == NULL) + errx(1, "out of memory"); + } ret = krb5_prepend_config_files_default(config_file, &files); if (ret)