<def-group>
  <definition class="compliance" id="gid_passwd_group_same" version="1">
    <metadata>
      <title>All GIDs Are Present In /etc/group</title>
      <affected family="unix">
        <platform>CentOS 4</platform>
		<platform>CentOS 5</platform>
		<platform>Red Hat Enterprise Linux 4</platform>
		<platform>Red Hat Enterprise Linux 5</platform>
      </affected>
      <description>All GIDs referenced in /etc/passwd must be defined in /etc/group.</description>
    </metadata>
    <criteria>
      <criterion test_ref="test_gid_passwd_group_same" />
    </criteria>
  </definition>

  <local_variable id="var_gid_passwd_group_same" comment="GIDs from /etc/group" datatype="string" version="1">
		<object_component item_field="subexpression" object_ref="object_gid_passwd_group_same_var" />
  </local_variable>
  <ind:textfilecontent54_object id="object_gid_passwd_group_same_var" version="1">
    <ind:filepath>/etc/group</ind:filepath>
    <ind:pattern operation="pattern match">^.*:x:([0-9]+):</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="any_exist" comment="Testing GIDs" id="test_gid_passwd_group_same" version="1">
    <ind:object object_ref="object_gid_passwd_group_same" />
    <ind:state state_ref="state_gid_passwd_group_same" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_gid_passwd_group_same" version="1">
    <ind:filepath>/etc/passwd</ind:filepath>
    <ind:pattern operation="pattern match">^.*:[0-9]+:([0-9]+):</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_gid_passwd_group_same" version="1">
    <ind:subexpression operation="equals" var_ref="var_gid_passwd_group_same" var_check="at least one" datatype="string" />
  </ind:textfilecontent54_state>
  
</def-group>
