-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change rule to use variable when auditing faillock
Some benchmarks specify different paths when monitoring the faillock file, depending on if a permanent faillock path has been configured. This updates the audit_rules_login_event_faillock to use the variable var_accounts_passwords_pam_faillock_dir instead of the profile faillock_path
- Loading branch information
1 parent
4df8db3
commit ceb7ea6
Showing
18 changed files
with
93 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,4 @@ interactive: false | |
options: | ||
ol8: "/var/log/faillock" | ||
default: "/var/log/faillock" | ||
run: "/var/run/faillock" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/auditctl_correct.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wa -k logins" >> /etc/audit/audit.rules | ||
{{% endif %}} | ||
sed -i "s%^ExecStartPost=.*%ExecStartPost=-/sbin/auditctl%" /usr/lib/systemd/system/auditd.service |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/auditctl_correct_extra_permission.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% endif %}} | ||
sed -i "s%^ExecStartPost=.*%ExecStartPost=-/sbin/auditctl%" /usr/lib/systemd/system/auditd.service |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/auditctl_correct_without_key.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wa" >> /etc/audit/audit.rules | ||
{{% endif %}} | ||
sed -i "s%^ExecStartPost=.*%ExecStartPost=-/sbin/auditctl%" /usr/lib/systemd/system/auditd.service |
7 changes: 6 additions & 1 deletion
7
shared/templates/audit_rules_login_events/tests/auditctl_wrong_rule.fail.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p w -k logins" >> /etc/audit/audit.rules | ||
{{% endif %}} | ||
|
||
sed -i "s%^ExecStartPost=.*%ExecStartPost=-/sbin/auditctl%" /usr/lib/systemd/system/auditd.service |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/auditctl_wrong_rule_without_key.fail.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p w" >> /etc/audit/audit.rules | ||
{{% endif %}} | ||
sed -i "s%^ExecStartPost=.*%ExecStartPost=-/sbin/auditctl%" /usr/lib/systemd/system/auditd.service |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/augenrules_correct.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wa -k login" >> /etc/audit/rules.d/login.rules | ||
{{% endif %}} |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/augenrules_correct_extra_permission.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wra -k login" >> /etc/audit/rules.d/login.rules | ||
{{% endif %}} |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/augenrules_correct_without_key.pass.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p wa" >> /etc/audit/rules.d/login.rules | ||
{{% endif %}} |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/augenrules_wrong_rule.fail.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p w -k login" >> /etc/audit/rules.d/login.rules | ||
{{% endif %}} |
6 changes: 5 additions & 1 deletion
6
shared/templates/audit_rules_login_events/tests/augenrules_wrong_rule_without_key.fail.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
|
||
{{% if PATH_IS_VARIABLE %}} | ||
{{{ bash_instantiate_variables("var_accounts_passwords_pam_faillock_dir") }}} | ||
echo "-w $var_accounts_passwords_pam_faillock_dir -p wra -k logins" >> /etc/audit/audit.rules | ||
{{% else %}} | ||
echo "-w {{{ PATH }}} -p w" >> /etc/audit/rules.d/login.rules | ||
{{% endif %}} |