always load plugins with RTLD_LOCAL/RTLD_GROUP if available
This commit is contained in:

committed by
Nico Williams

parent
803efebca5
commit
befe1b8f90
@@ -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);
|
||||
|
@@ -33,21 +33,8 @@
|
||||
#include <config.h>
|
||||
#include <roken.h>
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_DLFCN_H
|
||||
#include <dlfcn.h>
|
||||
#ifndef RTLD_LAZY
|
||||
#define RTLD_LAZY 0
|
||||
#endif
|
||||
#ifndef RTLD_LOCAL
|
||||
#define RTLD_LOCAL 0
|
||||
#endif
|
||||
#ifndef RTLD_GROUP
|
||||
#define RTLD_GROUP 0
|
||||
#endif
|
||||
#ifndef RTLD_NODELETE
|
||||
#define RTLD_NODELETE 0
|
||||
#endif
|
||||
#else
|
||||
|
||||
#ifndef HAVE_DLFCN_H
|
||||
#error PKCS11 support requires dlfcn.h
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user