From 91f40d8592562b804813a320a4ac3871dbaaf433 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 22 Feb 2013 11:37:00 +1100 Subject: - (djm) [configure.ac sandbox-seccomp-filter.c] Support for Linux seccomp-bpf sandbox on ARM. Patch from shawnlandden AT gmail.com; ok dtucker --- sandbox-seccomp-filter.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sandbox-seccomp-filter.c') diff --git a/sandbox-seccomp-filter.c b/sandbox-seccomp-filter.c index ef2b13c4f..e12418399 100644 --- a/sandbox-seccomp-filter.c +++ b/sandbox-seccomp-filter.c @@ -44,6 +44,7 @@ #include #include #include +#include #include @@ -90,7 +91,9 @@ static const struct sock_filter preauth_insns[] = { SC_DENY(open, EACCES), SC_ALLOW(getpid), SC_ALLOW(gettimeofday), +#ifdef __NR_time /* not defined on EABI ARM */ SC_ALLOW(time), +#endif SC_ALLOW(read), SC_ALLOW(write), SC_ALLOW(close), @@ -102,7 +105,12 @@ static const struct sock_filter preauth_insns[] = { SC_ALLOW(select), #endif SC_ALLOW(madvise), +#ifdef __NR_mmap2 /* EABI ARM only has mmap2() */ + SC_ALLOW(mmap2), +#endif +#ifdef __NR_mmap SC_ALLOW(mmap), +#endif SC_ALLOW(munmap), SC_ALLOW(exit_group), #ifdef __NR_rt_sigprocmask -- cgit v1.2.3