aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-02-16 10:24:55 +0100
committerAlice Frosi <afrosi@redhat.com>2023-02-16 10:24:55 +0100
commitfe5c40a83620a870e32777b779fbbd2833d4db13 (patch)
tree4f1f0f51764e1d08905fef4817bf5d7fd7be17c9
parent7d48c40a02a2c0ff98027fdd1a88f9dcc19b1795 (diff)
downloadseitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar.gz
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar.bz2
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar.lz
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar.xz
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.tar.zst
seitan-fe5c40a83620a870e32777b779fbbd2833d4db13.zip
actions: fix flag intialization
Signed-off-by: Alice Frosi <afrosi@redhat.com>
-rw-r--r--actions.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/actions.c b/actions.c
index 1eb50f1..8a584b5 100644
--- a/actions.c
+++ b/actions.c
@@ -213,7 +213,7 @@ int do_actions(struct action actions[], unsigned int n_actions, int pid,
break;
case A_INJECT_A:
resp_fd.id = id;
- resp_fd.flags |= SECCOMP_ADDFD_FLAG_SEND;
+ resp_fd.flags = SECCOMP_ADDFD_FLAG_SEND;
resp_fd.newfd = actions[i].inj.newfd;
resp_fd.srcfd = actions[i].inj.oldfd;
resp_fd.flags |= SECCOMP_ADDFD_FLAG_SETFD;
@@ -224,7 +224,8 @@ int do_actions(struct action actions[], unsigned int n_actions, int pid,
resp_fd.id = id;
resp_fd.newfd = actions[i].inj.newfd;
resp_fd.srcfd = actions[i].inj.oldfd;
- resp_fd.flags |= SECCOMP_ADDFD_FLAG_SETFD;
+ resp_fd.flags = SECCOMP_ADDFD_FLAG_SETFD;
+ resp_fd.newfd_flags = 0;
if (send_inject_target(&resp_fd, notifyfd) == -1)
return -1;
break;