Skip to content

Commit

Permalink
Merge pull request #9214 from vojtapolasek/install_postfix_rule_stabi…
Browse files Browse the repository at this point in the history
…lization

add new rule package_postfix_installed (stabilization)
  • Loading branch information
Mab879 committed Jul 25, 2022
2 parents 74001e6 + cea07f2 commit 5caa381
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 2 deletions.
34 changes: 34 additions & 0 deletions linux_os/guide/services/mail/package_postfix_installed/rule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
documentation_complete: true

title: 'The Postfix package is installed'

description: |-
A mail server is required for sending emails.
{{{ describe_package_install(package="postfix") }}}
rationale: |-
Emails can be used to notify designated personnel about important
system events such as failures or warnings.
severity: medium

identifiers:
cce@rhel8: CCE-85983-5
cce@rhel9: CCE-85984-3

references:
srg: SRG-OS-000046-GPOS-00022
stigid@rhel8: RHEL-08-030030

ocil_clause: 'the package is not installed'

ocil: '{{{ ocil_package(package="postfix") }}}'

fixtext: '{{{ describe_package_install(package="postfix") }}}'

srg_requirement: '{{{ srg_requirement_package_installed("postfix") }}}'

template:
name: package_installed
vars:
pkgname: postfix
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
create: true
state: present

- name: Update postfix aliases
ansible.builtin.command:
cmd: newaliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# packages = postfix

echo "root: system.administrator@mail.mil" > /etc/aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# packages = postfix

rm -f /etc/aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# packages = postfix

sed -i '/root/d' /etc/aliases
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# packages = postfix

echo "root: invalid_address" > /etc/aliases
1 change: 1 addition & 0 deletions products/rhel8/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ selections:

# RHEL-08-030030
- postfix_client_configure_mail_alias_postmaster
- package_postfix_installed

# RHEL-08-030040
- auditd_data_disk_error_action
Expand Down
1 change: 1 addition & 0 deletions products/rhel9/profiles/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ selections:

# RHEL-08-030030
- postfix_client_configure_mail_alias
- package_postfix_installed

# RHEL-08-030040
- auditd_data_disk_error_action
Expand Down
2 changes: 0 additions & 2 deletions shared/references/cce-redhat-avail.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
CCE-85983-5
CCE-85984-3
CCE-85985-0
CCE-85988-4
CCE-85997-5
Expand Down
1 change: 1 addition & 0 deletions tests/data/profile_stability/rhel8/stig.profile
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ selections:
- package_opensc_installed
- package_openssh-server_installed
- package_policycoreutils_installed
- package_postfix_installed
- package_python3-abrt-addon_removed
- package_rng-tools_installed
- package_rsh-server_removed
Expand Down
1 change: 1 addition & 0 deletions tests/data/profile_stability/rhel8/stig_gui.profile
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ selections:
- package_opensc_installed
- package_openssh-server_installed
- package_policycoreutils_installed
- package_postfix_installed
- package_python3-abrt-addon_removed
- package_rng-tools_installed
- package_rsh-server_removed
Expand Down

0 comments on commit 5caa381

Please sign in to comment.