From c44d3f17519df7c25f1b0ab7ebfa370e622d76e3 Mon Sep 17 00:00:00 2001 From: psychon Date: Thu, 15 Jan 2009 18:56:36 +0000 Subject: [PATCH] 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 --- Modules.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules.cpp b/Modules.cpp index 584c8040..c05e9d92 100644 --- a/Modules.cpp +++ b/Modules.cpp @@ -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);