mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Use RTLD_NOW instead of RTLD_LAZY when dlopen()ing modules
Now a module with unresolved symbols will fail to load instead of potentially getting ZNC killed when an undefined symbol was used. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1332 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -723,7 +723,7 @@ bool CModules::LoadModule(const CString& sModule, const CString& sArgs, CUser* p
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int uDLFlags = RTLD_LAZY;
|
||||
unsigned int uDLFlags = RTLD_NOW;
|
||||
uDLFlags |= (pUser) ? RTLD_LOCAL : RTLD_GLOBAL;
|
||||
|
||||
void* p = dlopen((sModPath).c_str(), uDLFlags);
|
||||
|
||||
Reference in New Issue
Block a user