Rename cron package to cronie for RHEL10 product#12463
Conversation
|
🤖 A k8s content image for this PR is available at: Click here to see how to deploy itIf you alread have Compliance Operator deployed: Otherwise deploy the content and operator together by checking out ComplianceAsCode/compliance-operator and: |
|
Ok, |
cron package to croniecron package to cronie for RHEL10 product
|
Updated to use |
| name: package_installed | ||
| vars: | ||
| pkgname: cron | ||
| pkgname@rhel10: cronie |
There was a problem hiding this comment.
Should a pkgname@rhel10 key be added also in the template vars in rule service_cron_enabled?
There was a problem hiding this comment.
Checked RHEL distros and the service is named crond, not cron. Added new commit with the fix for RHEL distros
|
This datastream diff is auto generated by the check Click here to see the full diffNew content has different text for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled'.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -7,8 +7,8 @@
preconfigured times. It is required by almost all systems to perform necessary
maintenance tasks, such as notifying root of system activity.
-The cron service can be enabled with the following command:
-$ sudo systemctl enable cron.service
+The crond service can be enabled with the following command:
+$ sudo systemctl enable crond.service
[reference]:
11
OVAL for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- oval:ssg-service_cron_enabled:def:1
+++ oval:ssg-service_cron_enabled:def:1
@@ -1,7 +1,7 @@
criteria AND
-criterion oval:ssg-test_service_cron_package_cron_installed:tst:1
+criterion oval:ssg-test_service_crond_package_cron_installed:tst:1
criteria AND
-criterion oval:ssg-test_service_running_cron:tst:1
+criterion oval:ssg-test_service_running_crond:tst:1
criteria OR
-criterion oval:ssg-test_multi_user_wants_cron:tst:1
-criterion oval:ssg-test_multi_user_wants_cron_socket:tst:1
+criterion oval:ssg-test_multi_user_wants_crond:tst:1
+criterion oval:ssg-test_multi_user_wants_crond_socket:tst:1
OCIL for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- ocil:ssg-service_cron_enabled_ocil:questionnaire:1
+++ ocil:ssg-service_cron_enabled_ocil:questionnaire:1
@@ -1,8 +1,8 @@
Run the following command to determine the current status of the
-cron service:
-$ sudo systemctl is-active cron
+crond service:
+$ sudo systemctl is-active crond
If the service is running, it should return the following: active
Is it the case that ?
bash remediation for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -2,9 +2,9 @@
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
-"$SYSTEMCTL_EXEC" unmask 'cron.service'
-"$SYSTEMCTL_EXEC" start 'cron.service'
-"$SYSTEMCTL_EXEC" enable 'cron.service'
+"$SYSTEMCTL_EXEC" unmask 'crond.service'
+"$SYSTEMCTL_EXEC" start 'crond.service'
+"$SYSTEMCTL_EXEC" enable 'crond.service'
else
>&2 echo 'Remediation is not applicable, nothing was done'
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -1,13 +1,13 @@
-- name: Enable cron Service - Enable service cron
+- name: Enable cron Service - Enable service crond
block:
- name: Gather the package facts
package_facts:
manager: auto
- - name: Enable cron Service - Enable Service cron
+ - name: Enable cron Service - Enable Service crond
ansible.builtin.systemd:
- name: cron
+ name: crond
enabled: true
state: started
masked: false
blueprint remediation for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -1,3 +1,3 @@
[customizations.services]
-enabled = ["cron"]
+enabled = ["crond"]
puppet remediation for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -1,7 +1,7 @@
-include enable_cron
+include enable_crond
-class enable_cron {
- service {'cron':
+class enable_crond {
+ service {'crond':
enable => true,
ensure => 'running',
}
kickstart remediation for rule 'xccdf_org.ssgproject.content_rule_service_cron_enabled' differs.
--- xccdf_org.ssgproject.content_rule_service_cron_enabled
+++ xccdf_org.ssgproject.content_rule_service_cron_enabled
@@ -1,2 +1,2 @@
-service enable cron
+service enable crond |
|
Code Climate has analyzed commit 3e8ae2c 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 59.5% (0.0% change). View more on Code Climate. |
jan-cerny
left a comment
There was a problem hiding this comment.
I have checked the built rules package_cron_installed and service_cron_enabled in rhel10 product.
Description:
In RHEL, package is named
cronieandcronis only alias. Use thecroniename for RHEL10 product.Rationale:
In RHEL10,
cronalias is not available.Review Hints:
oscap xccdf eval --rule xccdf_org.ssgproject.content_rule_package_cron_installed ssg-rhel10-ds.xmland remove/installcronieon various RHEL versions