Use sudo_dso_load() from libsudo_util.so instead of dlopen() since
we no longer link sudo directly with libdl.so.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2009-2012 Todd C. Miller <Todd.Miller@courtesan.com>
|
* Copyright (c) 2009-2014 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
* purpose with or without fee is hereby granted, provided that the above
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
# include <project.h>
|
# include <project.h>
|
||||||
# include <sys/task.h>
|
# include <sys/task.h>
|
||||||
#endif
|
#endif
|
||||||
#include <dlfcn.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
#include "sudo.h"
|
#include "sudo.h"
|
||||||
|
#include "sudo_dso.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
os_init(int argc, char *argv[], char *envp[])
|
os_init(int argc, char *argv[], char *envp[])
|
||||||
@@ -57,8 +57,8 @@ os_init(int argc, char *argv[], char *envp[])
|
|||||||
* without this. We must keep the handle open for it to work.
|
* without this. We must keep the handle open for it to work.
|
||||||
* This bug was fixed in Solaris 11 Update 1.
|
* This bug was fixed in Solaris 11 Update 1.
|
||||||
*/
|
*/
|
||||||
void *handle = dlopen("/usr/lib/locale/common/methods_unicode.so.3",
|
void *handle = sudo_dso_load("/usr/lib/locale/common/methods_unicode.so.3",
|
||||||
RTLD_LAZY|RTLD_GLOBAL);
|
SUDO_DSO_LAZY|SUDO_DSO_GLOBAL);
|
||||||
(void)&handle;
|
(void)&handle;
|
||||||
|
|
||||||
return os_init_common(argc, argv, envp);
|
return os_init_common(argc, argv, envp);
|
||||||
|
Reference in New Issue
Block a user