mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Refectoring on the DebugLog mechanism
The DebugLog implementation was modified to use shared memory to keep the information about the opened files and file handles. The modification was necessary to avoid race-conditions. This commit also closes the issue SpiderLabs/ModSecurity-nginx#17
This commit is contained in:
@@ -644,7 +644,14 @@ expression:
|
||||
| CONFIG_DIR_DEBUG_LOG
|
||||
{
|
||||
if (driver.m_debugLog != NULL) {
|
||||
driver.m_debugLog->setDebugLogFile($1);
|
||||
std::string error;
|
||||
driver.m_debugLog->setDebugLogFile($1, &error);
|
||||
if (error.size() > 0) {
|
||||
std::stringstream ss;
|
||||
ss << "Failed to start DebugLog: " << error;
|
||||
driver.error(@0, ss.str());
|
||||
YYERROR;
|
||||
}
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << "Internal error, there is no DebugLog ";
|
||||
|
Reference in New Issue
Block a user