<?xml version='1.0' encoding='utf-8'?>
<oval-def:oval_definitions xmlns:ind="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:linux="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd  http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd">
  <oval-def:generator>
    <oval:product_name>OVALFileLinker from SCAP Security Guide</oval:product_name>
    <oval:product_version>ssg: [0, 1, 80], python: 3.10.12</oval:product_version>
    <oval:schema_version>5.11.2</oval:schema_version>
    <oval:timestamp>2025-11-24T17:59:05</oval:timestamp>
  </oval-def:generator>
  <oval-def:definitions>
    <oval-def:definition id="oval:ssg-enable_dconf_user_profile:def:1" version="1" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Configure GNOME3 DConf User Profile</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="enable_dconf_user_profile" source="ssg" />
        <oval-def:description>The DConf User and gdm profiles should have the correct DB configured.</oval-def:description>
      </oval-def:metadata>
      <oval-def:criteria operator="OR">
        <oval-def:extend_definition negate="true" comment="dconf installed" definition_ref="oval:ssg-package_dconf_installed:def:1" />
        <oval-def:criteria operator="AND">
          <oval-def:criterion comment="dconf gdm profile exists" test_ref="oval:ssg-test_dconf_gdm_profile:tst:1" />
          <oval-def:criterion comment="dconf user profile exists" test_ref="oval:ssg-test_dconf_user_profile:tst:1" />
        </oval-def:criteria>
      </oval-def:criteria>
    </oval-def:definition>
    <oval-def:definition id="oval:ssg-dconf_gnome_screensaver_lock_delay:def:1" version="2" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Set GNOME3 Screensaver Lock Delay After Activation Period</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="dconf_gnome_screensaver_lock_delay" source="ssg" />
        <oval-def:description>Idle activation of the screen lock should be enabled immediately or
      after a delay.</oval-def:description>
      </oval-def:metadata>
      <oval-def:criteria operator="OR">
        <oval-def:extend_definition negate="true" comment="dconf installed" definition_ref="oval:ssg-package_dconf_installed:def:1" />
        <oval-def:criteria comment="Enable screensaver lock and prevent user from changing it" operator="AND">
          <oval-def:extend_definition comment="dconf user profile exists" definition_ref="oval:ssg-enable_dconf_user_profile:def:1" />
          <oval-def:criterion comment="screensaver lock delay is configured" test_ref="oval:ssg-test_screensaver_lock_delay:tst:1" />
          <oval-def:criterion comment="lock delay is set correctly" test_ref="oval:ssg-test_screensaver_lock_delay_setting:tst:1" />
          <oval-def:criterion comment="screensaver lock delay setting is locked" test_ref="oval:ssg-test_screensaver_lock_delay_locked:tst:1" />
        </oval-def:criteria>
      </oval-def:criteria>
    </oval-def:definition>
    <oval-def:definition id="oval:ssg-package_dconf_installed:def:1" version="1" class="compliance">
      <oval-def:metadata>
        <oval-def:title>package_dconf_installed</oval-def:title>
        <oval-def:affected family="unix">
          <oval-def:platform>Ubuntu 22.04</oval-def:platform>
        </oval-def:affected>
        <oval-def:reference ref_id="package_dconf_installed" source="ssg" />
        <oval-def:description>The DPKG package dconf-service should be installed.</oval-def:description>
      </oval-def:metadata>
      <oval-def:criteria operator="AND">
        <oval-def:criterion comment="package dconf-service is installed" test_ref="oval:ssg-test_package_dconf-service_installed:tst:1" />
      </oval-def:criteria>
    </oval-def:definition>
  </oval-def:definitions>
  <oval-def:tests>
    <ind:textfilecontent54_test id="oval:ssg-test_dconf_gdm_profile:tst:1" version="1" check="all" comment="dconf gdm profile exists and uses gdm.d database" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_dconf_gdm_profile:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_dconf_user_profile:tst:1" version="1" check="all" comment="dconf user profile exists and uses local.d database" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_dconf_user_profile:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_screensaver_lock_delay:tst:1" version="1" check="all" comment="screensaver lock is set correctly" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_screensaver_lock_delay:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_screensaver_lock_delay_setting:tst:1" version="1" check="all" comment="screensaver lock delay setting is correct" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_screensaver_lock_delay_setting:obj:1" />
      <ind:state state_ref="oval:ssg-state_screensaver_lock_delay_setting:ste:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_screensaver_lock_delay_locked:tst:1" version="1" check="all" comment="screensaver lock delay setting is locked" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_screensaver_lock_delay_locked:obj:1" />
    </ind:textfilecontent54_test>
    <linux:dpkginfo_test id="oval:ssg-test_package_dconf-service_installed:tst:1" version="1" check="all" comment="package dconf-service is installed" check_existence="all_exist" state_operator="AND">
      <linux:object object_ref="oval:ssg-obj_test_package_dconf-service_installed:obj:1" />
    </linux:dpkginfo_test>
  </oval-def:tests>
  <oval-def:objects>
    <ind:textfilecontent54_object id="oval:ssg-obj_dconf_gdm_profile:obj:1" version="1">
      <ind:filepath>/etc/dconf/profile/gdm</ind:filepath>
      <ind:pattern operation="pattern match">(?ms)^\s*user-db:user\s*.*\n\s*system-db:gdm\s*$</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_dconf_user_profile:obj:1" version="1">
      <ind:filepath>/etc/dconf/profile/user</ind:filepath>
      <ind:pattern operation="pattern match">(?ms)^\s*user-db:user\s*.*\n\s*system-db:local\s*$</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_screensaver_lock_delay:obj:1" version="1">
      <ind:path>/etc/dconf/db/local.d/</ind:path>
      <ind:filename operation="pattern match">^.*$</ind:filename>
      <ind:pattern operation="pattern match">^\[org/gnome/desktop/screensaver\]([^\n]*\n+)+?lock-delay=uint32[\s][0-9]*$</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_screensaver_lock_delay_setting:obj:1" version="1">
      <ind:path>/etc/dconf/db/local.d/</ind:path>
      <ind:filename operation="pattern match">^.*$</ind:filename>
      <ind:pattern operation="pattern match">^lock-delay[\s=]*uint32[\s]([^=\s]*)</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_screensaver_lock_delay_locked:obj:1" version="1">
      <ind:path>/etc/dconf/db/local.d/locks/</ind:path>
      <ind:filename operation="pattern match">^.*$</ind:filename>
      <ind:pattern operation="pattern match">^/org/gnome/desktop/screensaver/lock-delay$</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <linux:dpkginfo_object id="oval:ssg-obj_test_package_dconf-service_installed:obj:1" version="1">
      <linux:name>dconf-service</linux:name>
    </linux:dpkginfo_object>
  </oval-def:objects>
  <oval-def:states>
    <ind:textfilecontent54_state id="oval:ssg-state_screensaver_lock_delay_setting:ste:1" version="1" operator="AND">
      <ind:subexpression datatype="int" operation="less than or equal" var_check="all" var_ref="oval:ssg-var_screensaver_lock_delay:var:1" />
    </ind:textfilecontent54_state>
  </oval-def:states>
  <oval-def:variables>
    <oval-def:external_variable id="oval:ssg-var_screensaver_lock_delay:var:1" version="1" datatype="int" comment="screensaver lock delay variable" />
  </oval-def:variables>
</oval-def:oval_definitions>