<def-group>
  <definition class="compliance" id="grub2_uefi_password" version="1">
    {{{ oval_metadata("The UEFI grub2 boot loader should have password protection enabled.", rule_title=rule_title) }}}

    <criteria operator="OR">
      <criterion comment="make sure a password is defined in {{{ grub2_uefi_boot_path }}}/user.cfg" test_ref="test_grub2_uefi_password_usercfg" />
    </criteria>
  </definition>
  
  <ind:textfilecontent54_test check="all" check_existence="all_exist" comment="make sure a password is defined in {{{ grub2_uefi_boot_path }}}/user.cfg" id="test_grub2_uefi_password_usercfg" version="1">
    <ind:object object_ref="object_grub2_uefi_password_usercfg" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_grub2_uefi_password_usercfg" version="1">
    <ind:filepath>{{{ grub2_uefi_boot_path }}}/user.cfg</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*GRUB2_PASSWORD=grub\.pbkdf2\.sha512.*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

</def-group>
