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

@@ -32,9 +32,6 @@
*/
#include "hx_locl.h"
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#ifdef HAVE_DLOPEN
@@ -849,7 +846,7 @@ p11_init(hx509_context context,
str = strnext;
}
p->dl_handle = dlopen(list, RTLD_NOW);
p->dl_handle = dlopen(list, RTLD_NOW | RTLD_LOCAL | RTLD_GROUP);
if (p->dl_handle == NULL) {
ret = HX509_PKCS11_LOAD;
hx509_set_error_string(context, 0, ret,