From d68b09a34869125238e0d355a6ecefcf77ad01c9 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 5 Jul 2023 18:25:17 +0200 Subject: seitan: If setfd is not set, don't add SECCOMP_ADDFD_FLAG_SETFD Signed-off-by: Stefano Brivio --- operations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'operations.c') diff --git a/operations.c b/operations.c index 5a882d9..c8af0ad 100644 --- a/operations.c +++ b/operations.c @@ -414,7 +414,7 @@ int op_fd(const struct seccomp_notif *req, int notifier, if (!desc) return -1; - resp.flags = SECCOMP_ADDFD_FLAG_SETFD; + resp.flags = desc->setfd ? SECCOMP_ADDFD_FLAG_SETFD : 0; resp.flags |= desc->do_return ? SECCOMP_ADDFD_FLAG_SEND : 0; resp.newfd_flags = desc->cloexec ? O_CLOEXEC : 0; resp.id = req->id; -- cgit v1.2.3