<def-group>
  <definition class="compliance" id="accounts_disable_post_pw_expiration" version="1">
    <metadata>
      <title>Set Accounts to Expire Following Password Expiration</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>The accounts should be configured to expire automatically following password expiration.</description>
    </metadata>
    <criteria comment="the value INACTIVE parameter should be set appropriately in /etc/default/useradd">
      <criterion test_ref="test_etc_default_useradd_inactive" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="the value INACTIVE parameter should be set appropriately in /etc/default/useradd"
  id="test_etc_default_useradd_inactive" version="1">
    <ind:object object_ref="object_etc_default_useradd_inactive" />
    <ind:state state_ref="state_etc_default_useradd_inactive" />
    <ind:state state_ref="state_etc_default_useradd_inactive_nonnegative" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_etc_default_useradd_inactive" version="1">
    <ind:filepath>/etc/default/useradd</ind:filepath>
    <ind:pattern operation="pattern match">^\s*INACTIVE\s*=\s*(\d+)\s*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_etc_default_useradd_inactive" version="1">
    <ind:subexpression operation="less than or equal" var_ref="var_account_disable_post_pw_expiration" datatype="int" />
  </ind:textfilecontent54_state>

  <ind:textfilecontent54_state id="state_etc_default_useradd_inactive_nonnegative" version="1">
    <ind:subexpression operation="greater than" datatype="int">-1</ind:subexpression>
  </ind:textfilecontent54_state>

  <external_variable comment="inactive days expiration" datatype="int" id="var_account_disable_post_pw_expiration" version="1" />

</def-group>
