-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Remove check for apparmor_parser in apparmor.IsEnabled() #2554
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
Remove check for apparmor_parser in apparmor.IsEnabled() #2554
Conversation
OTOH Not all distro have /sbin in the $PATH, so we should test both /sbin and $PATH
7d0de63 to
ae891b5
Compare
|
@AkihiroSuda you dismissed the review comment, I still added the check for |
|
LGTM 👍 |
ae891b5 to
a5d5280
Compare
|
I proposed to remove the check with respect to the discussions on #2554 (comment) and #2554 (comment). The original commit where this check has been added is 44c7afa (cc @tifayuki) |
The code was actually in a different repository back then. Tracking it back to the original repo, this was done in docker-archive/libcontainer#532 which describes the reason for this (docker tries to exec this binary and fails). More interestingly, this check was later removed (see docker-archive/libcontainer#645) but somehow the change was not propagated to runc. So, yes, I agree, there's no need to check for the binary existence |
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.
We should also drop the container environment variable check.
54d3986
a5d5280 to
54d3986
Compare
Dropped that check as well 👍 |
|
Now shellcheck is failing. You need to rebase on top of #2549 (or rather, |
54d3986 to
707b06d
Compare
Rebased on top of the latest master branch ✔️ |
|
Looks like the master is broken, too. :) |
Once #2561 is fixed you'll need to rebase this one; sorry for the trouble |
@saschagrunert the fix is merged; please rebase |
The `apparmor_parser` binary is not really required for a system to run AppArmor from a runc perspective. How to apply the profile is more in the responsibility of higher level runtimes like Podman and Docker, which may do the binary check on their own. Signed-off-by: Sascha Grunert <[email protected]>
707b06d to
bfb4ea1
Compare
Thanks for the hint, rebased on top of the latest master branch. |
kolyshkin
left a comment
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
|
LGTM |
|
@kolyshkin @AkihiroSuda regarding #2554 (comment)
Wondering if the env-var is still relevant when running containerised ( (originally was added to address moby/moby#5529) /cc @tianon PTAL |
Not all distributions ship theapparmor_parserin/sbin/(like NixOS). To be able to use the AppArmor feature on such distributions as well we have to check for theapparmor_parserin the$PATHenvironment variable.New approach: The
apparmor_parserbinary is not really required for a system to run AppArmor from a runc perspective. How to apply the profile is more in the responsibility of higher level runtimes like Podman and Docker, which may do the binary check on their ownPossible release note: