<def-group>
  <definition class="compliance" id="{{{rule_id}}}" version="1">
    {{{ oval_metadata("The root account should have primary group of 0") }}}
    <criteria>
      <criterion comment="tests that the root account's gid is equal to 0" test_ref="test_{{{rule_id}}}" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test id="test_{{{rule_id}}}" check="all" comment="test that there are no accounts with UID 0 except root in the /etc/passwd file" version="1">
    <ind:object object_ref="object_{{{rule_id}}}" />
    <ind:state state_ref="state_{{{rule_id}}}" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_{{{rule_id}}}" version="1">
    <ind:filepath>/etc/passwd</ind:filepath>
    <ind:pattern operation="pattern match">^root:.+:\d+:(\d+).+</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_{{{rule_id}}}" version="1" comment="root account's gid is equal to 0">
    <ind:subexpression operation="equals" datatype="int">0</ind:subexpression>
  </ind:textfilecontent54_state>
</def-group>
