diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-08-19 11:07:17 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-08-20 07:44:15 +0200 |
commit | 325f919847cb23044d203501140d9030903cfe12 (patch) | |
tree | 5f07be629585cdba01c0fa5742f7bbd1cbf6fbd2 /syslogd/logfile.c | |
parent | 61bc850984db2f31970865a724b120543e679dec (diff) |
usyslogd: chroot into log dir and drop privileges
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'syslogd/logfile.c')
-rw-r--r-- | syslogd/logfile.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/syslogd/logfile.c b/syslogd/logfile.c index 6240905..513b027 100644 --- a/syslogd/logfile.c +++ b/syslogd/logfile.c @@ -29,9 +29,6 @@ #include "util.h" -#define SYSLOG_PATH PREFIXPATH "/var/log" - - static const enum_map_t levels[] = { { "emergency", 0 }, { "alert", 1 }, @@ -204,18 +201,6 @@ static int file_backend_init(log_backend_t *backend, int flags, { log_backend_file_t *log = (log_backend_file_t *)backend; - if (mkdir(SYSLOG_PATH, 0755)) { - if (errno != EEXIST) { - perror("mkdir " SYSLOG_PATH); - return -1; - } - } - - if (chdir(SYSLOG_PATH)) { - perror("cd " SYSLOG_PATH); - return -1; - } - log->flags = flags; log->maxsize = sizelimit; return 0; |