<def-group>
  <definition class="compliance" id="{{{ rule_id }}}" version="1">
    {{{ oval_metadata("Ensure root account access is controlled", rule_title=rule_title) }}}
    <criteria>
      <criterion comment="verify root password is set"
          test_ref="test_root_access_controlled_etc_shadow" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="only_one_exists"
      version="1" id="test_root_access_controlled_etc_shadow"
      comment="make sure root password is set in /etc/shadow">
    <ind:object object_ref="obj_root_access_controlled_etc_shadow" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_root_access_controlled_etc_shadow" version="1">
    <ind:filepath>/etc/shadow</ind:filepath>
    {{% if product == "ubuntu2204" %}}
    <ind:pattern operation="pattern match">^root:(\$(y|[0-9].+)\$).*$</ind:pattern>
    {{% else %}}
    <ind:pattern operation="pattern match">^root:(\$(y|[0-9].+)\$|!.*|\*.*).*$</ind:pattern>
    {{% endif %}}
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
