From ec49d30f573c877d5be882a32ce53bcfcc7156ec Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Thu, 6 Aug 2020 15:08:09 +0200 Subject: [PATCH] seccomp: send notify fd as part of the message Since we haven't made this official api yet: YOLO Signed-off-by: Christian Brauner --- src/lxc/seccomp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lxc/seccomp.c b/src/lxc/seccomp.c index ad1f51922..06296f5d9 100644 --- a/src/lxc/seccomp.c +++ b/src/lxc/seccomp.c @@ -1357,7 +1357,7 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data, __do_close int fd_mem = -EBADF; int ret; ssize_t bytes; - int send_fd_list[2]; + int send_fd_list[3]; struct iovec iov[4]; size_t iov_len, msg_base_size, msg_full_size; char mem_path[6 /* /proc/ */ @@ -1460,10 +1460,10 @@ int seccomp_notify_handler(int fd, uint32_t events, void *data, send_fd_list[0] = fd_pid; send_fd_list[1] = fd_mem; + send_fd_list[2] = fd; retry: - bytes = lxc_abstract_unix_send_fds_iov(listener_proxy_fd, send_fd_list, - 2, iov, iov_len); + bytes = lxc_abstract_unix_send_fds_iov(listener_proxy_fd, send_fd_list, 3, iov, iov_len); if (bytes != (ssize_t)msg_full_size) { SYSERROR("Failed to forward message to seccomp proxy"); if (!reconnected) { -- 2.47.2