mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds ios::[open|app] to the parallel.cc to fix write over SELinux
This commit is contained in:
parent
48be601ca7
commit
082a0d3aca
@ -133,7 +133,7 @@ bool Parallel::write(Transaction *transaction, int parts, std::string *error) {
|
||||
return false;
|
||||
}
|
||||
|
||||
fd = open(fileName.c_str(), O_CREAT | O_WRONLY,
|
||||
fd = open(fileName.c_str(), O_CREAT | O_WRONLY | O_APPEND,
|
||||
m_audit->getFilePermission());
|
||||
if (fd < 0) {
|
||||
error->assign("Not able to open: " + fileName + ". " \
|
||||
@ -144,7 +144,7 @@ bool Parallel::write(Transaction *transaction, int parts, std::string *error) {
|
||||
|
||||
std::ofstream myfile;
|
||||
std::string a(fileName.c_str());
|
||||
myfile.open(a);
|
||||
myfile.open(a, std::ofstream::out | std::ofstream::app);
|
||||
myfile << log;
|
||||
myfile.close();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user