From 142a1d783f9738d32bae20d2ea136969ce9007c1 Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Wed, 18 Aug 2021 21:03:14 -0300 Subject: [PATCH] Add statx to seccomp rules Add statx to seccomp rules as a fallback for newfstatat. This is specially important for the case where the newfstatat system call is not available on a platform using glibc >= 2.33 Signed-off-by: Athos Ribeiro --- main/seccomp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main/seccomp.c b/main/seccomp.c index 27e704ead6..f87b353513 100644 --- a/main/seccomp.c +++ b/main/seccomp.c @@ -46,6 +46,10 @@ int installSyscallFilter (void) #ifdef __SNR_newfstatat seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (newfstatat), 0); #endif +#ifdef __SNR_statx + // armhf fallback + seccomp_rule_add (ctx, SCMP_ACT_ALLOW, SCMP_SYS (statx), 0); +#endif // seems unnecessary, but this comes from // main/parse.c:2764 : tagFilePosition (&tagfpos);