spiegel_podman/libpod
Valentin Rothberg d856e87f40 events endpoint: fix panic and race condition
Fix a potential panic in the events endpoint when parsing the filters
parameter.  Values of the filters map might be empty, so we need to
account for that instead of uncondtitionally accessing the first item.

Also apply a similar for race conditions as done in commit f4a2d25c0f:

	Fix a race that could cause read errors to be masked.  Masking
	such errors is likely to report red herrings since users don't
	see that reading failed for some reasons but that a given event
	could not be found.

Another race was the handler closing event channel, which could lead to
two kinds of panics: double close, send to close channel.  The backend
takes care of that.  However, make sure that the backend stops working
in case the context has been cancelled.

Fixes: #6899
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
2020-07-20 11:37:05 +02:00
..
common Set blob cache directory based on GraphDriver 2019-03-29 08:27:33 -04:00
define abi: set default umask and rlimits 2020-07-17 20:53:38 +02:00
driver removMergeDir from inspect result if not mounted 2019-08-13 15:13:20 -04:00
events events endpoint: fix panic and race condition 2020-07-20 11:37:05 +02:00
filters move go module to v2 2020-07-06 15:50:12 +02:00
image Fix saving in oci format 2020-07-09 08:03:54 -04:00
layers Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
linkmode Add podman static build 2020-05-11 13:11:07 +02:00
lock move go module to v2 2020-07-06 15:50:12 +02:00
logs move go module to v2 2020-07-06 15:50:12 +02:00
boltdb_state.go move go module to v2 2020-07-06 15:50:12 +02:00
boltdb_state_internal.go move go module to v2 2020-07-06 15:50:12 +02:00
boltdb_state_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
boltdb_state_unsupported.go podman-remote inspect 2019-01-18 15:43:11 -06:00
common_test.go move go module to v2 2020-07-06 15:50:12 +02:00
container.go libpod: pass down network options 2020-07-16 22:37:27 +02:00
container_api.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
container_commit.go move go module to v2 2020-07-06 15:50:12 +02:00
container_exec.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
container_graph.go move go module to v2 2020-07-06 15:50:12 +02:00
container_graph_test.go move go module to v2 2020-07-06 15:50:12 +02:00
container_inspect.go Merge pull request #6956 from mheon/add_ports_to_pod_inspect 2020-07-15 04:50:40 -04:00
container_internal.go Preserve passwd on container restart 2020-07-15 10:25:46 -04:00
container_internal_linux.go Preserve passwd on container restart 2020-07-15 10:25:46 -04:00
container_internal_linux_test.go Add username to /etc/passwd inside of container if --userns keep-id 2020-07-07 08:34:31 -04:00
container_internal_test.go vendor: update seccomp/containers-golang to v0.4.1 2020-05-21 16:16:09 +02:00
container_internal_unsupported.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
container_linux.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
container_log.go log API: add context to allow for cancelling 2020-07-09 15:13:07 +02:00
container_log_linux.go log API: add context to allow for cancelling 2020-07-09 15:13:07 +02:00
container_log_unsupported.go log API: add context to allow for cancelling 2020-07-09 15:13:07 +02:00
container_top_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
container_top_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
container_unsupported.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
container_validate.go move go module to v2 2020-07-06 15:50:12 +02:00
diff.go move go module to v2 2020-07-06 15:50:12 +02:00
events.go fix race condition in libpod.GetEvents(...) 2020-07-07 16:22:22 +02:00
healthcheck.go move go module to v2 2020-07-06 15:50:12 +02:00
healthcheck_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
healthcheck_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
in_memory_state.go move go module to v2 2020-07-06 15:50:12 +02:00
info.go move go module to v2 2020-07-06 15:50:12 +02:00
kube.go move go module to v2 2020-07-06 15:50:12 +02:00
mounts_linux.go set root propagation based on volume properties 2018-11-26 13:55:02 +01:00
networking_linux.go Merge pull request #6965 from giuseppe/followup-pr6324 2020-07-17 04:44:49 -04:00
networking_unsupported.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
oci.go move go module to v2 2020-07-06 15:50:12 +02:00
oci_attach_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
oci_attach_linux_cgo.go Implement conmon exec 2019-07-22 15:57:23 -04:00
oci_attach_linux_nocgo.go Implement conmon exec 2019-07-22 15:57:23 -04:00
oci_attach_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
oci_conmon.go podman: add new cgroup mode split 2020-06-25 17:16:12 +02:00
oci_conmon_exec_linux.go Implement --sdnotify cmdline option to control sd-notify behavior 2020-07-06 17:47:18 +00:00
oci_conmon_linux.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
oci_conmon_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
oci_missing.go move go module to v2 2020-07-06 15:50:12 +02:00
oci_util.go move go module to v2 2020-07-06 15:50:12 +02:00
options.go libpod: pass down network options 2020-07-16 22:37:27 +02:00
pod.go move go module to v2 2020-07-06 15:50:12 +02:00
pod_api.go Fix lint 2020-07-14 13:24:12 -04:00
pod_internal.go move go module to v2 2020-07-06 15:50:12 +02:00
pod_status.go move go module to v2 2020-07-06 15:50:12 +02:00
pod_top_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
pod_top_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
reset.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
runtime_cstorage.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_ctr.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
runtime_img.go Fix saving in oci format 2020-07-09 08:03:54 -04:00
runtime_img_test.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_migrate.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_migrate_unsupported.go Add podman system reset command 2019-11-29 05:34:52 -05:00
runtime_pod.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_pod_infra_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_pod_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_pod_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_renumber.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_volume.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_volume_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
runtime_volume_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
state.go Add support for containers.conf 2020-03-27 14:36:03 -04:00
state_test.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
stats.go move go module to v2 2020-07-06 15:50:12 +02:00
stats_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
storage.go Remove all instances of named return "err" from Libpod 2020-07-09 13:54:47 -04:00
util.go Preserve passwd on container restart 2020-07-15 10:25:46 -04:00
util_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
util_test.go move go module to v2 2020-07-06 15:50:12 +02:00
util_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00
volume.go move go module to v2 2020-07-06 15:50:12 +02:00
volume_inspect.go move go module to v2 2020-07-06 15:50:12 +02:00
volume_internal.go move go module to v2 2020-07-06 15:50:12 +02:00
volume_internal_linux.go move go module to v2 2020-07-06 15:50:12 +02:00
volume_internal_unsupported.go move go module to v2 2020-07-06 15:50:12 +02:00