summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2006-06-22 03:00:53 +0000
committerTom Yu <tlyu@mit.edu>2006-06-22 03:00:53 +0000
commit17485051a2b610cf496e78c7f644e6c8505e1e02 (patch)
treea7bfd0db6aab92fea97b0b696e66ed85ef5b3091 /src
parent9f842b34ae3503e72d536eb70322de008645196e (diff)
* src/util/support/plugins.c (krb5int_open_plugin): Use RTLD_LOCAL
instead of RTLD_GLOBAL. Use RTLD_GROUP if available. ticket: 3909 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18192 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/util/support/plugins.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util/support/plugins.c b/src/util/support/plugins.c
index 9d025942e..d0752e322 100644
--- a/src/util/support/plugins.c
+++ b/src/util/support/plugins.c
@@ -95,9 +95,14 @@ krb5int_open_plugin (const char *filepath, struct plugin_file_handle **h, struct
#if USE_DLOPEN
if (!err && (statbuf.st_mode & S_IFMT) == S_IFREG) {
void *handle = NULL;
+#ifdef RTLD_GROUP
+#define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL | RTLD_GROUP)
+#else
+#define PLUGIN_DLOPEN_FLAGS (RTLD_NOW | RTLD_LOCAL)
+#endif
if (!err) {
- handle = dlopen(filepath, RTLD_NOW | RTLD_GLOBAL);
+ handle = dlopen(filepath, PLUGIN_DLOPEN_FLAGS);
if (handle == NULL) {
const char *e = dlerror();
Tprintf ("dlopen(%s): %s\n", filepath, e);