Commit Graph

23735 Commits

Author SHA1 Message Date
openshift-merge-bot[bot] 67570fb208
Merge pull request #24178 from eriksjolund/fix-issue23954
podman-systemd.unit.5: adjust example options
2024-10-07 09:16:05 +00:00
Erik Sjölund d0cb62aacc podman-systemd.unit.5: adjust example options
Use the reserved domain name example.com in the examples.
For details, see RFC 2606
https://datatracker.ietf.org/doc/html/rfc2606#section-3

Modify PublishPort examples to make them reflect more
common scenarios.

Fixes: https://github.com/containers/podman/issues/23954

Signed-off-by: Erik Sjölund <erik.sjolund@gmail.com>
2024-10-06 17:31:41 +02:00
openshift-merge-bot[bot] 8d5ec11d0b
Merge pull request #24175 from containers/renovate/golang.org-x-term-0.x
fix(deps): update module golang.org/x/term to v0.25.0
2024-10-04 22:55:41 +00:00
renovate[bot] 1470961e6c
fix(deps): update module golang.org/x/term to v0.25.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-04 21:32:59 +00:00
openshift-merge-bot[bot] e6f530b4b3
Merge pull request #24170 from containers/renovate/golang.org-x-sys-0.x
fix(deps): update module golang.org/x/sys to v0.26.0
2024-10-04 17:06:13 +00:00
openshift-merge-bot[bot] d28af234de
Merge pull request #24164 from mheon/host_network_no_expose_in_ports
Exposed ports are only included when not --net=host
2024-10-04 17:03:40 +00:00
openshift-merge-bot[bot] 4b958b3fa0
Merge pull request #24169 from baude/OWNERS.update
OWNERS file audit and update
2024-10-04 17:01:24 +00:00
openshift-merge-bot[bot] 17d29a2f6d
Merge pull request #24122 from PhrozenByte/docs-hosts-file
Mention `no_hosts` and `base_hosts_file` configs in CLI option docs
2024-10-04 16:58:13 +00:00
openshift-merge-bot[bot] 1f7fe1d1e8
Merge pull request #24167 from giuseppe/improve-check-for-current-user-mapped
libpod: hasCurrentUserMapped checks for gid too
2024-10-04 16:55:13 +00:00
openshift-merge-bot[bot] d6da198c87
Merge pull request #24166 from ygalblum/doc-testflags
[CI:DOCS] Document TESTFLAGS in test README file
2024-10-04 16:52:29 +00:00
renovate[bot] 53785ed055
fix(deps): update module golang.org/x/sys to v0.26.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-04 15:31:29 +00:00
openshift-merge-bot[bot] e9e9f7e1ff
Merge pull request #24124 from mheon/validate_bind_propagation
Validate the bind-propagation option to `--mount`
2024-10-04 15:29:58 +00:00
Brent Baude 505c585b49 OWNERS file audit and update
Update OWNERS file specifically around `approvers`.  Also, added Mario.

Signed-off-by: Brent Baude <bbaude@redhat.com>
2024-10-04 10:26:45 -05:00
Matt Heon 8061553c0f Exposed ports are only included when not --net=host
Undoing some of my own work here from #24090 now that we have the
ExposedPorts field implemented in inspect. I considered a revert
of that patch, but it's still needed as without it we'd be
including exposed ports when --net=container which is not
correct.

Basically, exposed ports for a container should always go in the
new ExposedPorts field we added. They sometimes go in the Ports
field in NetworkSettings, but only when the container is not
net=host and not net=container. We were always including exposed
ports, which was not correct, but is an easy logical fix.

Also required is a test change to correct the expected behavior
as we were testing for incorrect behavior.

Fixes https://issues.redhat.com/browse/RHEL-60382

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-04 11:19:43 -04:00
Giuseppe Scrivano e46ae46f18
libpod: hasCurrentUserMapped checks for gid too
the kernel checks that both the uid and the gid are mapped inside the
user namespace, not only the uid:

/**
 * privileged_wrt_inode_uidgid - Do capabilities in the namespace work over the inode?
 * @ns: The user namespace in question
 * @idmap: idmap of the mount @inode was found from
 * @inode: The inode in question
 *
 * Return true if the inode uid and gid are within the namespace.
 */
