-
Notifications
You must be signed in to change notification settings - Fork 696
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 #11335 from marcusburghardt/rpm_verify_permissions…
…_review Review rpm_verify_permissions rule
- Loading branch information
Showing
2 changed files
with
42 additions
and
33 deletions.
There are no files selected for viewing
34 changes: 20 additions & 14 deletions
34
...ware/integrity/software-integrity/rpm_verification/rpm_verify_permissions/oval/shared.xml
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,27 +1,33 @@ | ||
<def-group> | ||
<definition class="compliance" id="rpm_verify_permissions" version="3"> | ||
{{{ oval_metadata("Verify the permissions of installed packages | ||
by comparing the installed files with information about the | ||
files taken from the package metadata stored in the RPM | ||
database.") }}} | ||
<definition class="compliance" id="{{{ rule_id }}}" version="3"> | ||
{{{ oval_metadata("Verify the permissions of installed packages by comparing the installed | ||
files with information about the files taken from the package metadata stored in the RPM | ||
database.") }}} | ||
<criteria> | ||
<criterion test_ref="test_verify_all_rpms_mode" comment="mode of all files matches local rpm database" /> | ||
<criterion test_ref="test_rpm_verify_permissions" | ||
comment="mode of all files matches local rpm database"/> | ||
</criteria> | ||
</definition> | ||
<linux:rpmverifyfile_test check_existence="none_exist" id="test_verify_all_rpms_mode" version="1" check="all" comment="mode of all files matches local rpm database"> | ||
<linux:object object_ref="object_files_fail_mode"/> | ||
</linux:rpmverifyfile_test> | ||
<linux:rpmverifyfile_object id="object_files_fail_mode" version="1" comment="rpm verify of all files"> | ||
|
||
<linux:rpmverifyfile_state id="state_rpm_verify_permissions_files_fail_mode" version="1"> | ||
<linux:mode_differs>fail</linux:mode_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_object id="object_rpm_verify_permissions_files_fail_mode" version="1" | ||
comment="rpm verify permissions of all files"> | ||
<linux:behaviors nomd5="true" noghostfiles="true"/> | ||
<linux:name operation="pattern match">.*</linux:name> | ||
<linux:epoch operation="pattern match">.*</linux:epoch> | ||
<linux:version operation="pattern match">.*</linux:version> | ||
<linux:release operation="pattern match">.*</linux:release> | ||
<linux:arch operation="pattern match">.*</linux:arch> | ||
<linux:filepath operation="pattern match">.*</linux:filepath> | ||
<filter action="include">state_files_fail_mode</filter> | ||
<filter action="include">state_rpm_verify_permissions_files_fail_mode</filter> | ||
</linux:rpmverifyfile_object> | ||
<linux:rpmverifyfile_state id="state_files_fail_mode" version="1"> | ||
<linux:mode_differs>fail</linux:mode_differs> | ||
</linux:rpmverifyfile_state> | ||
|
||
<linux:rpmverifyfile_test id="test_rpm_verify_permissions" version="1" | ||
check="all" check_existence="none_exist" | ||
comment="mode of all files matches local rpm database"> | ||
<linux:object object_ref="object_rpm_verify_permissions_files_fail_mode"/> | ||
</linux:rpmverifyfile_test> | ||
</def-group> |
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