From 0090318c6113828688e84fc50a13a8d9c5f71c55 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 5 Mar 2022 13:44:08 +0100 Subject: [PATCH] * lib-src/seccomp-filter.c (main): Use faccessat2 only if defined. --- lib-src/seccomp-filter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib-src/seccomp-filter.c b/lib-src/seccomp-filter.c index d368cbb46c8..b5158510104 100644 --- a/lib-src/seccomp-filter.c +++ b/lib-src/seccomp-filter.c @@ -240,7 +240,9 @@ main (int argc, char **argv) should be further restricted using mount namespaces. */ RULE (SCMP_ACT_ALLOW, SCMP_SYS (access)); RULE (SCMP_ACT_ALLOW, SCMP_SYS (faccessat)); +#ifdef __NR_faccessat2 RULE (SCMP_ACT_ALLOW, SCMP_SYS (faccessat2)); +#endif RULE (SCMP_ACT_ALLOW, SCMP_SYS (stat)); RULE (SCMP_ACT_ALLOW, SCMP_SYS (stat64)); RULE (SCMP_ACT_ALLOW, SCMP_SYS (lstat)); -- 2.39.2