summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2025-01-05 14:00:13 +0100
committerGravatar default2025-01-05 14:00:13 +0100
commitbcd34f4959206491be82abbf3f7124b03a5deb27 (patch)
tree2f7185eb52e27629f42008a45a48e8f90a9078dc
parentAdded some autodetection for Linux landlocking on older systems. (diff)
downloadpenes-snac2-bcd34f4959206491be82abbf3f7124b03a5deb27.tar.gz
penes-snac2-bcd34f4959206491be82abbf3f7124b03a5deb27.tar.xz
penes-snac2-bcd34f4959206491be82abbf3f7124b03a5deb27.zip
More sandbox compilation tweaks under Alpine Linux.
-rw-r--r--README.md2
-rw-r--r--sandbox.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/README.md b/README.md
index 62bb910..23e7586 100644
--- a/README.md
+++ b/README.md
@@ -76,7 +76,7 @@ If it still gives compilation errors (because your system does not implement the
76make CFLAGS=-DWITHOUT_SHM 76make CFLAGS=-DWITHOUT_SHM
77``` 77```
78 78
79If compilation fails on Linux with the message `no landlock on kernels older than...` or complaining about not finding the `linux/landlock.h` header, then your system lacks support for Linux Landlock sandboxing (new in snac v2.68); to disable it, run 79If compilation fails on Linux with the message `no landlock on kernels older than...` or complaining about not being able to compile `sandbox.c`, then your system lacks support for Linux Landlock sandboxing (new in snac v2.68); to disable it, run
80 80
81```sh 81```sh
82make CFLAGS=-DWITHOUT_SANDBOX 82make CFLAGS=-DWITHOUT_SANDBOX
diff --git a/sandbox.c b/sandbox.c
index 0d82f58..f6f8d67 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -3,11 +3,13 @@
3#include "snac.h" 3#include "snac.h"
4 4
5#ifdef __linux__ 5#ifdef __linux__
6#ifndef WITHOUT_SANDBOX
6#include <linux/version.h> 7#include <linux/version.h>
7 8
8#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) 9#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0)
9#define WITHOUT_SANDBOX 10#define WITHOUT_SANDBOX
10#endif 11#endif
12#endif
11#endif /* __linux__ */ 13#endif /* __linux__ */
12 14
13 15