-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
make our testsuite pass in a podman container with default privs #19800
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One minor suggestion, and one question.
geteuid() without CAP_SYS_ADMIN is not enough to do unrestricted seccomp(). Hence tighten the check. See: systemd#19746
These tests require properly privileged root users, hence skip things when we don't have CAP_SYS_ADMIN. Fixes: systemd#19746
All global but not exported variables should be "static" in our codebase, add "static" to one more such variable hence.
Force pushed a new version changing that one check to geteuid(). For the other thing see comment above. Uprgading green label |
Seems to work fine under Podman. Under Docker, a single test failure remains:
|
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd#19800 (comment)
With #19816 applied:
|
In theory it should. At least according to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=840829 resp. moby/moby#40360 That said, it's possible that cgroupsv2 support is still buggy. |
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: #19800 (comment)
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd#19800 (comment)
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd/systemd#19800 (comment)
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd/systemd#19800 (comment)
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd/systemd#19800 (comment) (cherry picked from commit d414f41)
We might get EPERM on certain clone() flag combinations. Apparently in Docker for example. Prompted by: systemd/systemd#19800 (comment)
Our tests so far mostly did a geteuid() == 0 check to guard privileged operations. Podman apparently invokes containers by default with geteuid() == 0 but then takes most caps away, which then means we'll try the privleged operaitons and fail. Let's tweak the conditioning hence.
Fixes: #19746