diff options
Diffstat (limited to 'actions.c')
-rw-r--r-- | actions.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -167,6 +167,7 @@ int do_call(struct arg_clone *c) int do_actions(struct action actions[], unsigned int n_actions, int pid, int notifyfd, uint64_t id) { + struct seccomp_notif_addfd resp_fd; struct seccomp_notif_resp resp; struct arg_clone c; unsigned int i; @@ -210,6 +211,23 @@ int do_actions(struct action actions[], unsigned int n_actions, int pid, if (send_target(&resp, notifyfd) == -1) return -1; break; + case A_INJECT_A: + resp_fd.id = id; + resp_fd.flags |= SECCOMP_ADDFD_FLAG_SEND; + resp_fd.newfd = actions[i].inj.newfd; + resp_fd.srcfd = actions[i].inj.old; + resp_fd.flags |= SECCOMP_ADDFD_FLAG_SETFD; + if (send_inject_target(&resp_fd, notifyfd) == -1) + return -1; + break; + case A_INJECT: + resp_fd.id = id; + resp_fd.newfd = actions[i].inj.newfd; + resp_fd.srcfd = actions[i].inj.old; + resp_fd.flags |= SECCOMP_ADDFD_FLAG_SETFD; + if (send_inject_target(&resp_fd, notifyfd) == -1) + return -1; + break; default: fprintf(stderr, "unknow action %d \n", actions[i].type); } |