1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
<def-group>
<definition class="compliance" id="{{{ rule_id }}}" version="2">
{{{ oval_metadata("
Check if selinux=0 OR enforcing=0 within the GRUB2 configuration files, fail if found.
", rule_title=rule_title) }}}
<criteria operator="AND">
<criterion test_ref="test_selinux_default_grub"
comment="check value selinux|enforcing=0 in /etc/default/grub, fail if found"/>
<criterion test_ref="test_selinux_grub2_cfg"
comment="check value selinux|enforcing=0 in /etc/grub2.cfg, fail if found"/>
<criterion test_ref="test_selinux_grub_dir"
comment="check value selinux|enforcing=0 in /etc/grub.d, fail if found"/>
</criteria>
</definition>
<ind:textfilecontent54_test id="test_selinux_default_grub" version="1"
check="all" check_existence="none_exist"
comment="check value selinux|enforcing=0 in /etc/default/grub, fail if found">
<ind:object object_ref="object_selinux_default_grub"/>
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_selinux_default_grub" version="1"
comment="check value selinux|enforcing=0 in /etc/default/grub, fail if found">
<ind:filepath>/etc/default/grub</ind:filepath>
<ind:pattern operation="pattern match">^[\s]*GRUB_CMDLINE_LINUX.*(selinux|enforcing)=0.*$</ind:pattern>
<ind:instance datatype="int" operation="equals">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_test id="test_selinux_grub2_cfg" version="1"
check="all" check_existence="none_exist"
comment="check value selinux|enforcing=0 in /etc/grub2.cfg, fail if found">
<ind:object object_ref="object_selinux_grub2_cfg"/>
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_selinux_grub2_cfg" version="1"
comment="check value selinux|enforcing=0 in /etc/grub2.cfg, fail if found">
<ind:filepath>/etc/grub2.cfg</ind:filepath>
<ind:pattern operation="pattern match">^.*(selinux|enforcing)=0.*$</ind:pattern>
<ind:instance datatype="int" operation="equals">1</ind:instance>
</ind:textfilecontent54_object>
<ind:textfilecontent54_test id="test_selinux_grub_dir" version="1"
check="all" check_existence="none_exist"
comment="check value selinux|enforcing=0 in /etc/grub.d fail if found">
<ind:object object_ref="object_selinux_grub_dir"/>
</ind:textfilecontent54_test>
<ind:textfilecontent54_object id="object_selinux_grub_dir" version="1"
comment="check value selinux|enforcing=0 in /etc/grub.d, fail if found">
<ind:path>/etc/grub.d</ind:path>
<ind:filename operation="pattern match">^.*$</ind:filename>
<ind:pattern operation="pattern match">^.*(selinux|enforcing)=0.*$</ind:pattern>
<ind:instance datatype="int" operation="equals">1</ind:instance>
</ind:textfilecontent54_object>
</def-group>
|