summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sandbox.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/sandbox.c b/sandbox.c
index 4a49f07..0d82f58 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -1,17 +1,28 @@
1#include "xs.h"
2
3#include "snac.h"
4
5#ifdef __linux__
6#include <linux/version.h>
7
8#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
9#define WITHOUT_SANDBOX
10#endif
11#endif /* __linux__ */
12
13
1#ifdef WITHOUT_SANDBOX 14#ifdef WITHOUT_SANDBOX
2 15
3void sbox_enter(const char *basedir) 16void sbox_enter(const char *basedir)
4{ 17{
5 /* nothing to do */ 18 /* nothing to do */
6 (void)basedir; 19 (void)basedir;
20
21 srv_debug(0, xs_fmt("Linux sandboxing disabled or unsupported"));
7} 22}
8 23
9#else /* WITHOUT_SANDBOX */ 24#else /* WITHOUT_SANDBOX */
10 25
11#include "xs.h"
12
13#include "snac.h"
14
15#include <unistd.h> 26#include <unistd.h>
16 27
17#if defined (__linux__) 28#if defined (__linux__)