Working autolog.

Signed-off-by: Edward Tomasz Napierala <trasz@FreeBSD.org>
This commit is contained in:
Edward Tomasz Napierala 2017-07-29 10:32:24 +01:00
commit e777ae986d
5 changed files with 73 additions and 5 deletions

View file

@ -127,7 +127,14 @@ int log_start_logging(LOG_REC *log)
/* path may contain variables (%time, $vars),
make sure the directory is created */
dir = g_path_get_dirname(log->real_fname);
#ifdef HAVE_CAPSICUM
if (capsicum_enabled())
capsicum_mkdir_with_parents(dir, log_dir_create_mode);
else
g_mkdir_with_parents(dir, log_dir_create_mode);
#else
g_mkdir_with_parents(dir, log_dir_create_mode);
#endif
g_free(dir);
}