aboutgitcodelistschat:MatrixIRC
path: root/operations.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2023-07-05 18:25:17 +0200
committerStefano Brivio <sbrivio@redhat.com>2023-07-05 18:27:56 +0200
commitd68b09a34869125238e0d355a6ecefcf77ad01c9 (patch)
treeef38b9239f8d014a97521988835390fa724fa194 /operations.c
parent86ceb944ecbbbc0b10871fbd7e8462bda8aceb07 (diff)
downloadseitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar.gz
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar.bz2
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar.lz
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar.xz
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.tar.zst
seitan-d68b09a34869125238e0d355a6ecefcf77ad01c9.zip
seitan: If setfd is not set, don't add SECCOMP_ADDFD_FLAG_SETFD
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'operations.c')
-rw-r--r--operations.c2
1 files changed, 1 insertions, 1 deletions
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;