rootless: enable linger if /run/user/UID not exists

at least on Fedora 30 it creates the /run/user/UID directory for the
user logged in via ssh.

This needs to be done very early so that every other check when we
create the default configuration file will point to the correct
location.

Closes: https://github.com/containers/libpod/issues/3410

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
Giuseppe Scrivano
2019-06-21 12:49:23 +02:00
parent 0906b32087
commit 7255468e65
4 changed files with 111 additions and 27 deletions

View File

@ -29,6 +29,12 @@ func GetRootlessGID() int {
return -1
}
// EnableLinger configures the system to not kill the user processes once the session
// terminates
func EnableLinger() (string, error) {
return "", nil
}
// TryJoinFromFilePaths attempts to join the namespaces of the pid files in paths.
// This is useful when there are already running containers and we
// don't have a pause process yet. We can use the paths to the conmon