<def-group>
  <definition class="compliance" id="file_permissions_root_dir" version="1">
    <metadata>
      <title>Directory /root Permissions</title>
      <affected family="unix">
        <platform>CentOS 4</platform>
		<platform>CentOS 5</platform>
		<platform>Red Hat Enterprise Linux 4</platform>
		<platform>Red Hat Enterprise Linux 5</platform>
      </affected>
      <description>Directory permissions for /root must be 0700.</description>
    </metadata>
    <criteria>
      <criterion test_ref="test_file_permissions_root_dir" />
    </criteria>
  </definition>

  <local_variable id="var_file_permissions_root_dir" comment="User Accounts" datatype="string" version="1">
	<object_component item_field="home_dir" object_ref="object_file_permissions_root_dir_var" />
  </local_variable>
  <unix:password_object id="object_file_permissions_root_dir_var" version="1">
    <unix:username operation="equals">root</unix:username>
  </unix:password_object>

  <unix:file_test check="all" check_existence="all_exist" comment="Testing permissions" id="test_file_permissions_root_dir" version="1">
    <unix:object object_ref="object_file_permissions_root_dir" />
    <unix:state state_ref="state_file_permissions_root_dir" />
  </unix:file_test>

  <unix:file_object comment="/root/*" id="object_file_permissions_root_dir" version="1">
    <unix:path var_ref="var_file_permissions_root_dir" var_check="at least one" />
    <unix:filename xsi:nil="true"/>
  </unix:file_object>

  <unix:file_state id="state_file_permissions_root_dir" version="1">
    <unix:gread datatype="boolean">false</unix:gread>
    <unix:gwrite datatype="boolean">false</unix:gwrite>
    <unix:gexec datatype="boolean">false</unix:gexec>
    <unix:oread datatype="boolean">false</unix:oread>
    <unix:owrite datatype="boolean">false</unix:owrite>
    <unix:oexec datatype="boolean">false</unix:oexec>
  </unix:file_state>

</def-group>
