This patch allows reptyr to build with gcc 7. It is taken from reptyr mainline patches fa0d63f and b45fd92. https://github.com/nelhage/reptyr/commit/fa0d63ff8c488be15976e5353580b565e85586a1 https://github.com/nelhage/reptyr/commit/b45fd9238958fcf2d8f3d6fc23e6d491febea2ac Patch by Nelson Elhage . diff --git a/attach.c b/attach.c index bd8ef8c..8d9cbf8 100644 --- a/attach.c +++ b/attach.c @@ -389,8 +389,11 @@ int setup_steal_socket(struct steal_pty_state *steal) { return errno; steal->addr_un.sun_family = AF_UNIX; - snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), - "%s/reptyr.sock", steal->tmpdir); + if (snprintf(steal->addr_un.sun_path, sizeof(steal->addr_un.sun_path), + "%s/reptyr.sock", steal->tmpdir) >= sizeof(steal->addr_un.sun_path)) { + error("tmpdir path too long!"); + return ENAMETOOLONG; + } if ((steal->sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) return errno; diff --git a/platform/linux/linux.h b/platform/linux/linux.h index 9e6b78a..3ec5a99 100644 --- a/platform/linux/linux.h +++ b/platform/linux/linux.h @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include in?id=ad7749a1273ccd2556acd4d24388956d6962a723'>treecommitdiff
AgeCommit message (Collapse)Author
2020-11-27etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Permit more operations required for various build jobs.
2020-11-26etc: Add more SELinux permissions for the daemon.Marius Bakke
* etc/guix-daemon.cil.in (guix_daemon): Permit file appending, setattr, read/write UDP sockets, access to tmpfs and hugetlbfs, and connecting to PostgreSQL.
2020-11-25etc: Add more SELinux permissions for the daemon.Marius Bakke
This is needed for some package test suites. * etc/guix-daemon.cil.in (guix_daemon): Permit unix_dgram_socket operations.
2020-11-15etc: Updates for the guix-daemon SELinux policy.Daniel Brooks
* etc/guix-daemon.cil.in (guix_daemon): Specify more permissions for guix-daemon to account for daemon updates and newer SELinux. I can't promise that this is a complete list of everything that guix-daemon needs, but it's probably most of them. It can search for, install, upgrade, and remove packages, create virtual machines and containers, update itself, and so on. Signed-off-by: Marius Bakke <marius@gnu.org>