bool privileged_wrt_inode_uidgid(struct user_namespace *ns,
				 struct mnt_idmap *idmap,
				 const struct inode *inode)
{
	return vfsuid_has_mapping(ns, i_uid_into_vfsuid(idmap, inode)) &&
	       vfsgid_has_mapping(ns, i_gid_into_vfsgid(idmap, inode));
}

for this reason, improve the check for hasCurrentUserMapped to verify
that the gid is also mapped, and if it is not, use an intermediate
mount for the container rootfs.

Closes: https://github.com/containers/podman/issues/24159

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-10-04 16:17:04 +02:00
Ygal Blum e948c4ed90 [CI:DOCS] Document TESTFLAGS in test README file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-10-04 10:16:27 -04:00
openshift-merge-bot[bot] 30a25a0d3d
Merge pull request #24135 from Luap99/vendor
vendor: update c/common and buildah
2024-10-04 13:14:43 +00:00
Matt Heon 985b57d9f7 Validate the bind-propagation option to `--mount`
Similar to github.com/containers/buildah/pull/5761 but not
security critical as Podman does not have an expectation that
mounts are scoped (the ability to write a --mount option is
already the ability to mount arbitrary content into the container
so sneaking arbitrary options into the mount doesn't have
security implications). Still, bad practice to let users inject
anything into the mount command line so let's not do that.

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-04 09:07:51 -04:00
openshift-merge-bot[bot] 1df98eeb9d
Merge pull request #24154 from ehelms/fix-podman-secret-inspect-examples
Fix typo in secret inspect examples
2024-10-04 12:14:09 +00:00
openshift-merge-bot[bot] 73ff0a4538
Merge pull request #24129 from ygalblum/makefile-ginkgo-silence-skips
Makefile - silence skipped tests when focusing on a file
2024-10-04 10:26:54 +00:00
Eric D. Helms d8b26ac1b4 Fix typo in secret inspect examples
Signed-off-by: Eric D. Helms <ericdhelms@gmail.com>
2024-10-03 15:23:07 -04:00
Daniel Rudolf 6f9cc3755a
Mention `no_hosts` and `base_hosts_file` configs in CLI option docs
Follow-up to #24043

Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2024-10-02 23:15:24 +02:00
openshift-merge-bot[bot] 70f31281d6
Merge pull request #24114 from kolyshkin/sys-cap
vendor: switch to moby/sys/capability
2024-10-02 16:56:54 +00:00
Ed Santiago 043b82ef59
Fixes for vendoring Buildah
This commit was automatically cherry-picked
by buildah-vendor-treadmill v0.3
from the buildah vendor treadmill PR, #13808

  * Fix conflict caused by Ed's local-registry PR in buildah
  * Wire in "new" --retry and --retry-delay, these existed for longer
    but where non functional.

Signed-off-by: Ed Santiago <santiago@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-02 18:38:38 +02:00
Paul Holzinger 83a0299309
vendor: update buildah to latest
Includes a fix for CVE-2024-9407

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-02 18:04:39 +02:00
openshift-merge-bot[bot] 4eb43de41a
Merge pull request #24128 from ygalblum/quadlet-remove-equal-sign
Quadlet - prefer "param val" over "param=val" to allow env expansion
2024-10-02 15:34:35 +00:00
Ygal Blum 23f256349b Makefile - silence skipped tests when focusing on a file
Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-10-02 09:54:06 -04:00
openshift-merge-bot[bot] 75a6a6681d
Merge pull request #24110 from mheon/fix_rhel_60382_round_2
Add ExposedPorts to Inspect's ContainerConfig
2024-10-02 13:41:34 +00:00
openshift-merge-bot[bot] 06f24180ce
Merge pull request #24125 from edsantiago/ci-desired-network
CI: require and test CI_DESIRED_NETWORK on RHEL
2024-10-02 12:48:49 +00:00
Paul Holzinger dde1c3d98c
vendor: update to latest c/common
Includes a fix for CVE-2024-9341

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-02 11:24:01 +02:00
openshift-merge-bot[bot] 8d7bdc9cb0
Merge pull request #24127 from edsantiago/wait-for-sock
System tests: sdnotify: wait for socket file creation
2024-10-02 07:55:10 +00:00
Ygal Blum fc25a3a5fc Quadlet - prefer "param val" over "param=val" to allow env expansion
When possible use a generic function to add strings and booleans
Adjust tests

