<def-group>
  <definition class="compliance" id="configure_tmux_lock_after_time" version="1">
    {{{ oval_metadata("Check if tmux is configured to lock sessions after period of inactivity.") }}}
    <criteria comment="Configure tmux to lock session after inactivity" operator="AND">
      <criterion comment="check lock-after-time is set to 900 in /etc/tmux.conf"
        test_ref="test_configure_tmux_lock_after_time" />
      <extend_definition comment="Check /etc/tmux.conf is readable by others" definition_ref="tmux_conf_readable_by_others"/>
    </criteria>
  </definition>
  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="check lock-after-time is set to 900 in /etc/tmux.conf"
  id="test_configure_tmux_lock_after_time" version="1">
    <ind:object object_ref="obj_configure_tmux_lock_after_time" />
    <ind:state state_ref="state_configure_tmux_lock_after_time_lower_boundary" />
    <ind:state state_ref="state_configure_tmux_lock_after_time_upper_boundary" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_configure_tmux_lock_after_time" version="2">
    <ind:filepath>/etc/tmux.conf</ind:filepath>
    <ind:pattern operation="pattern match">^\s*set\s+-g\s+lock-after-time\s+(\d+)\s*(?:#.*)?$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
  <ind:textfilecontent54_state id="state_configure_tmux_lock_after_time_lower_boundary" version="1"
  comment="the value is greater than zero">
    <ind:subexpression datatype="int" operation="greater than">0</ind:subexpression>
  </ind:textfilecontent54_state>
  <ind:textfilecontent54_state id="state_configure_tmux_lock_after_time_upper_boundary" version="1"
  comment="the value is less than or equal to 900">
    <ind:subexpression datatype="int" operation="less than or equal">900</ind:subexpression>
  </ind:textfilecontent54_state>
</def-group>
