diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-11-17 11:15:27 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2021-11-17 12:30:33 +0100 |
commit | 3073543fd95d48a59436b0b5def9cce2244417fc (patch) | |
tree | 95db71b7211256fbc8b76104c88b95255b2bc8ff | |
parent | c6616648780881ac717817cf79de84084ce7c02f (diff) | |
download | podman-3073543fd95d48a59436b0b5def9cce2244417fc.tar.gz podman-3073543fd95d48a59436b0b5def9cce2244417fc.tar.bz2 podman-3073543fd95d48a59436b0b5def9cce2244417fc.zip |
rootless: use catatonit to maintain user+mnt namespace
if catatonit is present, use it to keep the rootless user+mnt
namespace alive.
[NO NEW TESTS NEEDED] no new features added.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | pkg/rootless/rootless_linux.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c index 6ce4b1e29..44ed40ce3 100644 --- a/pkg/rootless/rootless_linux.c +++ b/pkg/rootless/rootless_linux.c @@ -106,6 +106,11 @@ do_pause () for (i = 0; sig[i]; i++) sigaction (sig[i], &act, NULL); + /* Attempt to execv catatonit to keep the pause process alive. */ + execl ("/usr/libexec/podman/catatonit", "catatonit", "-P", NULL); + execl ("/usr/bin/catatonit", "catatonit", "-P", NULL); + /* and if the catatonit executable could not be found, fallback here... */ + prctl (PR_SET_NAME, "podman pause", NULL, NULL, NULL); while (1) pause (); |