Signed-off-by: Ygal Blum <ygal.blum@gmail.com>
2024-10-01 18:01:05 -04:00
openshift-merge-bot[bot] 857a47de9b
Merge pull request #24082 from Luap99/netns-leak
Fix netns leak on container creation and exit code 1 on SIGTERM.
2024-10-01 21:02:05 +00:00
Ed Santiago 410537808e System tests: sdnotify: wait for socket file creation
Potential race between starting socat (which creates a socket
file) and processes accessing said socket. Or maybe not. I
dunno, I'm grasping at straws. This is an elusive flake.

Fixes: #23798 (I hope)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-01 14:50:16 -06:00
Kir Kolyshkin 28e01cc8cc Switch to moby/sys/capability
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-10-01 12:52:18 -07:00
Kir Kolyshkin 6a91149b53 platformInspectContainerHostConfig: rm dead code
In this code, g.HostSpecific is _always_ false, as it is never set by
generate.New and is thus left at the default value (false).

Remove dead code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2024-10-01 12:52:18 -07:00
Ed Santiago b791dfb558 CI: require and test CI_DESIRED_NETWORK on RHEL
Although podman has moved on from CNI, RHEL has not. Make
sure that builds on RHEL test the desired network backend(s).

Effective immediately, gating.yaml on all RHEL branches
must set CI_DESIRED_NETWORK (=cni or =netavark)

Signed-off-by: Ed Santiago <santiago@redhat.com>
2024-10-01 10:44:07 -06:00
openshift-merge-bot[bot] 13b78c9da9
Merge pull request #24116 from containers/renovate/golang.org-x-exp-digest
fix(deps): update golang.org/x/exp digest to 701f63a
2024-10-01 13:06:17 +00:00
openshift-merge-bot[bot] 0c6be7aedb
Merge pull request #24119 from Luap99/quadlet-publish
quadlet: allow variables in PublishPort
2024-10-01 11:59:54 +00:00
Matt Heon edc3dc5e11 Add ExposedPorts to Inspect's ContainerConfig
A field we missed versus Docker. Matches the format of our
existing Ports list in the NetworkConfig, but only includes
exposed ports (and maps these to struct{}, as they never go to
real ports on the host).

Fixes https://issues.redhat.com/browse/RHEL-60382

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-10-01 07:54:52 -04:00
openshift-merge-bot[bot] ded7833255
Merge pull request #24109 from Luap99/rpm-iptables-fedora
rpm: do not load iptables modules on f41+
2024-10-01 10:17:27 +00:00
openshift-merge-bot[bot] e40b28fdb2
Merge pull request #24115 from containers/renovate/github.com-godbus-dbus-v5-digest
fix(deps): update github.com/godbus/dbus/v5 digest to a817f3c
2024-10-01 10:09:10 +00:00
openshift-merge-bot[bot] 09a2c8f3f5
Merge pull request #24112 from containers/renovate/github.com-cyphar-filepath-securejoin-0.x
fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.3
2024-10-01 08:18:40 +00:00
renovate[bot] 28d3775c4d
fix(deps): update golang.org/x/exp digest to 701f63a
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 08:16:24 +00:00
Paul Holzinger abc4cfb049
quadlet: allow variables in PublishPort
There is no reason to validate the args here, first podman may change
the syntax so this is just duplication that may hurt us long term. It
also added special handling of some options that just do not make sense,
i.e. removing 0.0.0.0, podman should really be the only parser here. And
more importantly this prevents variables from being used.

Fixes #24081

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-10-01 10:07:20 +02:00
openshift-merge-bot[bot] a3ba5ff320
Merge pull request #24113 from mtrmac/chunked-encryption
Document that zstd:chunked is downgraded to zstd when encrypting
2024-10-01 07:12:14 +00:00
renovate[bot] 8ef495594c
fix(deps): update github.com/godbus/dbus/v5 digest to a817f3c
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 01:31:16 +00:00
Miloslav Trmač bb35ad1da4 Document that zstd:chunked is downgraded to zstd when encrypting
A part of https://github.com/containers/common/issues/2117 .

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2024-09-30 21:52:35 +02:00
openshift-merge-bot[bot] 1f5ec677d8
Merge pull request #24091 from Luap99/mount-race
podman mount: ignore ErrLayerUnknown
2024-09-30 18:31:32 +00:00
openshift-merge-bot[bot] 639f3c6336
Merge pull request #24104 from Sativarsainath-26/network-cmd-removal
update docs for network-cmd-path
2024-09-30 15:50:05 +00:00