Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rsyslog_cron_logging for bootable containers #12575

Merged

Conversation

matusmarhefka
Copy link
Member

Remediation of the rule rsyslog_cron_logging calls systemctl reload which doesn't work in the bootable container build environment and so we use the bash_not_bootc_build macro to not run it there.

Remediation of the rule `rsyslog_cron_logging` calls
`systemctl reload` which doesn't work in the bootable
container build environment and so we use the
`bash_not_bootc_build` macro to not run it there.
@matusmarhefka matusmarhefka added the Image Mode Bootable containers and Image Mode RHEL label Nov 5, 2024
@matusmarhefka matusmarhefka added this to the 0.1.75 milestone Nov 5, 2024
Copy link

github-actions bot commented Nov 5, 2024

Start a new ephemeral environment with changes proposed in this pull request:

rhel8 (from CTF) Environment (using Fedora as testing environment)
Open in Gitpod

Fedora Testing Environment
Open in Gitpod

Oracle Linux 8 Environment
Open in Gitpod

Copy link

github-actions bot commented Nov 5, 2024

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_rsyslog_cron_logging' differs.
--- xccdf_org.ssgproject.content_rule_rsyslog_cron_logging
+++ xccdf_org.ssgproject.content_rule_rsyslog_cron_logging
@@ -6,7 +6,9 @@
 	echo "cron.*	/var/log/cron" >> /etc/rsyslog.d/cron.conf
 fi
 
-systemctl restart rsyslog.service
+if [[ "$OSCAP_BOOTC_BUILD" != "YES" ]] ; then
+    systemctl restart rsyslog.service
+fi
 
 else
     >&2 echo 'Remediation is not applicable, nothing was done'

Copy link

codeclimate bot commented Nov 5, 2024

Code Climate has analyzed commit 9c310a3 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 60.9% (0.0% change).

View more on Code Climate.

@jan-cerny jan-cerny self-assigned this Nov 5, 2024
@jan-cerny jan-cerny merged commit 98d3f2c into ComplianceAsCode:master Nov 6, 2024
100 of 105 checks passed
@matusmarhefka matusmarhefka deleted the bootc_rsyslog_cron_logging branch November 6, 2024 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Image Mode Bootable containers and Image Mode RHEL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants