Opens auditlog files and directories with the correct mode

Respecting the directives: SecAuditLogStorageDir and SecAuditLogFileMode
This commit is contained in:
Felipe Zimmerle
2015-07-10 18:38:12 -03:00
parent c9620ac50f
commit 5e33a1a3c4
7 changed files with 36 additions and 20 deletions

View File

@@ -69,11 +69,11 @@ std::string ascTime(time_t *t) {
}
void createDir(std::string dir) {
void createDir(std::string dir, int mode) {
#if defined _MSC_VER
_mkdir(dir.data());
#elif defined __GNUC__
mkdir(dir.data(), 0777);
mkdir(dir.data(), mode);
#endif
}