<def-group>
  <definition class="compliance" id="firefox_preferences-home_page"  version="1">
    <metadata>
      <title>Default Firefox Home Page Configured</title>
      <affected family="unix">
        <platform>Mozilla Firefox</platform>
      </affected>
      <description>The default homepage for Firefox is set and cannot be changed.</description>
      <reference source="galford" ref_id="20150424" ref_url="test_attestation"/>
    </metadata>   
    <criteria>
      <criterion comment="home page configured" test_ref="test_firefox_preferences-home_page" />
    </criteria>
  </definition>

  <ind:textfilecontent54_test check="all" comment="Check for home page configured" id="test_firefox_preferences-home_page" version="1">
    <ind:object object_ref="object_firefox_preferences-home_page" />
    <ind:state state_ref="state_firefox_preferences-home_page" />
  </ind:textfilecontent54_test>
  <ind:textfilecontent54_object id="object_firefox_preferences-home_page" version="1">
    <ind:path operation="pattern match">^\/usr\/(|local\/)lib(|64)\/firefox</ind:path>
    <ind:filename operation="pattern match">^.*\.cfg$</ind:filename>
    <ind:pattern operation="pattern match">^lockPref\("browser.startup.homepage",[\s]+"(\S+)"\);$</ind:pattern>
    <ind:instance datatype="int">1</ind:instance>
  </ind:textfilecontent54_object>

  <ind:textfilecontent54_state id="state_firefox_preferences-home_page" version="1">
    <ind:subexpression datatype="string" operation="equals" var_check="all" var_ref="var_default_home_page" />
  </ind:textfilecontent54_state>

  <external_variable id="var_default_home_page" datatype="string" version="1" comment="Expected default home page" />
</def-group>
