Skip to content

Commit

Permalink
Allow clock_gettime64 in seccomp, if present
Browse files Browse the repository at this point in the history
From discussion in #54
  • Loading branch information
ThomasHabets committed May 8, 2024
1 parent bbfa19a commit 20b8c97
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS($1), 0);

CHECK_SECCOMP_SYSCALL([fstat]);
CHECK_SECCOMP_SYSCALL([statx]);
CHECK_SECCOMP_SYSCALL([clock_gettime64]);
CHECK_SECCOMP_SYSCALL([nonexistent]);

AC_CONFIG_FILES([Makefile])
Expand Down
3 changes: 3 additions & 0 deletions src/arping.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,9 @@ static void drop_seccomp(int libnet_fd)
seccomp_allow(ctx, "newfstatat");
seccomp_allow(ctx, "exit_group");
seccomp_allow(ctx, "rt_sigreturn");
#if HAVE_SECCOMP_SYSCALL_clock_gettime64
seccomp_allow(ctx, "clock_gettime64");
#endif

// Load.
if (seccomp_load(ctx)) {
Expand Down

0 comments on commit 20b8c97

Please sign in to comment.