Hello,
In the Changelog I just saw that:
Dictionaries are now in /usr/local/share/freeradius
But for what I saw in the sources (cvs snapshot from 20030324),
dictionnaries are installed in /usr/local/share/freeradius but read from
/etc/raddb which leads to an error and radiusd not starting.
I made a quick patch to add a directive dictdir in the main radiusd.conf
file and use it from radiusd and it works.
BEWARE: This will not work with others binaries and a quick grep to the
source for the dict_init function says:
./main/radrelay.c
./main/radclient.c
./modules/rlm_dbm/rlm_dbm_parser.c
./modules/rlm_dictionary/rlm_dictionary.c
So modifications must be made to there sources to honor the dictdir
directive. I have not time to do this at once so enjoy yourself ;) I
just watched code and as I don't know how the CONF_PAIR and CONF_SECTION
work I didn't go on...
--
Christophe.
diff -urP plop.orig/src/main/mainconfig.c plop/src/main/mainconfig.c
--- plop.orig/src/main/mainconfig.c Wed Feb 19 16:28:07 2003
+++ plop/src/main/mainconfig.c Thu Mar 27 12:30:52 2003
@@ -57,6 +57,7 @@
*/
static const char *localstatedir = NULL;
static const char *prefix = NULL;
+static const char *dictdir = NULL;
/*
* Map the proxy server configuration parameters to variables.
@@ -93,6 +94,7 @@
* files.
*/
{ "prefix", PW_TYPE_STRING_PTR, 0, &prefix,
"/usr/local"},
+ { "dictdir", PW_TYPE_STRING_PTR, 0, &dictdir,
"${prefix}/share/freeradius"},
{ "localstatedir", PW_TYPE_STRING_PTR, 0, &localstatedir,
"${prefix}/var"},
{ "logdir", PW_TYPE_STRING_PTR, 0, &radlog_dir,
"${localstatedir}/log"},
{ "libdir", PW_TYPE_STRING_PTR, 0, &radlib_dir,
"${prefix}/lib"},
@@ -695,7 +697,7 @@
/* Initialize the dictionary */
DEBUG2("read_config_files: reading dictionary");
- if (dict_init(radius_dir, RADIUS_DICTIONARY) != 0) {
+ if (dict_init(dictdir, RADIUS_DICTIONARY) != 0) {
radlog(L_ERR|L_CONS, "Errors reading dictionary: %s",
librad_errstr);
cf_section_free(&cs);