From 484cfbc800121c7961f94c98149a2f8abbd27501 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 14 Nov 2022 17:40:31 +0100 Subject: [PATCH] Call unveil() from srv_open() if on OpenBSD. --- data.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/data.c b/data.c index cb55415..88dceae 100644 --- a/data.c +++ b/data.c @@ -79,6 +79,12 @@ int srv_open(char *basedir) if (error != NULL) srv_log(error); +#ifdef __OpenBSD__ + srv_debug(2, xs_fmt("Calling unveil()")); + unveil(basedir, "rwc"); + unveil(NULL, NULL); +#endif /* __OpenBSD__ */ + return ret; }