<def-group>
  <definition class="compliance" id="{{{ _RULE_ID }}}" version="1">
    {{{ oval_metadata("The SELinux '" + SEBOOLID + "' boolean should be set in the system configuration.") }}}
    <criteria>
      <criterion comment="{{{ SEBOOLID }}} is configured correctly" test_ref="test_sebool_{{{ SEBOOLID }}}" />
    </criteria>
  </definition>

  <linux:selinuxboolean_test check="all" check_existence="all_exist" comment="{{{ SEBOOLID }}} is configured correctly" id="test_sebool_{{{ SEBOOLID }}}" version="1">
    <linux:object object_ref="object_sebool_{{{ SEBOOLID }}}" />
    <linux:state state_ref="state_sebool_{{{ SEBOOLID }}}" />
  </linux:selinuxboolean_test>

  <linux:selinuxboolean_object id="object_sebool_{{{ SEBOOLID }}}" version="1">
    <linux:name>{{{ SEBOOLID }}}</linux:name>
  </linux:selinuxboolean_object>

  <linux:selinuxboolean_state id="state_sebool_{{{ SEBOOLID }}}" version="1">
    <linux:name>{{{ SEBOOLID }}}</linux:name>
    {{% if SEBOOL_BOOL %}}
      <linux:current_status datatype="boolean">{{{ SEBOOL_BOOL }}}</linux:current_status>
    <linux:pending_status datatype="boolean">{{{ SEBOOL_BOOL }}}</linux:pending_status>
    {{% else %}}
      <linux:current_status datatype="boolean" var_ref="var_{{{ SEBOOLID }}}"/>
      <linux:pending_status datatype="boolean" var_ref="var_{{{ SEBOOLID }}}"/>
    {{% endif %}}
  </linux:selinuxboolean_state>

  {{% if not SEBOOL_BOOL %}}
    <external_variable comment="external variable for {{{ SEBOOLID }}}" datatype="boolean" id="var_{{{ SEBOOLID }}}" version="1" />
  {{% endif %}}
</def-group>
