<def-group>
  <definition class="compliance" id="dconf_gnome_screensaver_mode_blank" version="1">
    <metadata>
      <title>Implement Blank Screensaver</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 7</platform>
        <platform>multi_platform_fedora</platform>
      </affected>
      <description>The GNOME3 screensaver should be blank.</description>
      <reference source="galford" ref_id="20140824" ref_url="test_attestation" />
    </metadata>
    <criteria operator="OR">
      <extend_definition comment="dconf installed" definition_ref="package_dconf_installed" negate="true" />
      <criteria comment="Enable blank screensaver and prevent user from changing it" operator="AND">
        <extend_definition comment="dconf user profile exists" definition_ref="enable_dconf_user_profile" />
        <criterion comment="screensaver is blank" test_ref="test_screensaver_mode_blank" />
        <criterion comment="screensaver prevent user from changing mode" test_ref="test_prevent_user_screensaver_mode_change" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="screensaver mode is blank"
  id="test_screensaver_mode_blank" version="1">
    <ind:object object_ref="obj_screensaver_mode_blank" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_screensaver_mode_blank"
  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+)+?picture-uri=\'\'$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="blank screensaver cannot be changed by user"
  id="test_prevent_user_screensaver_mode_change" version="1">
    <ind:object object_ref="obj_prevent_user_screensaver_mode_change" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_prevent_user_screensaver_mode_change"
  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/picture-uri$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>
</def-group>
