cmd/snap-confine: don't use apparmor if it is disabled on boot #3243

Merged
merged 1 commit into from Apr 27, 2017

Conversation

Projects
None yet
3 participants
Contributor

zyga commented Apr 26, 2017

If apparmor is not enabled (either in the kernel or on boot) then don't
try to use it, even if it is compiled into snap-confine.

Signed-off-by: Zygmunt Krynicki zygmunt.krynicki@canonical.com

cmd/snap-confine: don't use apparmor if it is disabled on boot
If apparmor is not enabled (either in the kernel or on boot) then don't
try to use it, even if it is compiled into snap-confine.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>

@zyga zyga requested a review from jdstrand Apr 26, 2017

These changes are fine and should have been in place when SC_AA_NOT_APPLICABLE was first implemented. Ie, it is an obvious (in retrospect) bug that snap-confine is trying to change_onexec and change_hat when there is nothing it can change to.

Note, all the discussion on whether or not SC_AA_NOT_APPLICABLE should be a thing already happened in its PR and the decision was made that it is more important to fail open when apparmor is unavailable than to fail closed. This PR just goes along with the previous decision.

Contributor

jdstrand commented Apr 26, 2017

That said, it would be nice to see a test here to tack onto any tests for SC_AA_NOT_APPLICABLE. I won't block on that though.

Collaborator

mvo5 commented Apr 26, 2017

Looks good to me, but 👍 for a test (but I agree we should not block on it)

@mvo5 mvo5 merged commit 3bbadc5 into snapcore:master Apr 27, 2017

5 of 6 checks passed

xenial-amd64 autopkgtest finished (failure)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
xenial-i386 autopkgtest finished (success)
Details
xenial-ppc64el autopkgtest finished (success)
Details
yakkety-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@zyga zyga deleted the zyga:fix-aa-reexec branch Apr 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment