freeradius-server/freeradius-server-2.0.3-ltdl.patch

46 lines
1.3 KiB
Diff

--- src/main/modules.c
+++ src/main/modules.c
@@ -202,7 +202,11 @@
/*
* Keep the handle around so we can dlclose() it.
*/
- handle = lt_dlopenext(module_name);
+ char *tmp = malloc(strlen(module_name) + 4);
+ strcpy(tmp, module_name);
+ strcat(tmp, ".so");
+ handle = lt_dlopenext(tmp);
+ free(tmp);
if (handle == NULL) {
cf_log_err(cf_sectiontoitem(cs),
"Failed to link to module '%s': %s\n",
--- src/modules/rlm_eap/eap.c
+++ src/modules/rlm_eap/eap.c
@@ -83,7 +83,11 @@
snprintf(buffer, sizeof(buffer), "rlm_eap_%s", eaptype_name);
/* Link the loaded EAP-Type */
- handle = lt_dlopenext(buffer);
+ char *tmp = malloc(strlen(buffer) + 4);
+ strcpy(tmp, buffer);
+ strcat(tmp, ".so");
+ handle = lt_dlopenext(tmp);
+ free(tmp);
if (handle == NULL) {
radlog(L_ERR, "rlm_eap: Failed to link EAP-Type/%s: %s",
eaptype_name, lt_dlerror());
--- src/modules/rlm_sql/rlm_sql.c
+++ src/modules/rlm_sql/rlm_sql.c
@@ -820,7 +820,11 @@
return -1;
}
- inst->handle = lt_dlopenext(inst->config->sql_driver);
+ char *tmp = malloc(strlen(inst->config->sql_driver) + 4);
+ strcpy(tmp, inst->config->sql_driver);
+ strcat(tmp, ".so");
+ inst->handle = lt_dlopenext(tmp);
+ free(tmp);
if (inst->handle == NULL) {
radlog(L_ERR, "rlm_sql (%s): Could not link driver %s: %s",
inst->config->xlat_name, inst->config->sql_driver,