<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>multi_platform_rhel</platform>
      </affected>
      <description>The maximum number of concurrent login sessions per user should meet
      minimum requirements.</description>
      <reference source="MED" ref_id="20130807" ref_url="test_attestation" />
    </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="var_accounts_max_concurrent_login_sessions" datatype="int" />
  </ind:textfilecontent54_state>

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

</def-group>
