From 0fa2da8177f7ddd6bea82437e6abff24e6ec1cdb Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Sun, 20 Nov 2022 13:19:56 +0000 Subject: [PATCH] Don't chroot() on OpenBSD (pledge() causes it to trap here) --- src/Telodendria.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Telodendria.c b/src/Telodendria.c index 3e593cd..6e5a8d5 100644 --- a/src/Telodendria.c +++ b/src/Telodendria.c @@ -386,6 +386,7 @@ main(int argc, char **argv) if (getuid() == 0) { +#ifndef __OpenBSD__ /* chroot() is only useful without unveil() */ if (chroot(".") == 0) { Log(lc, LOG_DEBUG, "Changed the root directory to: %s.", tConfig->dataDir); @@ -394,6 +395,7 @@ main(int argc, char **argv) { Log(lc, LOG_WARNING, "Unable to chroot into directory: %s.", tConfig->dataDir); } +#endif if (userInfo && groupInfo) {