-
Notifications
You must be signed in to change notification settings - Fork 685
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
Remove quotes from journald config parameters #10790
Remove quotes from journald config parameters #10790
Conversation
The quotes may lead to unexpected behaviour such as config not being applied. The default journald config does not use quotes around the parameter values.
Hi @Mackemania. Thanks for your PR. I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This datastream diff is auto generated by the check Click here to see the full diffbash remediation for rule 'xccdf_org.ssgproject.content_rule_journald_compress' differs.
--- xccdf_org.ssgproject.content_rule_journald_compress
+++ xccdf_org.ssgproject.content_rule_journald_compress
@@ -16,10 +16,10 @@
if [ -z "$line_number" ]; then
# There was no match of '^#\s*Compress', insert at
# the end of the file.
- printf '%s\n' "Compress='yes'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "Compress=yes" >> "/etc/systemd/journald.conf"
else
head -n "$(( line_number - 1 ))" "/etc/systemd/journald.conf.bak" > "/etc/systemd/journald.conf"
- printf '%s\n' "Compress='yes'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "Compress=yes" >> "/etc/systemd/journald.conf"
tail -n "+$(( line_number ))" "/etc/systemd/journald.conf.bak" >> "/etc/systemd/journald.conf"
fi
# Clean up after ourselves.
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_journald_compress' differs.
--- xccdf_org.ssgproject.content_rule_journald_compress
+++ xccdf_org.ssgproject.content_rule_journald_compress
@@ -1,4 +1,4 @@
-- name: Setting shell-quoted shell-style assignment of 'Compress' to 'yes' in '/etc/systemd/journald.conf'
+- name: Setting unquoted shell-style assignment of 'Compress' to 'yes' in '/etc/systemd/journald.conf'
block:
- name: Check for duplicate values
@@ -24,7 +24,7 @@
path: /etc/systemd/journald.conf
create: true
regexp: ^\s*Compress=
- line: Compress="yes"
+ line: Compress=yes
state: present
insertbefore: ^# Compress
validate: /usr/bin/bash -n %s
bash remediation for rule 'xccdf_org.ssgproject.content_rule_journald_forward_to_syslog' differs.
--- xccdf_org.ssgproject.content_rule_journald_forward_to_syslog
+++ xccdf_org.ssgproject.content_rule_journald_forward_to_syslog
@@ -16,10 +16,10 @@
if [ -z "$line_number" ]; then
# There was no match of '^#\s*ForwardToSyslog', insert at
# the end of the file.
- printf '%s\n' "ForwardToSyslog='yes'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "ForwardToSyslog=yes" >> "/etc/systemd/journald.conf"
else
head -n "$(( line_number - 1 ))" "/etc/systemd/journald.conf.bak" > "/etc/systemd/journald.conf"
- printf '%s\n' "ForwardToSyslog='yes'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "ForwardToSyslog=yes" >> "/etc/systemd/journald.conf"
tail -n "+$(( line_number ))" "/etc/systemd/journald.conf.bak" >> "/etc/systemd/journald.conf"
fi
# Clean up after ourselves.
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_journald_forward_to_syslog' differs.
--- xccdf_org.ssgproject.content_rule_journald_forward_to_syslog
+++ xccdf_org.ssgproject.content_rule_journald_forward_to_syslog
@@ -1,5 +1,4 @@
-- name: Setting shell-quoted shell-style assignment of 'ForwardToSyslog' to 'yes'
- in '/etc/systemd/journald.conf'
+- name: Setting unquoted shell-style assignment of 'ForwardToSyslog' to 'yes' in '/etc/systemd/journald.conf'
block:
- name: Check for duplicate values
@@ -25,7 +24,7 @@
path: /etc/systemd/journald.conf
create: true
regexp: ^\s*ForwardToSyslog=
- line: ForwardToSyslog="yes"
+ line: ForwardToSyslog=yes
state: present
insertbefore: ^# ForwardToSyslog
validate: /usr/bin/bash -n %s
bash remediation for rule 'xccdf_org.ssgproject.content_rule_journald_storage' differs.
--- xccdf_org.ssgproject.content_rule_journald_storage
+++ xccdf_org.ssgproject.content_rule_journald_storage
@@ -16,10 +16,10 @@
if [ -z "$line_number" ]; then
# There was no match of '^#\s*Storage', insert at
# the end of the file.
- printf '%s\n' "Storage='persistent'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "Storage=persistent" >> "/etc/systemd/journald.conf"
else
head -n "$(( line_number - 1 ))" "/etc/systemd/journald.conf.bak" > "/etc/systemd/journald.conf"
- printf '%s\n' "Storage='persistent'" >> "/etc/systemd/journald.conf"
+ printf '%s\n' "Storage=persistent" >> "/etc/systemd/journald.conf"
tail -n "+$(( line_number ))" "/etc/systemd/journald.conf.bak" >> "/etc/systemd/journald.conf"
fi
# Clean up after ourselves.
ansible remediation for rule 'xccdf_org.ssgproject.content_rule_journald_storage' differs.
--- xccdf_org.ssgproject.content_rule_journald_storage
+++ xccdf_org.ssgproject.content_rule_journald_storage
@@ -1,5 +1,4 @@
-- name: Setting shell-quoted shell-style assignment of 'Storage' to 'persistent' in
- '/etc/systemd/journald.conf'
+- name: Setting unquoted shell-style assignment of 'Storage' to 'persistent' in '/etc/systemd/journald.conf'
block:
- name: Check for duplicate values
@@ -25,7 +24,7 @@
path: /etc/systemd/journald.conf
create: true
regexp: ^\s*Storage=
- line: Storage="persistent"
+ line: Storage=persistent
state: present
insertbefore: ^# Storage
validate: /usr/bin/bash -n %s |
Code Climate has analyzed commit ab7ec1f 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 53.5% (0.0% change). View more on Code Climate. |
The Automatus failure is not related to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
This PR is also related to: https://bugzilla.redhat.com/show_bug.cgi?id=2169857 |
Description:
Rationale: