Skip to content

Allow package scriptlets to run in rpm_script_t - #3089

Merged
Conan-Kudo merged 1 commit into
OSInside:mainfrom
aale24:selinux-rpm-script-transition
Oct 14, 2026
Merged

Conan-Kudo merged 1 commit into
OSInside:mainfrom
aale24:selinux-rpm-script-transition

Conversation

@aale24

@aale24 aale24 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #3088

With SELinux enforcing and kiwi running as kiwi_t, package scriptlets fail because the switch to rpm_script_t is denied:

avc: denied { transition } for comm="dnf5" scontext=...:kiwi_t:s0 tcontext=...:rpm_script_t:s0 tclass=process

The build then aborts in the bootstrap phase. unconfined_domain() doesn't grant this transition, so this adds rpm_transition_script(kiwi_t, kiwi_roles), the same interface the base policy uses for anaconda_t, livecd_t and install_t.

Tested on Amazon Linux 2027 (x86_64 and aarch64) with SELinux enforcing: without the change the bootstrap fails; with it the full image build succeeds and no denials are logged.

With SELinux enforcing, kiwi_t is not allowed to transition to
rpm_script_t, so every package scriptlet fails and the build aborts
in the bootstrap phase. Add rpm_transition_script(), as the base
policy does for other installers like anaconda_t and livecd_t.

Fixes OSInside#3088

Assisted-by: Claude:claude-opus-5-5
@Conan-Kudo
Conan-Kudo merged commit f85d967 into OSInside:main Oct 14, 2026
12 checks passed
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.

kiwi-selinux: package scriptlets fail with SELinux enforcing (kiwi_t → rpm_script_t transition denied)

2 participants