Description
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
I want to run a rootless privileged podman container and access a Sonoff USB zigbee stick in the container.
The container shows up on the host as /dev/ttyACM0.
The host user has access to the device.
In the container the device node is missing.
I found the previous related bugfix #3593.
I believe the issue is that in AddPrivilegedDevices()
devices are skipped if their path starts with /dev/tty
:
podman/pkg/util/utils_linux.go
Lines 93 to 95 in d20dbcd
Steps to reproduce the issue:
- have a tty device to share on the host:
$ ls -la /dev/ttyACM0
crw-rw---- 1 root dialout 166, 0 Dec 22 18:30 /dev/ttyACM0
$ groups
homeassistant dialout
- run a privilieged podman container and check if /dev/ttyACM0 is available:
$ podman run -i -t --privileged ghcr.io/home-assistant/home-assistant:2022.12.7 ls /dev/tty*
Describe the results you received:
/dev/ttyACM0 device file does not exist in the container
Describe the results you expected:
/dev/ttyACM0 exists in the container
Additional information you deem important (e.g. issue happens only occasionally):
I can share the device via --device
if i start it as unprivileged container.
Output of podman version
:
podman version 4.3.1
Output of podman info
:
N/A
Package info (e.g. output of rpm -q podman
or apt list podman
or brew info podman
):
N/A
Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
No, same if-condition exist in the latest commit in main (d20dbcd) branch.