Adding DEBUGs to read_config_files. Often little troubles like DNS
will cause a config file read to hang and the user previously had no
way to debug it.
char buffer[256];
/* Initialize the dictionary */
char buffer[256];
/* Initialize the dictionary */
+ DEBUG2("read_config_files: reading dictionary");
if (dict_init(radius_dir, RADIUS_DICTIONARY) != 0) {
radlog(L_ERR|L_CONS, "Errors reading dictionary: %s",
librad_errstr);
if (dict_init(radius_dir, RADIUS_DICTIONARY) != 0) {
radlog(L_ERR|L_CONS, "Errors reading dictionary: %s",
librad_errstr);
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_CLIENTS);
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_CLIENTS);
+ DEBUG2("read_config_files: reading clients");
if (read_clients_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading clients");
return -1;
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_REALMS);
if (read_clients_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading clients");
return -1;
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_REALMS);
+ DEBUG2("read_config_files: reading realms");
if (read_realms_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading realms");
return -1;
}
if (read_realms_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading realms");
return -1;
}
+ DEBUG2("read_config_files: reading radiusd.conf");
if (read_radius_conf_file() < 0) {
radlog(L_ERR|L_CONS, "Errors reading radiusd.conf");
return -1;
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_NASLIST);
if (read_radius_conf_file() < 0) {
radlog(L_ERR|L_CONS, "Errors reading radiusd.conf");
return -1;
}
sprintf(buffer, "%.200s/%.50s", radius_dir, RADIUS_NASLIST);
+ DEBUG2("read_config_files: reading naslist");
if (read_naslist_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading naslist");
return -1;
}
if (read_naslist_file(buffer) < 0) {
radlog(L_ERR|L_CONS, "Errors reading naslist");
return -1;
}
+ DEBUG2("read_config_files: entering modules setup");
if (setup_modules() < 0) {
radlog(L_ERR|L_CONS, "Errors setting up modules");
return -1;
if (setup_modules() < 0) {
radlog(L_ERR|L_CONS, "Errors setting up modules");
return -1;