Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aide_periodic_cron_checking: Improve ubuntu-specific OVAL and bash #9977

Merged
merged 2 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

# AiDE usually adds its own cron jobs to /etc/cron.daily. If script is there, this rule is
# compliant. Otherwise, we copy the script to the /etc/cron.weekly
if ! egrep -q '^(/usr/bin/)?aide\.wrapper\s+' /etc/cron.*/*; then
if ! egrep -q '^(\/usr\/bin\/)?aide(\.wrapper)?\s+' /etc/cron.*/*; then
cp -f /usr/share/aide/config/cron.daily/aide /etc/cron.weekly/
fi
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
</definition>
<ind:textfilecontent54_object id="obj_root_crontab_aide" version="1">
<ind:filepath datatype="string">/var/spool/cron/crontabs/root</ind:filepath>
<ind:pattern operation="pattern match" datatype="string">aide\.wrapper</ind:pattern>
<ind:pattern operation="pattern match" datatype="string">aide(\.wrapper)?</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_object id="obj_etc_cron_aide" version="1">
<ind:path operation="pattern match">/etc/cron\.(daily|hourly|weekly)</ind:path>
<ind:filename operation="pattern match">^.*$</ind:filename>
<ind:pattern operation="pattern match" datatype="string">^[^#]*(?:/usr/bin/)?aide\.wrapper</ind:pattern>
<ind:pattern operation="pattern match" datatype="string">^(?:\/usr\/bin\/)?aide(\.wrapper)?</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_object id="obj_etc_crontab_aide" version="1">
<ind:filepath datatype="string">/etc/crontab</ind:filepath>
<ind:pattern operation="pattern match" datatype="string">[^\s]+\s+[^\s]+\s+\*(?:\/[1-7])*\s+\*\s+[^\s]+\s+(?:/usr/bin/)?aide\.wrapper\s+[^\s]+\s+(?=-C|--check).*</ind:pattern>
<ind:pattern operation="pattern match" datatype="string">[^\s]+\s+[^\s]+\s+\*(?:\/[1-7])*\s+\*\s+[^\s]+\s+(?:\/usr\/bin\/)?aide(\.wrapper)?\s+[^\s]+\s+(?=-C|--check).*</ind:pattern>
<ind:instance datatype="int">1</ind:instance>
</ind:textfilecontent54_object>
<linux:systemdunitproperty_object id="obj_aidecheck-service_unitfilestate" version="1">
Expand Down