<def-group>
  <definition class="compliance" id="tftpd_uses_secure_mode" version="1">
    {{{ oval_metadata("The TFTP daemon should use secure mode.") }}}
    <criteria comment="package tftp-server removed or /etc/xinetd.d/tftp configured correctly" operator="OR">
      <extend_definition comment="rpm package tftp-server removed" definition_ref="package_tftp-server_removed" />
      <criterion comment="tftpd secure mode" test_ref="test_tftpd_uses_secure_mode" />
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" comment="tftpd secure mode" id="test_tftpd_uses_secure_mode" version="1">
    <ind:object object_ref="object_tftpd_uses_secure_mode" />
    <ind:state state_ref="state_tftpd_uses_secure_mode" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_tftpd_uses_secure_mode" version="1">
    <ind:filepath>/etc/xinetd.d/tftp</ind:filepath>
    <ind:pattern operation="pattern match">^[\s]*server_args[\s]+=[\s]+.*?-s[\s]+([/\.\w]+).*$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_tftpd_uses_secure_mode" version="1">
    <ind:subexpression datatype="string" operation="equals" var_check="all"
    var_ref="var_tftpd_secure_directory" />
  </ind:textfilecontent54_state>

    <external_variable comment="TFTP server secure directory" datatype="string" id="var_tftpd_secure_directory" version="1" />
</def-group>
