Skip to content

sys-apps/policycoreutils: update the right store#23332

Closed
t-lo wants to merge 1 commit intogentoo:masterfrom
t-lo:policycoreutils-semodule-fix
Closed

sys-apps/policycoreutils: update the right store#23332
t-lo wants to merge 1 commit intogentoo:masterfrom
t-lo:policycoreutils-semodule-fix

Conversation

@t-lo
Copy link
Copy Markdown
Contributor

@t-lo t-lo commented Dec 16, 2021

The policycoreutils ebuild calls semodule in postinst to update SELinux stores. It does not, however, tells semodule the correct ROOT to use, so installing policycoreutils in a crossdev environment will actually update the host's store.

This patch adds -S "${ROOT:-/}" to the semodule call so the correct environment is updated.

First seen + fixed in Flatcar Container Linux: flatcar-archive/coreos-overlay#1502

The policycoreutils ebuild calls 'semodule' in postinst to update
SELinux stores. It does not, however, tells semodule the correct ROOT
to use, so installing policycoreutils in a crossdev environment will
actually update the *host's* store.

This patch adds '-S "${ROOT:-/}"' to the 'semodule' call so the correct
environment is updated.

First seen + fixed in Flatcar Container Linux:
flatcar-archive/coreos-overlay#1502

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
@gentoo-bot
Copy link
Copy Markdown

Pull Request assignment

Submitter: @t-lo
Areas affected: ebuilds
Packages affected: sys-apps/policycoreutils

sys-apps/policycoreutils: @gentoo/selinux

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Dec 16, 2021
@gentoo-repo-qa-bot
Copy link
Copy Markdown
Collaborator

Pull request CI report

Report generated at: 2021-12-16 19:25 UTC
Newest commit scanned: 951b921
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/54a29a73ae/output.html

@thesamesam
Copy link
Copy Markdown
Member

thesamesam commented Dec 17, 2021

Nice catch & thank you for submitting this up to us!

EDIT: Do wonder if we should be using -p for ${SYSROOT} or something but that's another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants