diff options
author | Jonathan Dieter <jdieter@gmail.com> | 2019-12-07 14:17:35 +0000 |
---|---|---|
committer | Jonathan Dieter <jdieter@gmail.com> | 2019-12-07 14:18:55 +0000 |
commit | b3014c1c69d5870104aa45f7caae7af041094171 (patch) | |
tree | 689274776320eda58ad7c1c3db95726c467f80ae /Dockerfile.centos | |
parent | 82a83b9ff55e1f22cb1951b927de29866fa44054 (diff) | |
download | podman-b3014c1c69d5870104aa45f7caae7af041094171.tar.gz podman-b3014c1c69d5870104aa45f7caae7af041094171.tar.bz2 podman-b3014c1c69d5870104aa45f7caae7af041094171.zip |
Return empty runtime directory if we're not rootless
Currently, we return a runtime directory of the form
`/run/user/<uid>`, even when running as root. Depending on configuration,
that directory may be deleted when the user logs out, which is quite
awkward when the container is started as a systemd service and then
someone logs in and out as root.
This patch fixes the problem by returning an empty runtime directory if the
container is being started by root. The runtime should automatically use
the default runtime directory (`/run/crun` when crun is used), which should
be accessible to root.
Tested in Fedora 31 by running containers under both root and a regular
user. State for root containers is stored in `/run/crun`, while state for
rootless containers is in `/run/user/<uid>/crun`.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Diffstat (limited to 'Dockerfile.centos')
0 files changed, 0 insertions, 0 deletions