From eec021cc4b4eb42bc9c8311755826828bfba1996 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 2 Jul 2025 21:31:29 +0900 Subject: hakurei: move container helpers toplevel Signed-off-by: Ophestra --- seccomp/libseccomp-helper.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 seccomp/libseccomp-helper.h (limited to 'seccomp/libseccomp-helper.h') diff --git a/seccomp/libseccomp-helper.h b/seccomp/libseccomp-helper.h new file mode 100644 index 00000000..330fc99b --- /dev/null +++ b/seccomp/libseccomp-helper.h @@ -0,0 +1,24 @@ +#include +#include + +#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 { + HAKUREI_EXPORT_MULTIARCH = 1 << 0, + HAKUREI_EXPORT_CAN = 1 << 1, + HAKUREI_EXPORT_BLUETOOTH = 1 << 2, +} hakurei_export_flag; + +struct hakurei_syscall_rule { + int syscall; + int m_errno; + struct scmp_arg_cmp *arg; +}; + +int32_t hakurei_export_filter(int *ret_p, int fd, uint32_t arch, + uint32_t multiarch, + struct hakurei_syscall_rule *rules, + size_t rules_sz, hakurei_export_flag flags); \ No newline at end of file -- cgit v1.3.1