Skip to content

apparmor: cleanup - #61695

Open
Duncaen wants to merge 2 commits into
void-linux:masterfrom
Duncaen:apparmor
Open

apparmor: cleanup#61695
Duncaen wants to merge 2 commits into
void-linux:masterfrom
Duncaen:apparmor

Conversation

@Duncaen

@Duncaen Duncaen commented Jul 28, 2026

Copy link
Copy Markdown
Member

No description provided.

@Duncaen
Duncaen force-pushed the apparmor branch 5 times, most recently from 45a361e to d7e1818 Compare July 28, 2026 19:05
- cleanup template
- enable more checks
- remove old custom php-fpm profile
- allow cross building perl library
- move apparmor syscall and library man pages to libapparmor-devel
- add missing python dependencies
@Duncaen
Duncaen force-pushed the apparmor branch 2 times, most recently from 9d6bf26 to e2eb698 Compare July 29, 2026 20:22
Remove the mode switch in the /etc/runit/core-services/09-apparmor.sh
script that causes issues. The `apparmor_parser -C` flag that was used
to set the profiles into complain mode will force profiles that have
the `unconfined` flag set into complain mode instead, which enables further
restrictions that may break things. And there is no alternative flag
to only set profiles that have the enforce flag to complain.

The native kernel module parameter apparmor.mode should be used instead.
As it puts apparmor into complain mode instead of trying to force profiles
into complain mode.

This fixes bwrap when executed by flatpak which has a profile with the
unconfined flag set.
printf '! AppArmor installation problem - ensure you have installed apparmor package\n'
fi
if [ -d /etc/apparmor.d -a -x /usr/bin/apparmor_parser ]; then
find -L /etc/apparmor.d -maxdepth 1 -type f ! -name '*.new-*_*' -exec apparmor_parser -a -- {} +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shame we don't have upstream support for skipping these files (https://gitlab.com/apparmor/apparmor/-/blob/master/utils/apparmor/common.py#L171). AIUI the apparmor tooling has some optimizations when you just run it against the whole directory vs. profile by profile.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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