Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seccomp: honor SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV #1008

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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