#endif
#if HAVE_DECL_SECCOMP_NOTIFY_FD
-static int seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
- struct seccomp_notif_resp *resp,
- struct lxc_handler *handler)
+static void seccomp_notify_default_answer(int fd, struct seccomp_notif *req,
+ struct seccomp_notif_resp *resp,
+ struct lxc_handler *handler)
{
resp->id = req->id;
resp->error = -ENOSYS;
if (seccomp_notify_respond(fd, resp))
SYSERROR("Failed to send default message to seccomp");
-
- return seccomp_notify_reconnect(handler);
}
#endif
}
if (ret) {
ERROR("No seccomp proxy registered");
- return seccomp_notify_default_answer(fd, req, resp,
- hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
+ goto out;
}
listener_proxy_fd = conf->seccomp.notifier.proxy_fd;
}
snprintf(mem_path, sizeof(mem_path), "/proc/%d/mem", req->pid);
fd_mem = open(mem_path, O_RDONLY | O_CLOEXEC);
if (fd_mem < 0) {
- (void)seccomp_notify_default_answer(fd, req, resp, hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
SYSERROR("Failed to open process memory for seccomp notify request");
goto out;
}
*/
ret = seccomp_notify_id_valid(fd, req->id);
if (ret < 0) {
- (void)seccomp_notify_default_answer(fd, req, resp, hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
SYSERROR("Invalid seccomp notify request id");
goto out;
}
}
}
- (void)seccomp_notify_default_answer(fd, req, resp, hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
goto out;
}
if (resp->id != req_id) {
resp->id = req_id;
ERROR("Proxy returned response with illegal id");
- (void)seccomp_notify_default_answer(fd, req, resp, hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
goto out;
}
bytes = lxc_recvmsg_nointr_iov(listener_proxy_fd, iov,iov_len, 0);
if (bytes != (ssize_t)msg_base_size) {
SYSERROR("Failed to receive message from seccomp proxy");
- (void)seccomp_notify_default_answer(fd, req, resp, hdlr);
+ seccomp_notify_default_answer(fd, req, resp, hdlr);
goto out;
}