Skip to content
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

lxd/apparmor/lxc: reorganize mount options rules for priv containers #13565

Merged

Conversation

simondeziel
Copy link
Member

As noticed by Aleks we have duplicated mount options rules for unprivileged containers.

The apparmor parser does rule deduplication so it doesn't really matter. However, the "limited" part of the "Allow limited modification of mount propagation" comment was misleading. As such, it's best to avoid the duplicated rules and make it clear that privileged containers have limited permissions while unprivileged ones have unlimited permissions for mount options.

Fixes "lxd/apparmor/lxc: remove dup mount options rules" commit 2e55b23.

lxd/apparmor/lxc: reorganize mount options rules for priv containers

As noticed by Aleks we have duplicated mount options rules for unprivileged
containers.

The apparmor parser does rule deduplication so it doesn't really matter.
However, the "limited" part of the "Allow limited modification of mount
propagation" comment was misleading. As such, it's best to avoid the duplicated
rules and make it clear that privileged containers have limited permissions
while unprivileged ones have unlimited permissions for mount options.

Fixes "lxd/apparmor/lxc: remove dup mount options rules"
commit 2e55b23.

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>

lxd/apparmor/lxc: reorganize mount options rules for priv containers

Signed-off-by: Simon Deziel <simon.deziel@canonical.com>
@simondeziel simondeziel marked this pull request as ready for review June 7, 2024 21:38
@tomponline tomponline merged commit a45f963 into canonical:main Jun 8, 2024
29 checks passed
@simondeziel simondeziel deleted the lxd-apparmor-dedup-priv-regression branch October 10, 2024 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants