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: Add support for apparmor unconfined profile mode #12713

Conversation

alexmurray
Copy link
Contributor

The unconfined profile mode adds (unconfined) to the profile label and is now used in snapd for lxd since canonical/snapd#13333 was merged recently. lxd needs to treat this the same as the "unconfined" label used previously AND we also add a couple required signal rules and remove any peer restriction - this allows LXD to work as expected again in snapd.

lxd/sys/apparmor.go Outdated Show resolved Hide resolved
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alexmurray

Could you advise what combination of kernel/ubuntu release and snapd version is needed to use the new "(unconfined)" profiles?

@alexmurray
Copy link
Contributor Author

AppArmor unconfined profile mode is supported in the kernel in Ubuntu 23.10 and 24.04 whilst for snapd this is currently only in snapd edge/master.

This should be treated the same as being in the unconfined profile.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
Allow dnsmasq to be restarted / killed and remove the peer restriction on the
signal rule for the archive profile to ensure it can be sent by a lxd which is
confined under a profile with the unconfined flag.

Signed-off-by: Alex Murray <alex.murray@canonical.com>
Signed-off-by: Alex Murray <alex.murray@canonical.com>
@alexmurray alexmurray force-pushed the add-support-for-apparmor-unconfined-profile-mode branch from 54268e7 to e6901cd Compare January 9, 2024 11:19
Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Confirmed with @alexmurray separately that this will need to be landed in LXD (and the 5.0 LTS series) in order to be compatible with forthcoming snapd 2.62 release (that contains canonical/snapd#13333). Otherwise LXD won't work.

@tomponline tomponline merged commit 47c9f67 into canonical:main Jan 18, 2024
26 checks passed
tomponline added a commit to tomponline/lxd-pkg-snap that referenced this pull request Feb 1, 2024
Cherry-picks canonical/lxd#12713

Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
This pull request was closed.
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