<def-group>
  <definition class="compliance" id="sudoers_validate_passwd" version="1">
   {{{ oval_metadata("Ensure invoking user's password for privilege escalation when using sudo") }}}
      <criteria operator="AND">
      <criterion comment="Check Defaults !targetpw exists in /etc/sudoers file" test_ref="test_sudoers_targetpw_config" />
      <criterion comment="Check Defaults !rootpw exists in /etc/sudoers file" test_ref="test_sudoers_rootpw_config" />
      <criterion comment="Check Defaults !runaspw exists in /etc/sudoers file" test_ref="test_sudoers_runaspw_config" />
      <criterion comment="Check Defaults targetpw is not defined in /etc/sudoers file" test_ref="test_sudoers_targetpw_not_defined" />
      <criterion comment="Check Defaults rootpw is not defined in /etc/sudoers file" test_ref="test_sudoers_rootpw_not_defined" />
      <criterion comment="Check Defaults runaspw is not defined in /etc/sudoers file" test_ref="test_sudoers_runaspw_not_defined" />
      </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_targetpw_config" version="1">
    <ind:object object_ref="object_test_sudoers_targetpw_config" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_rootpw_config" version="1">
    <ind:object object_ref="object_test_sudoers_rootpw_config" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_test check="all" check_existence="at_least_one_exists" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_runaspw_config" version="1">
    <ind:object object_ref="object_test_sudoers_runaspw_config" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_test_sudoers_targetpw_config" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults !targetpw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_object id="object_test_sudoers_rootpw_config" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults !rootpw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_object id="object_test_sudoers_runaspw_config" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults !runaspw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_targetpw_not_defined" version="1">
    <ind:object object_ref="object_test_sudoers_targetpw_not_defined" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_rootpw_not_defined" version="1">
    <ind:object object_ref="object_test_sudoers_rootpw_not_defined" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_test check="all" check_existence="none_exist" comment="Ensure invoking user's password for privilege escalation when using sudo"
  id="test_sudoers_runaspw_not_defined" version="1">
    <ind:object object_ref="object_test_sudoers_runaspw_not_defined" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_test_sudoers_targetpw_not_defined" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults targetpw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_object id="object_test_sudoers_rootpw_not_defined" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults rootpw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_object id="object_test_sudoers_runaspw_not_defined" version="1">
    <ind:filepath operation="pattern match">^/etc/sudoers(\.d/.*)?$</ind:filepath>
    <ind:pattern operation="pattern match">^Defaults runaspw$\r?\n</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
