<def-group> 
  <definition class="compliance" id="dconf_gnome_login_banner_text" version="1">
    <metadata>
      <title>Enable GUI Warning Banner</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 7</platform>
        <platform>multi_platform_fedora</platform>
      </affected>
      <description>Enable the GUI warning banner.</description>
      <reference source="galford" ref_id="20140902" ref_url="test_attestation" />
    </metadata>
    <criteria operator="OR">
      <extend_definition comment="dconf installed" definition_ref="package_dconf_installed" negate="true" />
      <criteria comment="Enable GUI banner and prevent user from changing it" operator="AND">
        <extend_definition comment="dconf user profile exists" definition_ref="enable_dconf_user_profile" />
        <criterion comment="Prevent user from changing banner" test_ref="test_prevent_user_banner_change" />
        <criterion comment="Login banner is correctly set" test_ref="test_gdm_login_banner_text_setting" />
      </criteria>
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="GUI banner cannot be changed by user"
  id="test_prevent_user_banner_change" version="1">
    <ind:object object_ref="obj_prevent_user_banner_change" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_prevent_user_banner_change"
  version="1">
    <ind:path>/etc/dconf/db/gdm.d/locks/</ind:path>
    <ind:filename operation="pattern match">^.*$</ind:filename>
    <ind:pattern operation="pattern match">^/org/gnome/login-screen/banner-message-text$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_test check="all" check_existence="all_exist"
  comment="login banner text is correctly set"
  id="test_gdm_login_banner_text_setting" version="1">
    <ind:object object_ref="obj_gdm_login_banner_text_setting" />
    <ind:state state_ref="state_gdm_login_banner_text_setting" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="obj_gdm_login_banner_text_setting"
  version="1">
    <ind:path>/etc/dconf/db/gdm.d/</ind:path>
    <ind:filename operation="pattern match">^.*$</ind:filename>
    <ind:pattern operation="pattern match">^banner-message-text=[\s']*([^']*)</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_gdm_login_banner_text_setting" version="1">
    <ind:subexpression datatype="string" operation="pattern match" var_ref="login_banner_text" />
  </ind:textfilecontent54_state>

  <external_variable comment="external variable for GDM login banner text"
  datatype="string" id="login_banner_text" version="1" />
</def-group>
