<?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_disable_automount:def:1" version="2" class="compliance">
      <oval-def:metadata>
        <oval-def:title>Disable GNOME3 automount</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_disable_automount" source="ssg" />
        <oval-def:description>The system's default desktop environment, GNOME3, will mount
      devices and removable media (such as DVDs, CDs and USB flash drives)
      whenever they are inserted into the system. Disable automount within GNOME3.</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="Disable GNOME3 automount 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="Disable automount in GNOME3" test_ref="oval:ssg-test_dconf_gnome_disable_automount:tst:1" />
          <oval-def:criterion comment="Prevent user from changing automount setting" test_ref="oval:ssg-test_prevent_user_gnome_automount: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_dconf_gnome_disable_automount:tst:1" version="1" check="all" comment="Disable automount in GNOME3" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_dconf_gnome_disable_automount:obj:1" />
    </ind:textfilecontent54_test>
    <ind:textfilecontent54_test id="oval:ssg-test_prevent_user_gnome_automount:tst:1" version="1" check="all" comment="Prevent user from changing automount setting" check_existence="all_exist" state_operator="AND">
      <ind:object object_ref="oval:ssg-obj_prevent_user_gnome_automount: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_dconf_gnome_disable_automount: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/media-handling\]([^\n]*\n+)+?automount=false$</ind:pattern>
      <ind:instance datatype="int">1</ind:instance>
    </ind:textfilecontent54_object>
    <ind:textfilecontent54_object id="oval:ssg-obj_prevent_user_gnome_automount: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/media-handling/automount$</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:oval_definitions>