From: Alan T. DeKok Date: Fri, 3 Jul 2015 13:17:33 +0000 (-0400) Subject: Show where we load the modules from. Fixes #1113 X-Git-Tag: release_3_0_9~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0135e2b217a6a6351f089170271cf69653caf78e;p=thirdparty%2Ffreeradius-server.git Show where we load the modules from. Fixes #1113 --- diff --git a/src/main/modules.c b/src/main/modules.c index dae684cf3bc..e0a845f90e3 100644 --- a/src/main/modules.c +++ b/src/main/modules.c @@ -109,7 +109,11 @@ const section_type_value_t section_type_value[MOD_COUNT] = { */ static int check_module_magic(CONF_SECTION *cs, module_t const *module) { + Dl_info dl_info; + dladdr(module, &dl_info); + if (MAGIC_PREFIX(module->magic) != MAGIC_PREFIX(RADIUSD_MAGIC_NUMBER)) { + cf_log_err_cs(cs, "Failed loading module rlm_%s from file %s", module->name, dl_info.dli_fname); cf_log_err_cs(cs, "Application and rlm_%s magic number (prefix) mismatch." " application: %x module: %x", module->name, MAGIC_PREFIX(RADIUSD_MAGIC_NUMBER), @@ -118,6 +122,7 @@ static int check_module_magic(CONF_SECTION *cs, module_t const *module) } if (MAGIC_VERSION(module->magic) != MAGIC_VERSION(RADIUSD_MAGIC_NUMBER)) { + cf_log_err_cs(cs, "Failed loading module rlm_%s from file %s", module->name, dl_info.dli_fname); cf_log_err_cs(cs, "Application and rlm_%s magic number (version) mismatch." " application: %lx module: %lx", module->name, (unsigned long) MAGIC_VERSION(RADIUSD_MAGIC_NUMBER), @@ -126,6 +131,7 @@ static int check_module_magic(CONF_SECTION *cs, module_t const *module) } if (MAGIC_COMMIT(module->magic) != MAGIC_COMMIT(RADIUSD_MAGIC_NUMBER)) { + cf_log_err_cs(cs, "Failed loading module rlm_%s from file %s", module->name, dl_info.dli_fname); cf_log_err_cs(cs, "Application and rlm_%s magic number (commit) mismatch." " application: %lx module: %lx", module->name, (unsigned long) MAGIC_COMMIT(RADIUSD_MAGIC_NUMBER),