spiegel_podman/pkg
Paul Holzinger 4b3890ccac
remote: fix incorrect CONTAINER_CONNECTION parsing
When a user specifies a invalid connection in CONTAINER_CONNECTION then
podman should return a proper error saying so. Currently it ignored the
error and in rootFlags() just exited early with defining any flags. This
caused a panic then when trying to use the flags later.

In order to address this first store the connection error in the
PodmanConfig struct and not abort right away during flag setup. This is
important as the user might have specified a flag with a valid remote
connection. As such we check all flags and only when none were given we
return the connection error.

Also while at it I noticed that the default connection reported via
podman --help was wrong as it only used the old containers.conf field
for it and did not consider the podman-connections.json default.

New regression tests have been added to make sure it behaves correctly.

This fixes the problem reported in the PR #22997.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-06-21 14:01:22 +02:00
..
annotations Removing CRI-O related annotations 2024-03-12 14:56:06 +01:00
api docs: Adds all PushImage supported paramters to openapi docs. 2024-06-20 15:52:29 -07:00
auth Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
autoupdate Bump Go module to v5 2024-02-08 09:35:39 -05:00
bindings Merge pull request #22733 from nalind/system-check 2024-06-13 10:35:56 +00:00
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint restore: fix container restore into pod 2024-06-20 13:24:53 +01:00
copy Bump Go module to v5 2024-02-08 09:35:39 -05:00
criu chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
ctime chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
domain remote: fix incorrect CONTAINER_CONNECTION parsing 2024-06-21 14:01:22 +02:00
emulation chore: delete obsolete // +build lines 2024-01-04 11:53:38 +02:00
env pkg/env.Join(): don't modify passed-in maps 2024-02-29 11:47:44 -05:00
errorhandling Fix typos 2023-02-11 18:23:24 +01:00
farm chore: fix function names in comment 2024-04-24 12:07:38 +08:00
fileserver Bump Go module to v5 2024-02-08 09:35:39 -05:00
inspect Bump Go module to v5 2024-02-08 09:35:39 -05:00
k8s.io Bump Go module to v5 2024-02-08 09:35:39 -05:00
lookup Cease using deprecated runc userlookup 2024-02-02 11:02:43 -05:00
machine pkg/machine/wsl: force terminate wsl instance 2024-06-17 17:52:01 +02:00
namespaces Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
parallel Bump Go module to v5 2024-02-08 09:35:39 -05:00
ps podman ps: show exposed ports under PORTS as well 2024-04-10 14:24:23 +02:00
rctl Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
rootless pkg/rootless: set _CONTAINERS_USERNS_CONFIGURED correctly 2024-06-04 17:58:39 +02:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal refacto: unknown signal return signal number without prefix 2024-02-28 19:45:03 +01:00
specgen Add the ability to automount images as volumes via play 2024-04-25 14:12:27 -04:00
specgenutil Add support for image volume subpaths 2024-04-25 14:12:27 -04:00
specgenutilexternal Quadlet container mount - support non key=val options 2023-09-27 16:20:00 +03:00
systemd Quadlet - use specifier for unescaped values for templated container name 2024-06-19 14:44:21 +03:00
terminal Fix Lint on Windows and enable the job 2024-02-20 08:06:18 -05:00
timetype Replace strings.SplitN with strings.Cut 2024-01-11 13:50:15 +00:00
trust pkg/trust: use fileutils.(Le|E)xists 2024-04-19 09:52:14 +02:00
util update golangci-lint to v1.59.0 2024-05-27 11:19:03 +02:00