-
Notifications
You must be signed in to change notification settings - Fork 700
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 #12674 from mpurg/ubuntu2404_cis_6_1_2_2
Add new rule journald_disable_forward_to_syslog
- Loading branch information
Showing
3 changed files
with
38 additions
and
2 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
34 changes: 34 additions & 0 deletions
34
linux_os/guide/system/logging/journald/journald_disable_forward_to_syslog/rule.yml
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
documentation_complete: true | ||
|
||
title: Ensure journald ForwardToSyslog is disabled | ||
|
||
description: |- | ||
Data from journald should be kept in the confines of the service and not forwarded to other services. | ||
rationale: | ||
If journald is the method for capturing logs, all logs of the system should be | ||
handled by journald and not forwarded to other logging mechanisms. | ||
|
||
platform: package[systemd] | ||
|
||
severity: medium | ||
|
||
{{%- if product in ["rhel8", "rhel9", "sle15"] %}} | ||
template: | ||
name: systemd_dropin_configuration | ||
vars: | ||
master_cfg_file: /etc/systemd/journald.conf | ||
dropin_dir: {{{ journald_conf_dir_path }}} | ||
section: Journal | ||
param: ForwardToSyslog | ||
value: no | ||
no_quotes: 'true' | ||
{{% else %}} | ||
template: | ||
name: shell_lineinfile | ||
vars: | ||
path: /etc/systemd/journald.conf | ||
parameter: ForwardToSyslog | ||
value: no | ||
no_quotes: 'true' | ||
{{% endif -%}} |