Use drop-ins file in /etc/login.defs.d/#14438
Use drop-ins file in /etc/login.defs.d/#14438teacup-on-rockingchair wants to merge 16 commits intoComplianceAsCode:masterfrom
Conversation
|
Skipping CI for Draft Pull Request. |
139bb2c to
785f08f
Compare
|
This datastream diff is auto generated by the check Click here to see the full diffOVAL for rule 'xccdf_org.ssgproject.content_rule_set_password_hashing_algorithm_logindefs' differs.
--- oval:ssg-set_password_hashing_algorithm_logindefs:def:1
+++ oval:ssg-set_password_hashing_algorithm_logindefs:def:1
@@ -1,2 +1,2 @@
criteria AND
-criterion oval:ssg-test_set_password_hashing_algorithm_logindefs:tst:1
+criterion oval:ssg-test_password_hashing_algorithm_logindefs:tst:1
bash remediation for rule 'xccdf_org.ssgproject.content_rule_set_password_hashing_algorithm_logindefs' differs.
--- xccdf_org.ssgproject.content_rule_set_password_hashing_algorithm_logindefs
+++ xccdf_org.ssgproject.content_rule_set_password_hashing_algorithm_logindefs
@@ -7,6 +7,7 @@
# Allow multiple algorithms, but choose the first one for remediation
#
var_password_hashing_algorithm="$(echo $var_password_hashing_algorithm | cut -d \| -f 1)"
+
# Strip any search characters in the key arg so that the key can be replaced without
# adding any search characters to the config file.
bash remediation for rule 'xccdf_org.ssgproject.content_rule_set_password_hashing_min_rounds_logindefs' differs.
--- xccdf_org.ssgproject.content_rule_set_password_hashing_min_rounds_logindefs
+++ xccdf_org.ssgproject.content_rule_set_password_hashing_min_rounds_logindefs
@@ -2,6 +2,8 @@
if rpm --quiet -q kernel-core; then
var_password_hashing_min_rounds_login_defs=''
+
+
config_file=/etc/login.defs
bash remediation for rule 'xccdf_org.ssgproject.content_rule_accounts_password_warn_age_login_defs' differs.
--- xccdf_org.ssgproject.content_rule_accounts_password_warn_age_login_defs
+++ xccdf_org.ssgproject.content_rule_accounts_password_warn_age_login_defs
@@ -2,6 +2,7 @@
if rpm --quiet -q kernel-core && { rpm --quiet -q shadow-utils; }; then
var_accounts_password_warn_age_login_defs=''
+
# Strip any search characters in the key arg so that the key can be replaced without
# adding any search characters to the config file.
bash remediation for rule 'xccdf_org.ssgproject.content_rule_ensure_logrotate_activated' differs.
--- xccdf_org.ssgproject.content_rule_ensure_logrotate_activated
+++ xccdf_org.ssgproject.content_rule_ensure_logrotate_activated
@@ -2,6 +2,8 @@
if rpm --quiet -q kernel-core && { rpm --quiet -q logrotate; }; then
LOGROTATE_CONF_FILE='/etc/logrotate.conf'
+
+
if ! rpm -q --quiet "crontabs" ; then |
4e56b60 to
2ebf750
Compare
|
@ComplianceAsCode/oracle-maintainers, @ComplianceAsCode/red-hatters, @ComplianceAsCode/ubuntu-maintainers can you please give this one a look |
mpurg
left a comment
There was a problem hiding this comment.
Great addition! Ubuntu datastreams look ok except for one variable in the metadata.
| contains: {{{ line_regex }}} | ||
| patterns: | ||
| - '*.defs' | ||
| register: _login_defs_has_parameter |
There was a problem hiding this comment.
I think we need to make this unique.
| else | ||
| echo "PASS_WARN_AGE 0" >> {{{ login_defs_path }}} | ||
| fi | ||
| echo "PASS_WARN_AGE 7" >> {{{ login_defs_drop_in_path }}} |
There was a problem hiding this comment.
This file and greater_value_dropin.pass.sh appear to be same. Please double check.
|
|
||
| {{{ ansible_instantiate_variables("var_password_hashing_min_rounds_login_defs") }}} | ||
|
|
||
| {{% if product == 'sle16' %}} |
There was a problem hiding this comment.
Should this also include slmicro6
a886d60 to
d7a3c69
Compare
Make sure on sle16 we use /etc to apply and verify compliance to the rule, while /usr/etc maight be use only in case /etc files do not exist
…config file if not present in /etc
… file if not present in /etc
Macro allows to check both dropin file in conf.d subdir or file directly in /etc
…-in configuration
…ile and remediated in drop-in
Co-authored-by: Matthew Burket <m@tthewburket.com>
…ng_algorithm/set_password_hashing_algorithm_logindefs/oval/shared.xml Co-authored-by: Matthew Burket <m@tthewburket.com>
d7a3c69 to
b354563
Compare
…ng_algorithm/set_password_hashing_min_rounds_logindefs/ansible/shared.yml Co-authored-by: Matthew Burket <m@tthewburket.com>
|
@teacup-on-rockingchair: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Mab879
left a comment
There was a problem hiding this comment.
Approving, leaving open for a SUSE maintainer to review as well.
Description:
Rationale: