spiegel_podman/pkg
Jonathan Dieter b3014c1c69 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>
2019-12-07 14:18:55 +00:00
..
adapter Use terminal detach keys sequence specified in the config file 2019-12-06 09:30:26 +01:00
annotations Add ContainerManager annotation to created containers 2019-09-10 09:37:14 +02:00
apparmor golangci-lint round #3 2019-07-21 14:22:39 -05:00
cgroups cgroups: read correctly the CPU stats 2019-11-01 20:51:24 +01:00
channelwriter account for varlink calls that dont use more 2019-07-10 08:50:05 -05:00
criu Add helper function to read out CRIU version 2018-10-23 12:52:03 +02:00
ctime Re-add int64 casts for ctime 2019-07-23 15:43:40 -04:00
errorhandling first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
hooks codespell: spelling corrections 2019-11-13 08:15:00 +11:00
inspect Begin to break up pkg/inspect 2019-06-03 15:54:53 -04:00
kubeutils Remove dependency on kubernetes 2018-03-27 21:55:33 +00:00
logs first pass of corrections for golangci-lint 2019-07-10 15:52:17 -05:00
lookup execuser: look at the source for /etc/{passwd,group} overrides 2019-09-21 22:11:09 +02:00
namespaces namespaces: by default create cgroupns on cgroups v2 2019-11-05 17:29:01 +01:00
netns network: hide EPERM warning when rootless 2019-10-01 08:51:58 +02:00
network goland autocorrections 2019-10-29 12:18:50 -05:00
registrar Update registrar unit tests to match them of cri-o 2019-04-04 08:53:32 +02:00
registries bump containers/image to v5.0.0, buildah to v1.11.4 2019-10-29 13:35:18 -04:00
resolvconf Use host's resolv.conf if no network namespace enabled 2018-11-27 15:28:09 -05:00
rootless rootless: add fallback for renameat2 at runtime 2019-12-04 10:30:40 +01:00
spec codespell: spelling corrections 2019-11-13 08:15:00 +11:00
sysinfo Setup a reasonable default for pids-limit 4096 2019-10-04 16:09:13 -04:00
systemdgen generate systemd: support pods and geneartig files 2019-08-21 17:28:30 +02:00
timetype timestamp related functions added 2019-11-14 17:16:22 +09:00
tracing trivial cleanups from golang 2019-07-03 15:41:33 -05:00
trust codespell: spelling corrections 2019-11-13 08:15:00 +11:00
util Return empty runtime directory if we're not rootless 2019-12-07 14:18:55 +00:00
varlinkapi Add ONBUILD support to --change 2019-12-05 15:11:40 -05:00