aboutsummaryrefslogtreecommitdiff
path: root/sandbox.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-07-02 09:26:59 +0000
committerOmar Polo <op@omarpolo.com>2021-07-02 09:26:59 +0000
commit8bb8cf2ad488151879b1d7e5ec7436d38553b1b5 (patch)
tree0a7cfe2ef7c8d7778a61db4a534a4d3b690a34b2 /sandbox.c
parent137def5ff4c0f9720391ca88191cf9fee6d8ae9a (diff)
configure: add --disable-sandbox
Calling `configure' with --disable-sandbox will disable the sandbox support *completely* at compile time. gmid will still complain at compile time and during the startup. Users shouldn't disable the sandbox if possible, but instead report problem upstream so they get fixed (hopefully.) #4 related
Diffstat (limited to 'sandbox.c')
-rw-r--r--sandbox.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/sandbox.c b/sandbox.c
index 3f99f08..8b1244b 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -16,7 +16,30 @@
#include "gmid.h"
-#if defined(__FreeBSD__)
+#if DISABLE_SANDBOX
+
+#warning "Sandbox disabled! Please report issues upstream instead of disabling the sandbox."
+
+void
+sandbox_server_process(void)
+{
+ return;
+}
+
+void
+sandbox_executor_process(void)
+{
+ log_notice(NULL, "Sandbox disabled! "
+ "Please report issues upstream instead of disabling the sandbox.");
+}
+
+void
+sandbox_logger_process(void)
+{
+ return;
+}
+
+#elif defined(__FreeBSD__)
#include <sys/capsicum.h>