-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
e2e: fix run_volume_test #16989
e2e: fix run_volume_test #16989
Conversation
When SELinux is running in enforcing mode, this test needs to add an suffix :Z to the volume mount. Signed-off-by: Toshiki Sonoda <[email protected]>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rhatdan, sstosh 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 |
There seems to be something magic about $ i=quay.io/libpod/testimage:20221018
$ mkdir -p /tmp/foo foo
$ touch /tmp/foo/myfile foo/myfile
$ bin/podman run -v /tmp/foo:/data $i ls -l /data/myfile
-rw-rw-r-- 1 root root 0 Jan 4 14:05 /data/myfile
$ bin/podman run -v $(pwd)/foo:/data $i ls -l /data/myfile
ls: /data/myfile: Permission denied ---- but works with :Z
! Neither /tmp nor pwd work when given the dirname, not the file path
$ bin/podman run -v /tmp/foo:/data $i ls -l /data
ls: can't open '/data': Permission denied
total 0 Why that is, I defer to you. |
ls -ldZ /tmp/foo Might be a (Dir) read allowed, if we switched to touch it should blow up. |
$ sesearch -A -s container_t -c dir -p read | grep tmp |
/lgtm |
When SELinux is running in enforcing mode,
this test needs to add an suffix :Z to the volume mount.
Signed-off-by: Toshiki Sonoda [email protected]
Does this PR introduce a user-facing change?