Skip to content

Commit

Permalink
Merge pull request #1008 from giuseppe/seccomp-wait-killable-recv
Browse files Browse the repository at this point in the history
seccomp: honor SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV
  • Loading branch information
flouthoc authored Sep 7, 2022
2 parents f8ab021 + 396ac88 commit d99dc2c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libcrun/seccomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
# define SECCOMP_FILTER_FLAG_SPEC_ALLOW (1UL << 2)
#endif

#ifndef SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV
# define SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV (1UL << 5)
#endif

static int
syscall_seccomp (unsigned int operation, unsigned int flags, void *args)
{
Expand Down Expand Up @@ -209,6 +213,8 @@ libcrun_apply_seccomp (int infd, int listener_receiver_fd, const char *receiver_
flags |= SECCOMP_FILTER_FLAG_SPEC_ALLOW;
else if (strcmp (seccomp_flags[i], "SECCOMP_FILTER_FLAG_LOG") == 0)
flags |= SECCOMP_FILTER_FLAG_LOG;
else if (strcmp (seccomp_flags[i], "SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV") == 0)
flags |= SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV;
else
return crun_make_error (err, 0, "unknown seccomp option %s", seccomp_flags[i]);
}
Expand Down

0 comments on commit d99dc2c

Please sign in to comment.