always load plugins with RTLD_LOCAL/RTLD_GROUP if available

This commit is contained in:
Luke Howard
2018-12-31 12:46:29 +11:00
committed by Nico Williams
parent 803efebca5
commit befe1b8f90
9 changed files with 39 additions and 61 deletions

View File

@@ -36,13 +36,6 @@
#include <engine.h>
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#ifndef RTLD_NOW
#define RTLD_NOW 0
#endif
#endif
struct hc_engine {
int references;
char *name;
@@ -313,7 +306,7 @@ ENGINE_by_dso(const char *path, const char *id)
if (engine == NULL)
return NULL;
handle = dlopen(path, RTLD_NOW);
handle = dlopen(path, RTLD_NOW | RTLD_LOCAL | RTLD_GROUP);
if (handle == NULL) {
/* printf("error: %s\n", dlerror()); */
free(engine);