2
0
mirror of https://github.com/rehlds/metamod-r.git synced 2024-12-27 07:05:34 +03:00

Load plugins with RTLD_DEEPBIND option

This commit is contained in:
asmodai 2017-07-27 19:59:35 +03:00
parent 7ffbf8f826
commit 25c9ee1bd7

View File

@ -62,7 +62,7 @@ static ElfW(Addr) dlsize(void* base)
module_handle_t CSysModule::load(const char* filepath) module_handle_t CSysModule::load(const char* filepath)
{ {
if (!m_handle) { if (!m_handle) {
m_handle = dlopen(filepath, RTLD_NOW); m_handle = dlopen(filepath, RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND);
char buf[1024], dummy[1024], path[260]; char buf[1024], dummy[1024], path[260];
sprintf(buf, "/proc/%i/maps", getpid()); sprintf(buf, "/proc/%i/maps", getpid());