|
| 1 | +<def-group> |
| 2 | + <!-- THIS FILE IS GENERATED by create_services_disabled.py according to RHEL-7 template |
| 3 | + from RHEL/7/input/checks/templates/template_service_disabled. DO NOT EDIT. |
| 4 | +
|
| 5 | + IF REQUIRED INSTEAD OF EDITING THIS FILE RATHER EDIT THAT TEMPLATE DIRECTLY. |
| 6 | + AFTER THAT BE SURE TO REGENERATE ALL CORRESPONDING UNCOMMENTED CHECKS FROM |
| 7 | + service_disabled.csv CSV FILE AND PLACE THOSE NEW OVAL VERSIONS into |
| 8 | + RHEL/7/input/checks DIRECTORY REPLACING THE FORMER ONES |
| 9 | + --> |
| 10 | + |
| 11 | + <definition class="compliance" id="service_abrtd_disabled" version="1"> |
| 12 | + <metadata> |
| 13 | + <title>Service abrtd Disabled</title> |
| 14 | + <affected family="unix"> |
| 15 | + <platform>Red Hat Enterprise Linux 7</platform> |
| 16 | + </affected> |
| 17 | + <description>The abrtd service should be disabled if possible.</description> |
| 18 | + <reference source="JL" ref_id="20140921" ref_url="test_attestation"/> |
| 19 | + </metadata> |
| 20 | + <criteria operator="OR" comment="package abrt removed or service abrtd is not configured to start"> |
| 21 | + <extend_definition comment="abrt removed" definition_ref="package_abrt_removed" /> |
| 22 | + <criteria operator="OR" comment="service abrtd is not configured to start"> |
| 23 | + <criterion comment="abrtd masked" test_ref="test_abrtd_masked" /> |
| 24 | + <criteria operator="AND" comment="service abrtd is disabled on boot and not enabled at runtime"> |
| 25 | + <criterion comment="abrtd disabled on boot" test_ref="test_abrtd_disabled_on_boot" /> |
| 26 | + <criterion comment="abrtd not enabled at runtime" test_ref="test_abrtd_runtime_not_enabled" /> |
| 27 | + </criteria> |
| 28 | + </criteria> |
| 29 | + </criteria> |
| 30 | + </definition> |
| 31 | + |
| 32 | + <!-- Test if abrtd is masked --> |
| 33 | + <unix:file_test id="test_abrtd_masked" check="all" check_existence="at_least_one_exists" comment="Test if abrtd is masked" version="1"> |
| 34 | + <unix:object object_ref="object_abrtd_masked" /> |
| 35 | + </unix:file_test> |
| 36 | + |
| 37 | + <unix:file_object id="object_abrtd_masked" comment="/etc/systemd/system/abrtd.service exists" version="1"> |
| 38 | + <unix:filepath>/etc/systemd/system/abrtd.service</unix:filepath> |
| 39 | + </unix:file_object> |
| 40 | + |
| 41 | + <!-- Test if abrtd is disabled for all targets on boot --> |
| 42 | + <unix:file_test id="test_abrtd_disabled_on_boot" check="all" check_existence="none_exist" comment="Test if abrtd not enabled on boot" version="1"> |
| 43 | + <unix:object object_ref="object_abrtd_disabled_on_boot" /> |
| 44 | + </unix:file_test> |
| 45 | + |
| 46 | + <unix:file_object id="object_abrtd_disabled_on_boot" comment="No /etc/systemd/system/*.wants/abrtd.service exists" version="1"> |
| 47 | + <!-- Don't follow symbolic links below to search just through /etc/systemd/system/* content --> |
| 48 | + <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="local" /> |
| 49 | + <unix:path>/etc/systemd/system</unix:path> |
| 50 | + <unix:filename>abrtd.service</unix:filename> |
| 51 | + <!-- Include all symbolic link entities in the /etc/systemd/system directory tree --> |
| 52 | + <filter action="include">state_abrtd_symlink</filter> |
| 53 | + <!-- But exclude that one causing service to be masked --> |
| 54 | + <filter action="exclude">state_abrtd_masked_symlink</filter> |
| 55 | + </unix:file_object> |
| 56 | + |
| 57 | + <unix:file_state id="state_abrtd_symlink" version="1"> |
| 58 | + <unix:type>symbolic link</unix:type> |
| 59 | + </unix:file_state> |
| 60 | + |
| 61 | + <unix:file_state id="state_abrtd_masked_symlink" version="1"> |
| 62 | + <unix:filepath>/etc/systemd/system/abrtd.service</unix:filepath> |
| 63 | + </unix:file_state> |
| 64 | + |
| 65 | + <!-- Test if abrtd is not enabled at runtime --> |
| 66 | + <unix:file_test id="test_abrtd_runtime_not_enabled" check="all" check_existence="none_exist" comment="Test if abrtd not enabled at runtime" version="1"> |
| 67 | + <unix:object object_ref="object_abrtd_runtime_not_enabled" /> |
| 68 | + </unix:file_test> |
| 69 | + |
| 70 | + <unix:file_object id="object_abrtd_runtime_not_enabled" comment="No /run/systemd/system/*.wants/abrtd.service exists" version="1"> |
| 71 | + <!-- Don't follow symbolic links below to search just through /run/systemd/system/* content --> |
| 72 | + <unix:behaviors recurse="directories" recurse_direction="down" max_depth="-1" recurse_file_system="local" /> |
| 73 | + <unix:path>/run/systemd/system</unix:path> |
| 74 | + <unix:filename>abrtd.service</unix:filename> |
| 75 | + <!-- Include all symbolic link entities in the /run/systemd/system directory tree --> |
| 76 | + <filter action="include">state_abrtd_symlink</filter> |
| 77 | + </unix:file_object> |
| 78 | + |
| 79 | +</def-group> |
0 commit comments