Repository navigation
Conversation
The SCE engine (src/SCE/sce_engine.c, packaged in engine-sce) falls back to oscap-run-sce-script when an SCE script cannot be executed, for example when /tmp is mounted noexec. The helper was packaged in utils through the %{_bindir}/* glob, and engine-sce does not require utils, so SCE checks ended in error on systems without utils. Move the helper to the engine-sce subpackage, next to its only caller.
Fixes OpenSCAP#2414
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #2414
The SCE engine (
src/SCE/sce_engine.c, built intolibopenscap_sceand packaged in theengine-scesubpackage) falls back tooscap-run-sce-scriptwhen an SCE script can't be executed, for example when/tmpis mountednoexec, as CIS and ANSSI hardening require. Inopenscap.spec, the helper ended up in theutilssubpackage through the%{_bindir}/*glob, andengine-scedoesn't requireutils, so on systems withoututilsevery SCE check ended inerror.This PR moves
%{_bindir}/oscap-run-sce-scriptto theengine-scesubpackage, next to its only caller, and excludes it fromutils.Testing
rpmspec -Pparses the modified spec; all subpackages are unchanged otherwise.tests/sce/sce_xccdf.xml(rule-1000,bash_passer.sh) on anoexectmpfs: without the helper in PATH the rule ends inerror; with the helper installed it passes; in a directory that allows execution it passes without the helper.oscap-run-sce-scriptbesidessce_engine.cand the install rule inutils/CMakeLists.txt.Notes
maint-1.3has the same%filesentries; I'm happy to open a backport if useful.scannersubpackage instead, as suggested in the issue, I can change it.