<def-group>
  <definition class="compliance" id="service_rlogin_disabled" version="1">
    <metadata>
      <title>Service rlogin Disabled</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>The rlogin service should be disabled if possible.</description>
      <reference source="DS" ref_id="20131018" ref_url="test_attestation" />
    </metadata>
    <criteria comment="package rsh-server removed or service rlogin is not configured to start" operator="OR">
      <extend_definition comment="rpm package rsh-server removed" definition_ref="package_rsh-server_removed" />
      <criterion comment="rlogin disabled" test_ref="test_etc_xinetd_rlogin_disabled" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" comment="rlogin disabled" id="test_etc_xinetd_rlogin_disabled" version="1">
    <ind:object object_ref="object_etc_xinetd_rlogin_disabled" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_etc_xinetd_rlogin_disabled" version="1">
    <!-- the rpm package rsh-server installs a xinetd config file in /etc/xinetd.d which controls rlogin -->
    <!-- in this case /sbin/chkconfig edits /etc/xinetd.d/rlogin to enable/disable this service which is why we check it this way -->
    <ind:filepath>/etc/xinetd.d/rlogin</ind:filepath>
    <ind:pattern operation="pattern match">^\s*disable\s+=\s+yes\s*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
