Skip to content

apparmor: move dlopen() into mac_apparmor_use() check#39826

Merged
keszybz merged 2 commits intosystemd:mainfrom
poettering:apparmor-use-rework
Nov 20, 2025
Merged

apparmor: move dlopen() into mac_apparmor_use() check#39826
keszybz merged 2 commits intosystemd:mainfrom
poettering:apparmor-use-rework

Conversation

@poettering
Copy link
Copy Markdown
Member

This mirrors what we do for mac_selinux_use(), which also loads libselinux.

@poettering poettering added apparmor please-review PR is ready for (re-)review by a maintainer labels Nov 20, 2025
@YHNdnzj YHNdnzj added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Nov 20, 2025
@github-actions github-actions bot added util-lib please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Nov 20, 2025
@YHNdnzj YHNdnzj added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks and removed please-review PR is ready for (re-)review by a maintainer labels Nov 20, 2025
@github-actions github-actions bot added please-review PR is ready for (re-)review by a maintainer and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Nov 20, 2025

if (!mac_apparmor_use()) {
log_debug("Skipping AppArmor initialization: not supported by the kernel or disabled.");
log_debug("Skipping AppArmor initialization: not supported by the kernel, is disabled or libapparmor is not installed.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"not supported by the kernel, disabled, or libapparmor not installed"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

-> #39837.

@keszybz
Copy link
Copy Markdown
Member

keszybz commented Nov 20, 2025

Anyway, let's merge this. The message can be tweaked later.

@keszybz keszybz added ci-failure-appears-unrelated and removed please-review PR is ready for (re-)review by a maintainer labels Nov 20, 2025
@keszybz keszybz merged commit f295cfa into systemd:main Nov 20, 2025
53 of 57 checks passed
yuwata added a commit to yuwata/systemd that referenced this pull request Nov 21, 2025
yuwata added a commit to yuwata/systemd that referenced this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants