summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2022-03-05 13:44:08 +0100
committerAndreas Schwab <schwab@linux-m68k.org>2022-03-05 14:41:22 +0100
commit0090318c6113828688e84fc50a13a8d9c5f71c55 (patch)
tree5ae102a65fc9f66770c9a9dc0552f7095bfba2b8
parent3bb01a499bb828a8705d5f1772732ef5de18254c (diff)
downloademacs-0090318c6113828688e84fc50a13a8d9c5f71c55.tar.gz
* lib-src/seccomp-filter.c (main): Use faccessat2 only if defined.
-rw-r--r--lib-src/seccomp-filter.c2
1 files changed, 2 insertions, 0 deletions
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));