-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12886 from ggbecker/fix-audit_rules_privileged_co…
…mmands_unix2_chkpwd Fix audit_rules_privileged_commands_unix2_chkpwd
- Loading branch information
Showing
4 changed files
with
28 additions
and
9 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
11 changes: 10 additions & 1 deletion
11
...eged_commands/audit_rules_privileged_commands_unix2_chkpwd/tests/only_chkpwd_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,4 +1,13 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
echo "-a always,exit -F path=/sbin/unix2_chkpwd -F perm=x -F auid>={{{ uid_min }}} -F auid!=unset -F key=privileged" >> /etc/audit/rules.d/privileged.rules | ||
# in SLE the default place to check for the unix2_chkpwd binary as defined in STIG is /sbin/ | ||
# whereas in other products they check in /usr/sbin. They are technically the same, but the OVAL | ||
# check will look for specific directories according to the product. Here for the sake of the | ||
# test scenario setup we invert the binaries so the OVAL fails the check on purpose. | ||
{{%- if product in ["sle15"] %}} | ||
{{%- set unix2_chkpwd_wrong_binary="/usr/sbin/unix2_chkpwd" %}} | ||
{{%- else %}} | ||
{{%- set unix2_chkpwd_wrong_binary="/sbin/unix2_chkpwd" %}} | ||
{{%- endif %}} | ||
echo "-a always,exit -F path={{{ unix2_chkpwd_wrong_binary }}} -F perm=x -F auid>={{{ uid_min }}} -F auid!=unset -F key=privileged" >> /etc/audit/rules.d/privileged.rules |
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
8 changes: 6 additions & 2 deletions
8
...leged_commands/audit_rules_privileged_commands_unix_chkpwd/tests/only_chkpwd_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,4 +1,8 @@ | ||
#!/bin/bash | ||
# packages = audit | ||
|
||
echo "-a always,exit -F path=/sbin/unix_chkpwd -F perm=x -F auid>={{{ uid_min }}} -F auid!=unset -F key=privileged" >> /etc/audit/rules.d/privileged.rules | ||
{{%- if 'sl' in product %}} | ||
{{%- set unix_chkpwd_wrong_binary="/usr/sbin/unix_chkpwd" %}} | ||
{{%- else %}} | ||
{{%- set unix_chkpwd_wrong_binary="/sbin/unix_chkpwd" %}} | ||
{{%- endif %}} | ||
echo "-a always,exit -F path={{{ unix_chkpwd_wrong_binary }}} -F perm=x -F auid>={{{ uid_min }}} -F auid!=unset -F key=privileged" >> /etc/audit/rules.d/privileged.rules |