From fe5c40a83620a870e32777b779fbbd2833d4db13 Mon Sep 17 00:00:00 2001 From: Alice Frosi Date: Thu, 16 Feb 2023 10:24:55 +0100 Subject: actions: fix flag intialization Signed-off-by: Alice Frosi --- actions.c | 5 +++-- 1 file 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; -- cgit v1.2.3