<def-group>
  <definition class="compliance" id="selinux_policytype" version="1">
    {{{ oval_metadata("The SELinux policy should be set appropriately.") }}}
    <criteria>
      <criterion test_ref="test_selinux_policy" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="Tests the value of the ^[\s]*SELINUXTYPE[\s]*=[\s]*([^#]*) expression in the /etc/selinux/config file"
  id="test_selinux_policy" version="1">
    <ind:object object_ref="obj_selinux_policy" />
    <ind:state state_ref="state_selinux_policy" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_state id="state_selinux_policy" version="1">
    <ind:subexpression operation="equals" var_check="all"
    var_ref="var_selinux_policy_name" />
  </ind:textfilecontent54_state>

  <external_variable comment="External variable: name of selinux policy in /etc/selinux/config"
  datatype="string" id="var_selinux_policy_name" version="1" />

  <ind:textfilecontent54_object id="obj_selinux_policy" version="1">
    <ind:filepath>/etc/selinux/config</ind:filepath>
    <ind:pattern operation="pattern match">^SELINUXTYPE=([\w]*)[\s]*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
