aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-08-23 20:30:39 +0000
committerOmar Polo <op@omarpolo.com>2023-08-23 20:30:39 +0000
commit618b1d4dce6d4780943594cb278977b52001ab22 (patch)
tree3d94b3d900aa4f3c5608efe3d9a6cd2c8fd7bf50
parent4d9d3093d48025a1a66c125f7878a094cf2c9d10 (diff)
resurrect openlog() + tzset() in the logger
They're not needed on OpenBSD nor in other systems... except under sandbox. These were added for capsicum() if I remember correctly, but also with landlock it's better to initialize these things earlier.
-rw-r--r--logger.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/logger.c b/logger.c
index 7949bd5..36ccaa3 100644
--- a/logger.c
+++ b/logger.c
@@ -61,6 +61,10 @@ static void
logger_init(struct privsep *ps, struct privsep_proc *p, void *arg)
{
p->p_shutdown = logger_shutdown;
+
+ openlog(getprogname(), LOG_NDELAY, LOG_DAEMON);
+ tzset();
+
sandbox_logger_process();
}