<def-group>
 <!-- THIS FILE IS GENERATED by create_sysctl_checks.py.  DO NOT EDIT.  -->
  <definition class="compliance" id="sysctl_kernel_nonexec_stack" version="1">
    <metadata>
      <title>Kernel Runtime Parameters "kernel.exec-shield" and "kernel.randomize_va_space" Check</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 kernel runtime parameters "kernel.exec-shield" and "kernel.randomize_va_space" should be set to "1".</description>
    </metadata>
    <criteria operator="AND">
      <criterion comment="kernel runtime parameter kernel.exec-shield set to 1" test_ref="test_runtime_sysctl_kernel_exec_shield" />
      <criterion comment="kernel /etc/sysctl.conf parameter kernel.exec-shield set to 1" test_ref="test_static_sysctl_kernel_exec_shield" />
      <criteria operator="OR">
        <extend_definition comment="CentOS 4 is installed" definition_ref="installed_OS_is_centos4" />
        <extend_definition comment="RedHat 4 is installed" definition_ref="installed_OS_is_rhel4" />
        <criteria operator="AND">
          <criterion comment="kernel runtime parameter kernel.randomize_va_space set to 1" test_ref="test_runtime_sysctl_kernel_randomize_va_space" />
          <criterion comment="kernel /etc/sysctl.conf parameter kernel.randomize_va_space set to 1" test_ref="test_static_sysctl_kernel_randomize_va_space" />
        </criteria>
      </criteria>
    </criteria>
  </definition>


  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="kernel.exec-shield static configuration" id="test_static_sysctl_kernel_exec_shield" version="1">
    <ind:object object_ref="object_static_sysctl_kernel_exec_shield" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_static_sysctl_kernel_exec_shield" version="1">
    <ind:filepath>/etc/sysctl.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*kernel.exec-shield[\s]*=[\s]*1*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <unix:sysctl_test check="all" check_existence="all_exist" comment="kernel runtime parameter kernel.exec-shield set to 1" id="test_runtime_sysctl_kernel_exec_shield" version="1">
    <unix:object object_ref="object_sysctl_kernel_exec_shield" />
    <unix:state state_ref="state_sysctl_kernel_exec_shield" />
  </unix:sysctl_test>
  <unix:sysctl_object id="object_sysctl_kernel_exec_shield" version="1">
    <unix:name>kernel.exec-shield</unix:name>
  </unix:sysctl_object>
  <unix:sysctl_state id="state_sysctl_kernel_exec_shield" version="1">
    <unix:value datatype="int" operation="equals">1</unix:value>
  </unix:sysctl_state>

  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="kernel.randomize_va_space static configuration" id="test_static_sysctl_kernel_randomize_va_space" version="1">
    <ind:object object_ref="object_static_sysctl_kernel_randomize_va_space" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_static_sysctl_kernel_randomize_va_space" version="1">
    <ind:filepath>/etc/sysctl.conf</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*kernel.randomize_va_space[\s]*=[\s]*1*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <unix:sysctl_test check="all" check_existence="all_exist" comment="kernel runtime parameter kernel.randomize_va_space set to 1" id="test_runtime_sysctl_kernel_randomize_va_space" version="1">
    <unix:object object_ref="object_sysctl_kernel_randomize_va_space" />
    <unix:state state_ref="state_sysctl_kernel_randomize_va_space" />
  </unix:sysctl_test>
  <unix:sysctl_object id="object_sysctl_kernel_randomize_va_space" version="1">
    <unix:name>kernel.randomize_va_space</unix:name>
  </unix:sysctl_object>
  <unix:sysctl_state id="state_sysctl_kernel_randomize_va_space" version="1">
    <unix:value datatype="int" operation="equals">1</unix:value>
  </unix:sysctl_state>
</def-group>
