<def-group>
  <definition class="compliance" id="account_disable_post_pw_expiration" version="2">
    {{{ oval_metadata("The accounts should be configured to expire automatically following password expiration.", rule_title=rule_title) }}}
    <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>
