<def-group>
  <definition class="compliance" id="file_permissions_etc_hosts_deny" version="1">
  
    <metadata>
        <title>Verify Permissions on /etc/hosts.deny</title>
        
    <affected family="unix">
    <platform>Ubuntu 22.04</platform>
    </affected>
        <description>This test makes sure that /etc/hosts.deny has mode 0644.
      If the target file or directory has an extended ACL, then it will fail the mode check.
      </description>
    </metadata>
    <criteria>
  
      <criterion comment="Check file mode of /etc/hosts.deny" test_ref="test_file_permissions_etc_hosts_deny_0"/>
  
  
    </criteria>
  </definition>

  
  <unix:file_test check="all" check_existence="none_exist" comment="Testing mode of /etc/hosts.deny" id="test_file_permissions_etc_hosts_deny_0" version="3">
    <unix:object object_ref="object_file_permissions_etc_hosts_deny_0" />
  </unix:file_test>

  <unix:file_object comment="/etc/hosts.deny" id="object_file_permissions_etc_hosts_deny_0" version="1">
      <unix:filepath>/etc/hosts.deny</unix:filepath>
      <filter action="exclude">exclude_symlinks__etc_hosts_deny</filter>
      <filter action="exclude">state_file_permissions_etc_hosts_deny_0_mode_0644or_stricter_</filter>
  </unix:file_object>

  <unix:file_state id="state_file_permissions_etc_hosts_deny_0_mode_0644or_stricter_" operator="AND" version="3">
      <unix:suid datatype="boolean">false</unix:suid>
      <unix:sgid datatype="boolean">false</unix:sgid>
      <unix:sticky datatype="boolean">false</unix:sticky>
      <unix:uexec datatype="boolean">false</unix:uexec>
      <unix:gwrite datatype="boolean">false</unix:gwrite>
      <unix:gexec datatype="boolean">false</unix:gexec>
      <unix:owrite datatype="boolean">false</unix:owrite>
      <unix:oexec datatype="boolean">false</unix:oexec>
  </unix:file_state>
  

  <unix:file_state id="exclude_symlinks__etc_hosts_deny" version="1">
    <unix:type operation="equals">symbolic link</unix:type>
  </unix:file_state>
</def-group>