Skip to content

interfaces/apparmor: don't panic when preparing devmode profiles - #8

Open
ernestl wants to merge 1 commit into
masterfrom
cursor/remove-apparmor-devmode-panic-8ae6
Open

interfaces/apparmor: don't panic when preparing devmode profiles#8
ernestl wants to merge 1 commit into
masterfrom
cursor/remove-apparmor-devmode-panic-8ae6

Conversation

@ernestl

@ernestl ernestl commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?

The leftover panic() in the AppArmor backend was a 2.54.3 security-release workaround for UC16 first-boot seeding with a devmode snap in the seed. The comment said it would be removed or adapted before landing on master, but it stayed.

This change:

  • Records the core and snapd snaps when they are set up, so later profile generation (including for other snaps in the same snapd lifetime) can pick the right snap-confine transition target without a daemon restart.
  • Falls back to the host /usr/lib/snapd/snap-confine profile when neither snap is known yet, matching the core-only case. This also covers classic systems that only have the distro package.

The old panic test is replaced with coverage for the fallback and for remembering core after it is set up.

Open in Web Open in Cursor 

The leftover security-release panic was only meant to exist on the 2.54.3
branch. Remember core/snapd when those snaps are set up, and fall back to
the host snap-confine profile when neither is known yet.

Co-authored-by: Ernest Lotter <ernest.lotter@gmail.com>
@ernestl
ernestl marked this pull request as ready for review September 1, 2026 07:47
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