-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config: drop /sys/dev/block from masked paths #2278
base: main
Are you sure you want to change the base?
Conversation
there is no real advantage in masking this path, since this information is already available under /sys/devices. In fact, the files under /sys/dev/block are just symlinks. [root@953139a2851f /]# ls -l /sys/dev/block/252\:0 lrwxrwxrwx. 1 root root 0 Dec 17 12:47 /sys/dev/block/252:0 -> ../../devices/virtual/block/zram0 Fixes: containers#2277 Fixes: https://issues.redhat.com/browse/RHEL-3115 Signed-off-by: Giuseppe Scrivano <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe 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:
Approvers can indicate their approval by writing |
Ephemeral COPR build failed. @containers/packit-build please check. |
I thought this originally was something about lsblk causing issues where apps would think they had access to blk devices and then blew up with permission denied, and this caused tools to no longer think the devices was there. Although I might be misremembering. Anyways I am fine with this change. LGTM |
lsblk works fine after this change:
|
Right that is my point, the complaint was that it reported blk devices which from the containers point of view, were not actionable, so the code within the container attempts to do something with them, which generates a permission denied. If as in the current behaviour, id sees no blk devices it continues on happily. |
I totally support the unmasking because of problems exposed in containers/podman#13708. Its origins where https://bugzilla.redhat.com/show_bug.cgi?id=1772993 related to exposing host storage information inside an unprivileged container. The masking of the symlinks in /sys/dev/block didn't actually achieve this (mentioned previous - #2277, except where lsblk was considered the definitive exposure) because the expose was still present in |
there is no real advantage in masking this path, since this information is already available under /sys/devices. In fact, the files under /sys/dev/block are just symlinks.
[root@953139a2851f /]# ls -l /sys/dev/block/252:0 lrwxrwxrwx. 1 root root 0 Dec 17 12:47 /sys/dev/block/252:0 -> ../../devices/virtual/block/zram0
Fixes: #2277
Fixes: https://issues.redhat.com/browse/RHEL-3115