mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 03:34:29 +03:00
Adds references to the collection variables
This commit is contained in:
committed by
Felipe Zimmerle
parent
e95efa05cc
commit
d851699529
@@ -21,6 +21,8 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
@@ -100,7 +102,6 @@ bool Parallel::init(std::string *error) {
|
||||
|
||||
|
||||
bool Parallel::write(Transaction *transaction, int parts, std::string *error) {
|
||||
FILE *fp;
|
||||
int fd;
|
||||
std::string log = transaction->toJSON(parts);
|
||||
std::string fileName = logFilePath(&transaction->m_timeStamp,
|
||||
@@ -139,9 +140,13 @@ bool Parallel::write(Transaction *transaction, int parts, std::string *error) {
|
||||
+ strerror(errno));
|
||||
return false;
|
||||
}
|
||||
fp = fdopen(fd, "w");
|
||||
fwrite(log.c_str(), log.length(), 1, fp);
|
||||
fclose(fp);
|
||||
close(fd);
|
||||
|
||||
std::ofstream myfile;
|
||||
std::string a(fileName.c_str());
|
||||
myfile.open (a);
|
||||
myfile << log;
|
||||
myfile.close();
|
||||
|
||||
if (m_audit->m_path1.empty() == false
|
||||
&& m_audit->m_path2.empty() == false) {
|
||||
|
Reference in New Issue
Block a user