Load plugins with RTLD_GLOBAL instead of RTLD_LOCAL. This fixes

problems with pam modules not having access to symbols provided by
libpam on some platforms.  Affects FreeBSD and SLES 10 at least.
This commit is contained in:
Todd C. Miller
2011-06-06 10:53:58 -04:00
parent 878c770000
commit 4f22a39803
2 changed files with 6 additions and 6 deletions

View File

@@ -54,8 +54,8 @@
#include "sudoers.h"
#ifndef RTLD_LOCAL
# define RTLD_LOCAL 0
#ifndef RTLD_GLOBAL
# define RTLD_GLOBAL 0
#endif
static void *group_handle;
@@ -109,7 +109,7 @@ group_plugin_load(char *plugin_info)
}
/* Open plugin and map in symbol. */
group_handle = dlopen(path, RTLD_LAZY|RTLD_LOCAL);
group_handle = dlopen(path, RTLD_LAZY|RTLD_GLOBAL);
if (!group_handle) {
warningx(_("unable to dlopen %s: %s"), path, dlerror());
goto done;