mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-01 06:09:03 +03:00
Refactoring on the audit logs implementation
Among of other things, it is now supporting shared file locks between different process.
This commit is contained in:
@@ -122,12 +122,15 @@ std::list<std::string> expandEnv(const std::string& var, int flags) {
|
||||
}
|
||||
|
||||
|
||||
void createDir(std::string dir, int mode) {
|
||||
#if defined _MSC_VER
|
||||
_mkdir(dir.data());
|
||||
#elif defined __GNUC__
|
||||
mkdir(dir.data(), mode);
|
||||
#endif
|
||||
bool createDir(std::string dir, int mode, std::string *error) {
|
||||
int ret = mkdir(dir.data(), mode);
|
||||
if (ret != 0 && errno != EEXIST) {
|
||||
error->assign("Not able to create directory: " + dir + ": " \
|
||||
+ strerror(errno) + ".");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user