<def-group>
  <definition class="compliance" id="accounts_max_concurrent_login_sessions" version="1">
    <metadata>
      <title>Set Maximum Number of Concurrent Login Sessions Per User</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 maximum number of concurrent login sessions per user should meet minimum requirements.</description>
    </metadata>
    <criteria comment="the value maxlogins should be set appropriately in /etc/security/limits.conf">
      <criterion test_ref="test_maxlogins" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="the value maxlogins should be set appropriately in /etc/security/limits.conf" id="test_maxlogins" version="1">
    <ind:object object_ref="object_etc_security_limits_conf_maxlogins" />
    <ind:state state_ref="state_maxlogins" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_etc_security_limits_conf_maxlogins" version="1">
    <ind:filepath>/etc/security/limits.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*\*[\s]+(?:hard|-)[\s]+maxlogins[\s]+(\d+)\s*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

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

  <external_variable comment="maximum number of concurrent logins per user" datatype="int" id="max_concurrent_login_sessions_value" version="1" />

</def-group>
