5f484e443f
- fix potential race condition in fixproc script - fix DOS vulnerability on tcp connections help & ok sturm@
29 lines
1.0 KiB
Plaintext
29 lines
1.0 KiB
Plaintext
$OpenBSD: patch-agent_mibgroup_ucd-snmp_dlmod_c,v 1.2 2005/11/05 19:09:38 bernd Exp $
|
|
--- agent/mibgroup/ucd-snmp/dlmod.c.orig Fri May 20 23:34:43 2005
|
|
+++ agent/mibgroup/ucd-snmp/dlmod.c Thu Nov 3 23:31:04 2005
|
|
@@ -180,7 +180,12 @@ dlmod_load_module(struct dlmod *dlm)
|
|
if (dlm->status == DLMOD_ERROR)
|
|
return;
|
|
}
|
|
+#ifdef __ELF__
|
|
snprintf(sym_init, sizeof(sym_init), "init_%s", dlm->name);
|
|
+#else
|
|
+ snprintf(sym_init, sizeof(sym_init), "_init_%s", dlm->name);
|
|
+#endif
|
|
+
|
|
dl_init = dlsym(dlm->handle, sym_init);
|
|
if (dl_init == NULL) {
|
|
dlclose(dlm->handle);
|
|
@@ -204,7 +209,11 @@ dlmod_unload_module(struct dlmod *dlm)
|
|
if (!dlm || dlm->status != DLMOD_LOADED)
|
|
return;
|
|
|
|
+#ifdef __ELF__
|
|
snprintf(sym_deinit, sizeof(sym_deinit), "deinit_%s", dlm->name);
|
|
+#else
|
|
+ snprintf(sym_deinit, sizeof(sym_deinit), "_deinit_%s", dlm->name);
|
|
+#endif
|
|
dl_deinit = dlsym(dlm->handle, sym_deinit);
|
|
if (dl_deinit == NULL) {
|
|
snprintf(dlm->error, sizeof(dlm->error),
|