<def-group oval_version="5.11">
  <definition class="compliance" id="chronyd_client_only" version="1">
    {{{ oval_metadata("Configure the port setting in " ~ chrony_conf_path ~ " to disable
      server operation.", rule_title=rule_title) }}}
    <criteria>
      <criterion test_ref="test_chronyd_client_only" comment="check if port is 0 in {{{ chrony_conf_path }}}" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test id="test_chronyd_client_only"
    comment="check if port is 0 in {{{ chrony_conf_path }}}"
    check="all" check_existence="all_exist" version="1">
    <ind:object object_ref="obj_chronyd_port_value" />
    <ind:state state_ref="state_chronyd_port_value_0" />
  </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="obj_chronyd_port_value" version="1">
    <ind:filepath>{{{ chrony_conf_path }}}</ind:filepath>
    <ind:pattern operation="pattern match">^\s*port[\s]+(\S+)</ind:pattern>
    <ind:instance operation="greater than or equal" datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_chronyd_port_value_0" version="1">
    <ind:subexpression>0</ind:subexpression>
  </ind:textfilecontent54_state>
</def-group>
