Commit Graph

24629 Commits

Author SHA1 Message Date
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]
567906ed5b fix(deps): update module github.com/mattn/go-sqlite3 to v1.14.24
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-04 16:43:01 +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]
7cde3abd17 fix(deps): update module github.com/shirou/gopsutil/v4 to v4.24.9
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-01 06:17:02 +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
renovate[bot]
ce9716ee41 fix(deps): update module github.com/cyphar/filepath-securejoin to v0.3.3
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 15:44:20 +00:00
openshift-merge-bot[bot]
b4b33aa4c1 Merge pull request #24086 from containers/renovate/ubuntu-24.x
chore(deps): update dependency ubuntu to v24
2024-09-30 14:18:35 +00:00
openshift-merge-bot[bot]
5cef143030 Merge pull request #24043 from PhrozenByte/docs-add-host-gateway
[CI:DOCS] Update documentation of CLI options affecting `/etc/hosts`
2024-09-30 13:37:22 +00:00
renovate[bot]
ece76a2537 chore(deps): update dependency ubuntu to v24
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-30 12:03:09 +00:00
Paul Holzinger
b5e1863d1c rpm: do not load iptables modules on f41+
As we started to default to nftables on f41[1,2] we no longer have to
load legacy iptables modules.

[1] https://fedoraproject.org/wiki/Changes/NetavarkNftablesDefault
[2] https://github.com/containers/netavark/pull/1038

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2024-09-30 13:52:07 +02:00
Sainath Sativar
e07c31068f adding docs for network-cmd-path
Signed-off-by: Sainath Sativar <Sativar.sainath@gmail.com>
2024-09-30 10:41:10 +01:00
openshift-merge-bot[bot]
e1496c992a Merge pull request #24090 from mheon/fix_rhel_60382
Include exposed ports in inspect output when net=host
2024-09-27 22:32:08 +00:00