1
0
freeradius-server/freeradius-server-2.1.6-ltdl.patch

52 lines
1.9 KiB
Diff

Index: src/main/modules.c
===================================================================
--- src/main/modules.c.orig 2009-09-14 16:43:29.000000000 +0200
+++ src/main/modules.c 2009-12-17 13:23:09.000000000 +0100
@@ -411,7 +411,11 @@ static module_entry_t *linkto_module(con
/*
* 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",
Index: src/modules/rlm_eap/eap.c
===================================================================
--- src/modules/rlm_eap/eap.c.orig 2009-09-14 16:43:29.000000000 +0200
+++ src/modules/rlm_eap/eap.c 2009-12-17 13:23:09.000000000 +0100
@@ -83,7 +83,11 @@ int eaptype_load(EAP_TYPES **type, int e
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());
Index: src/modules/rlm_sql/rlm_sql.c
===================================================================
--- src/modules/rlm_sql/rlm_sql.c.orig 2009-09-14 16:43:29.000000000 +0200
+++ src/modules/rlm_sql/rlm_sql.c 2009-12-17 13:23:09.000000000 +0100
@@ -904,7 +904,11 @@ static int rlm_sql_instantiate(CONF_SECT
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, "Could not link driver %s: %s",
inst->config->sql_driver,