<def-group>
  <definition class="compliance" id="gconf_gdm_set_login_banner_text" version="1">
    <metadata>
      <title>Set GUI Warning Banner Text</title>
      <affected family="unix">
        <platform>Red Hat Enterprise Linux 6</platform>
      </affected>
      <description>The text to be displayed in the GUI warning banner should be set correctly.</description>
      <reference source="JL" ref_id="20141113" ref_url="test_attestation" />
    </metadata>
    <criteria operator="OR">
      <extend_definition comment="gdm installed" definition_ref="package_gdm_installed" negate="true" />
      <criterion comment="check var settings" test_ref="test_gconf_gdm_set_login_banner_text" />
      <criterion comment="check etc settings with tree" test_ref="test_no_tree_gconf_gdm_set_login_banner_text" />
      <criterion comment="check etc settings without tree" test_ref="test_tree_gconf_gdm_set_login_banner_text" />
    </criteria>
  </definition>

  <ind:xmlfilecontent_test check="all" check_existence="all_exist" comment="test screensaver timeout period" id="test_gconf_gdm_set_login_banner_text" version="1">
    <ind:object object_ref="object_gconf_gdm_set_login_banner_text" />
    <ind:state state_ref="state_gconf_gdm_set_login_banner_text" />
  </ind:xmlfilecontent_test>
  <ind:xmlfilecontent_object id="object_gconf_gdm_set_login_banner_text" version="1">
    <ind:filepath>/var/lib/gdm/.gconf/apps/gdm/simple-greeter/%gconf.xml</ind:filepath>
    <ind:xpath>/gconf/entry[@name='banner_message_text']/stringvalue[1]/text()</ind:xpath>
  </ind:xmlfilecontent_object>

  <ind:xmlfilecontent_test check="all" check_existence="all_exist" comment="test screensaver timeout period" id="test_no_tree_gconf_gdm_set_login_banner_text" version="1">
    <ind:object object_ref="object_no_tree_gconf_gdm_set_login_banner_text" />
    <ind:state state_ref="state_gconf_gdm_set_login_banner_text" />
  </ind:xmlfilecontent_test>
    <ind:xmlfilecontent_object id="object_no_tree_gconf_gdm_set_login_banner_text" version="1">
    <ind:filepath>/etc/gconf/gconf.xml.mandatory/apps/gdm/simple-greeter/%gconf.xml</ind:filepath>
    <ind:xpath>/gconf/entry[@name='banner_message_text']/stringvalue[1]/text()</ind:xpath>
  </ind:xmlfilecontent_object>

  <ind:xmlfilecontent_test check="all" check_existence="all_exist" comment="test screensaver timeout period" id="test_tree_gconf_gdm_set_login_banner_text" version="1">
    <ind:object object_ref="object_tree_gconf_gdm_set_login_banner_text" />
    <ind:state state_ref="state_gconf_gdm_set_login_banner_text" />
  </ind:xmlfilecontent_test>
  <ind:xmlfilecontent_object id="object_tree_gconf_gdm_set_login_banner_text" version="1">
    <ind:filepath>/etc/gconf/gconf.xml.mandatory/%gconf-tree.xml</ind:filepath>
    <ind:xpath>/gconf/dir/dir/dir/entry[@name='banner_message_text']/stringvalue[1]/text()</ind:xpath>
  </ind:xmlfilecontent_object>

  <ind:xmlfilecontent_state comment="login_banner_text" id="state_gconf_gdm_set_login_banner_text" version="1">
    <ind:value_of datatype="string" operation="pattern match" var_ref="login_banner_text" />
  </ind:xmlfilecontent_state>

  <external_variable comment="login_banner_text" datatype="string" id="login_banner_text" version="1" />

</def-group>
