aboutsummaryrefslogtreecommitdiffhomepage
path: root/seccomp/seccomp-build.h
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-14 22:42:40 +0900
committerOphestra <cat@gensokyo.uk>2025-03-14 22:42:40 +0900
commit2647a71be1f287e50011a65653b9e9c806627899 (patch)
tree252dd8865632df348b7573ca6f31c04e4cb6c9e5 /seccomp/seccomp-build.h
parent7c60a4d8e8baa77b42789c041838fa82dd7d36f9 (diff)
seccomp: move out of helper
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'seccomp/seccomp-build.h')
-rw-r--r--seccomp/seccomp-build.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/seccomp/seccomp-build.h b/seccomp/seccomp-build.h
new file mode 100644
index 00000000..7f1be761
--- /dev/null
+++ b/seccomp/seccomp-build.h
@@ -0,0 +1,23 @@
+#include <stdint.h>
+#include <seccomp.h>
+
+#if (SCMP_VER_MAJOR < 2) || \
+ (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR < 5) || \
+ (SCMP_VER_MAJOR == 2 && SCMP_VER_MINOR == 5 && SCMP_VER_MICRO < 1)
+#error This package requires libseccomp >= v2.5.1
+#endif
+
+typedef enum {
+ F_VERBOSE = 1 << 0,
+ F_EXT = 1 << 1,
+ F_DENY_NS = 1 << 2,
+ F_DENY_TTY = 1 << 3,
+ F_DENY_DEVEL = 1 << 4,
+ F_MULTIARCH = 1 << 5,
+ F_LINUX32 = 1 << 6,
+ F_CAN = 1 << 7,
+ F_BLUETOOTH = 1 << 8,
+} f_syscall_opts;
+
+extern void F_println(char *v);
+int32_t f_build_filter(int *ret_p, int fd, uint32_t arch, uint32_t multiarch, f_syscall_opts opts); \ No newline at end of file