-
Notifications
You must be signed in to change notification settings - Fork 542
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adam Vest <[email protected]>
- Loading branch information
1 parent
ab5f7ce
commit 097a1ae
Showing
1 changed file
with
56 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# This file is part of the sos project: https://github.com/sosreport/sos | ||
# | ||
# This copyrighted material is made available to anyone wishing to use, | ||
# modify, copy, or redistribute it subject to the terms and conditions of | ||
# version 2 of the GNU General Public License. | ||
# | ||
# See the LICENSE file in the source distribution for further information. | ||
|
||
from sos.report.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin | ||
|
||
|
||
class Aide(Plugin): | ||
|
||
short_desc = 'Advanced Intrusion Detection Environment' | ||
|
||
plugin_name = "aide" | ||
profiles = ('system', 'security') | ||
|
||
packages = ('aide',) | ||
conf_file = "/etc/aide/aide.conf" | ||
|
||
def setup(self): | ||
self.add_cmd_output(f"aide -c {self.conf_file} --config-check") | ||
|
||
if self.get_option("all_logs"): | ||
self.add_copy_spec([ | ||
"/var/log/aide/", | ||
]) | ||
else: | ||
self.add_copy_spec([ | ||
"/var/log/aide/aide.log" | ||
]) | ||
|
||
|
||
class RedHatAide(Aide, RedHatPlugin): | ||
conf_file = "/etc/aide.conf" | ||
|
||
def setup(self): | ||
super(RedHatAide, self).setup() | ||
self.add_copy_spec([ | ||
"/etc/aide.conf", | ||
"/etc/logrotate.d/aide" | ||
]) | ||
|
||
|
||
class DebianAide(Aide, DebianPlugin, UbuntuPlugin): | ||
conf_file = "/etc/aide/aide.conf" | ||
|
||
def setup(self): | ||
super(DebianAide, self).setup() | ||
self.add_copy_spec([ | ||
"/etc/aide/", | ||
"/etc/default/aide" | ||
]) | ||
|
||
# vim: et ts=4 sw=4 |