containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
22.36k stars 2.31k forks source link

specgen: parse devices even with privileged set #23133

Open Luap99 opened 2 days ago

Luap99 commented 2 days ago

When a users asks for specific devices we should still add them and not ignore them just because privileged adds all of them.

Most notably if you set --device /dev/null:/dev/test you expect /dev/test in the container, however as we ignored them this was not the case. Another side effect is that the input was not validated at at all. This leads to confusion as descriped in the issue.

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

Does this PR introduce a user-facing change?

The podman create/run `--device` option is no longer ignored when `--privileged` is used.
openshift-ci[bot] commented 2 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/containers/podman/blob/main/OWNERS)~~ [Luap99] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment