podman/libpod
Paul Holzinger 0007c98ddb
Fix race conditions in rootless cni setup
There was an race condition when calling `GetRootlessCNINetNs()`. It
created the rootless cni directory before it got locked. Therefore
another process could have called cleanup and removed this directory
before it was used resulting in errors. The lockfile got moved into the
XDG_RUNTIME_DIR directory to prevent a panic when the parent dir was
removed by cleanup.

Fixes #10930
Fixes #10922

To make this even more robust `GetRootlessCNINetNs()` will now return
locked. This guarantees that we can run `Do()` after `GetRootlessCNINetNs()`
before another process could have called `Cleanup()` in between.

[NO TESTS NEEDED] CI is flaking, hopefully this will fix it.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2021-07-15 14:33:56 +02:00
..
common
define podman diff accept two images or containers 2021-07-02 17:11:56 +02:00
driver bump go module to v3 2021-02-22 09:03:51 +01:00
events Add ExecDied event and use it to retrieve exit codes 2021-06-10 14:17:41 -04:00
layers
linkmode
lock bump go module to v3 2021-02-22 09:03:51 +01:00
logs Implemented Until Query Parameter for Containers/logs 2021-07-09 12:21:46 -04:00
network Fix network create macvlan with subnet option 2021-05-20 13:12:01 +02:00
plugin bump go module to v3 2021-02-22 09:03:51 +01:00
shutdown Fixes from make codespell 2021-04-21 13:16:33 -04:00
boltdb_state.go Removing a non existing container API should return 404 2021-03-10 04:08:29 -05:00
boltdb_state_internal.go Add --requires flag to podman run/create 2021-04-06 14:01:31 -04:00
boltdb_state_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
boltdb_state_unsupported.go
common_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
container.go container: ignore named hierarchies 2021-06-10 14:49:58 +02:00
container_api.go Implement --archive flag for podman cp 2021-07-01 12:01:46 +02:00
container_commit.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
container_config.go Support uid,gid,mode options for secrets 2021-05-17 14:35:55 -04:00
container_copy_linux.go Implement --archive flag for podman cp 2021-07-01 12:01:46 +02:00
container_copy_unsupported.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_exec.go Fix resize race with podman exec -it 2021-06-16 16:43:30 +02:00
container_graph.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_graph_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_inspect.go Fix problem copying files when container is in host pid namespace 2021-05-19 07:55:48 -04:00
container_internal.go [NO TESTS NEEDED] Create /etc/mtab with the correct ownership 2021-06-23 14:46:40 -04:00
container_internal_linux.go fix: uid/gid for volume mounted to existing dir 2021-07-12 14:56:55 +02:00
container_internal_linux_test.go Make an entry in /etc/group when we modify /etc/passwd 2020-09-10 13:02:31 -04:00
container_internal_test.go
container_internal_unsupported.go Fix permissions on initially created named volumes 2021-06-14 11:56:48 -04:00
container_linux.go
container_log.go Implemented Until Query Parameter for Containers/logs 2021-07-09 12:21:46 -04:00
container_log_linux.go Implemented Until Query Parameter for Containers/logs 2021-07-09 12:21:46 -04:00
container_log_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_path_resolution.go Fix infinite loop in isPathOnVolume 2021-05-06 19:24:14 +03:00
container_stat_linux.go podman cp: evaluate symlink correctly when copying from container 2021-03-09 10:45:15 +01:00
container_stat_unsupported.go podman cp: support copying on tmpfs mounts 2021-03-04 15:43:12 +01:00
container_top_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_top_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
container_unsupported.go
container_validate.go Podman Pod Create --cpus and --cpuset-cpus flags 2021-06-23 13:47:57 -04:00
diff.go podman diff accept two images or containers 2021-07-02 17:11:56 +02:00
events.go Add ExecDied event and use it to retrieve exit codes 2021-06-10 14:17:41 -04:00
healthcheck.go bump go module to v3 2021-02-22 09:03:51 +01:00
healthcheck_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
healthcheck_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
info.go remove `pkg/registries` 2021-06-25 09:56:21 +02:00
kube.go Adds support to preserve auto update labels in generate and play kube 2021-05-06 21:21:43 -06:00
mounts_linux.go
networking_linux.go Fix race conditions in rootless cni setup 2021-07-15 14:33:56 +02:00
networking_slirp4netns.go podman service reaper 2021-07-02 19:00:36 +02:00
networking_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
oci.go Fix resize race with podman exec -it 2021-06-16 16:43:30 +02:00
oci_attach_linux.go Fix resize race with podman exec -it 2021-06-16 16:43:30 +02:00
oci_attach_unsupported.go prune remotecommand dependency 2021-02-25 10:02:41 -06:00
oci_conmon.go
oci_conmon_exec_linux.go Perform a one-sided close of HTTP attach conn on EOF 2021-07-13 16:26:53 -04:00
oci_conmon_linux.go Fix pre-checkpointing 2021-06-10 15:29:24 +02:00
oci_conmon_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
oci_missing.go Fix resize race with podman exec -it 2021-06-16 16:43:30 +02:00
oci_util.go bump go module to v3 2021-02-22 09:03:51 +01:00
options.go Podman Pod Create --cpus and --cpuset-cpus flags 2021-06-23 13:47:57 -04:00
pod.go Podman Pod Create --cpus and --cpuset-cpus flags 2021-06-23 13:47:57 -04:00
pod_api.go Podman Pod Create --cpus and --cpuset-cpus flags 2021-06-23 13:47:57 -04:00
pod_internal.go cgroup: fix rootless --cgroup-parent with pods 2021-05-06 08:33:28 +02:00
pod_status.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_top_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
pod_top_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
reset.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
runtime.go Remove GetStore function from Libpod 2021-07-08 14:22:33 -04:00
runtime_cstorage.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_ctr.go Ensure that container still exists when removing 2021-05-26 15:33:28 -04:00
runtime_img.go migrate Podman to containers/common/libimage 2021-05-05 11:30:12 +02:00
runtime_migrate.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_migrate_unsupported.go Use Libpod tmpdir for pause path 2020-12-02 14:18:37 -05:00
runtime_pod.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_pod_infra_linux.go Podman Pod Create --cpus and --cpuset-cpus flags 2021-06-23 13:47:57 -04:00
runtime_pod_linux.go cgroup: fix rootless --cgroup-parent with pods 2021-05-06 08:33:28 +02:00
runtime_pod_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_renumber.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
runtime_volume_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
state.go Rewrite Rename backend in a more atomic fashion 2021-03-02 13:30:28 -05:00
state_test.go Remove in-memory state implementation 2021-04-13 14:00:38 -04:00
stats.go Podman Stats additional features 2021-06-23 09:23:40 -04:00
stats_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
storage.go turn hidden --trace into a NOP 2021-03-08 09:22:42 +01:00
util.go Use seccomp_profile as default profile if defined in containers.conf 2021-04-28 15:19:48 +02:00
util_linux.go bump go module to v3 2021-02-22 09:03:51 +01:00
util_linux_test.go Fix mismatch between log messages and behavior of libpod.LabelVolumePath. 2020-09-13 23:24:15 -04:00
util_test.go bump go module to v3 2021-02-22 09:03:51 +01:00
util_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_inspect.go bump go module to v3 2021-02-22 09:03:51 +01:00
volume_internal.go Fix volumes with uid and gid options 2021-06-11 13:27:08 +02:00
volume_internal_linux.go [NO TESTS NEEDED] Fix rootless volume plugins 2021-03-24 22:53:53 +03:00
volume_internal_unsupported.go bump go module to v3 2021-02-22 09:03:51 +01:00