[PATCH 17/31] Renamed groupowner_gshadow_file to

Shawn Wells shawn at redhat.com
Fri Dec 27 23:27:52 UTC 2013


-------------- next part --------------
>From 55987ce22a955b6fb675c1671e93d6215b79c17a Mon Sep 17 00:00:00 2001
From: Shawn Wells <shawn at redhat.com>
Date: Fri, 27 Dec 2013 01:03:01 -0500
Subject: [PATCH 17/31] Renamed groupowner_gshadow_file to
 file_groupowner_etc_gshadow.xml, added to shared/

- Updated XCCDF to match template style

- Tested on RHEL7, updated CPE, moved to shared/
---
 RHEL/6/input/auxiliary/stig_overlay.xml            |  2 +-
 .../6/input/checks/file_groupowner_etc_gshadow.xml | 30 +---------------------
 RHEL/6/input/profiles/CS2.xml                      |  2 +-
 RHEL/6/input/profiles/common.xml                   |  2 +-
 .../6/input/profiles/fisma-medium-rhel6-server.xml |  2 +-
 RHEL/6/input/profiles/nist-CL-IL-AL.xml            |  2 +-
 RHEL/6/input/profiles/rht-ccp.xml                  |  2 +-
 RHEL/6/input/profiles/usgcb-rhel6-server.xml       |  2 +-
 RHEL/6/input/system/permissions/files.xml          |  2 +-
 RHEL/7/input/auxiliary/stig_overlay.xml            |  2 +-
 .../7/input/checks/file_groupowner_etc_gshadow.xml |  1 +
 RHEL/7/input/profiles/rht-ccp.xml                  |  2 +-
 RHEL/7/input/system/permissions/files.xml          |  2 +-
 shared/oval/file_groupowner_etc_gshadow.xml        | 30 ++++++++++++++++++++++
 14 files changed, 43 insertions(+), 40 deletions(-)
 mode change 100644 => 120000 RHEL/6/input/checks/file_groupowner_etc_gshadow.xml
 create mode 120000 RHEL/7/input/checks/file_groupowner_etc_gshadow.xml
 create mode 100644 shared/oval/file_groupowner_etc_gshadow.xml

diff --git a/RHEL/6/input/auxiliary/stig_overlay.xml b/RHEL/6/input/auxiliary/stig_overlay.xml
index f217fd1..8d17020 100644
--- a/RHEL/6/input/auxiliary/stig_overlay.xml
+++ b/RHEL/6/input/auxiliary/stig_overlay.xml
@@ -104,7 +104,7 @@
 		<VMSinfo VKey="38443" SVKey="50243" VRelease="1" />
 		<title>The /etc/gshadow file must be owned by root.</title>
 	</overlay>
-	<overlay owner="disastig" ruleid="groupowner_gshadow_file" ownerid="RHEL-06-000037" disa="366" severity="medium">
+	<overlay owner="disastig" ruleid="file_groupowner_etc_gshadow" ownerid="RHEL-06-000037" disa="366" severity="medium">
 		<VMSinfo VKey="38448" SVKey="50248" VRelease="1" />
 		<title>The /etc/gshadow file must be group-owned by root.</title>
 	</overlay>
diff --git a/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml b/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml
deleted file mode 100644
index 80e24f5..0000000
--- a/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<def-group>
-  <definition class="compliance" id="file_groupowner_etc_gshadow" version="1">
-    <metadata>
-      <title>Verify group who owns 'gshadow' file</title>
-      <affected family="unix">
-        <platform>Red Hat Enterprise Linux 6</platform>
-      </affected>
-      <description>The /etc/gshadow file should be owned by the appropriate
-      group.</description>
-      <reference source="swells" ref_id="20130918" ref_url="test_attestation" />
-    </metadata>
-    <criteria>
-      <criterion test_ref="test_file_groupowner_etc_gshadow" />
-    </criteria>
-  </definition>
-  <unix:file_test check="all" check_existence="all_exist"
-  comment="Testing gshadow ownership" id="test_file_groupowner_etc_gshadow"
-  version="1">
-    <unix:object object_ref="object_file_groupowner_etc_gshadow" />
-    <unix:state state_ref="state_file_groupowner_etc_gshadow" />
-  </unix:file_test>
-  <unix:file_state id="state_file_groupowner_etc_gshadow" version="1">
-    <unix:group_id datatype="int">0</unix:group_id>
-  </unix:file_state>
-  <unix:file_object comment="/etc/gshadow"
-  id="object_file_groupowner_etc_gshadow" version="1">
-    <unix:filepath>/etc/gshadow</unix:filepath>
-  </unix:file_object>
-</def-group>
diff --git a/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml b/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml
new file mode 120000
index 0000000..a8793a7
--- /dev/null
+++ b/RHEL/6/input/checks/file_groupowner_etc_gshadow.xml
@@ -0,0 +1 @@
+../../../../shared/oval/file_groupowner_etc_gshadow.xml
\ No newline at end of file
diff --git a/RHEL/6/input/profiles/CS2.xml b/RHEL/6/input/profiles/CS2.xml
index 906604c..1ef915d 100644
--- a/RHEL/6/input/profiles/CS2.xml
+++ b/RHEL/6/input/profiles/CS2.xml
@@ -152,7 +152,7 @@
 <select idref="groupowner_shadow_file" selected="true"/>
 <select idref="file_permissions_etc_shadow" selected="true"/>
 <select idref="file_owner_etc_gshadow" selected="true"/>
-<select idref="groupowner_gshadow_file" selected="true"/>
+<select idref="file_groupowner_etc_gshadow" selected="true"/>
 <select idref="perms_gshadow_file" selected="true"/>
 <select idref="userowner_passwd_file" selected="true"/>
 <select idref="groupowner_passwd_file" selected="true"/>
diff --git a/RHEL/6/input/profiles/common.xml b/RHEL/6/input/profiles/common.xml
index ae8ccd6..792f1fa 100644
--- a/RHEL/6/input/profiles/common.xml
+++ b/RHEL/6/input/profiles/common.xml
@@ -29,7 +29,7 @@
 <select idref="file_permissions_etc_shadow" selected="true"/>
 
 <select idref="file_owner_etc_gshadow" selected="true"/>
-<select idref="groupowner_gshadow_file" selected="true"/>
+<select idref="file_groupowner_etc_gshadow" selected="true"/>
 <select idref="perms_gshadow_file" selected="true"/>
 
 <select idref="userowner_passwd_file" selected="true"/>
diff --git a/RHEL/6/input/profiles/fisma-medium-rhel6-server.xml b/RHEL/6/input/profiles/fisma-medium-rhel6-server.xml
index f850d13..22188c6 100644
--- a/RHEL/6/input/profiles/fisma-medium-rhel6-server.xml
+++ b/RHEL/6/input/profiles/fisma-medium-rhel6-server.xml
@@ -46,7 +46,7 @@
 <select idref="groupowner_group_file" selected="true" />
 <select idref="perms_group_file" selected="true" />
 <select idref="file_owner_etc_gshadow" selected="true" />
-<select idref="groupowner_gshadow_file" selected="true" />
+<select idref="file_groupowner_etc_gshadow" selected="true" />
 <select idref="perms_gshadow_file" selected="true" />
 <select idref="userowner_passwd_file" selected="true" />
 <select idref="groupowner_passwd_file" selected="true" />
diff --git a/RHEL/6/input/profiles/nist-CL-IL-AL.xml b/RHEL/6/input/profiles/nist-CL-IL-AL.xml
index 6f84753..d9b1f2b 100644
--- a/RHEL/6/input/profiles/nist-CL-IL-AL.xml
+++ b/RHEL/6/input/profiles/nist-CL-IL-AL.xml
@@ -140,7 +140,7 @@ assurance."</description>
 <select idref="groupowner_group_file" selected="true" \>
 <select idref="perms_group_file" selected="true" \>
 <select idref="file_owner_etc_gshadow" selected="true" \>
-<select idref="groupowner_gshadow_file" selected="true" \>
+<select idref="file_groupowner_etc_gshadow" selected="true" \>
 <select idref="perms_gshadow_file" selected="true" \>
 <select idref="userowner_passwd_file" selected="true" \>
 <select idref="groupowner_passwd_file" selected="true" \>
diff --git a/RHEL/6/input/profiles/rht-ccp.xml b/RHEL/6/input/profiles/rht-ccp.xml
index 92db102..1bd54b1 100644
--- a/RHEL/6/input/profiles/rht-ccp.xml
+++ b/RHEL/6/input/profiles/rht-ccp.xml
@@ -71,7 +71,7 @@
 <select idref="groupowner_shadow_file" selected="true"/>
 <select idref="file_permissions_etc_shadow" selected="true"/>
 <select idref="file_owner_etc_gshadow" selected="true"/>
-<select idref="groupowner_gshadow_file" selected="true"/>
+<select idref="file_groupowner_etc_gshadow" selected="true"/>
 <select idref="perms_gshadow_file" selected="true"/>
 <select idref="userowner_passwd_file" selected="true"/>
 <select idref="groupowner_passwd_file" selected="true"/>
diff --git a/RHEL/6/input/profiles/usgcb-rhel6-server.xml b/RHEL/6/input/profiles/usgcb-rhel6-server.xml
index 96dbf1b..fbc1afa 100644
--- a/RHEL/6/input/profiles/usgcb-rhel6-server.xml
+++ b/RHEL/6/input/profiles/usgcb-rhel6-server.xml
@@ -35,7 +35,7 @@
 <select idref="kernel_module_udf_disabled" selected="true" />
 <select idref="perms_gshadow_file" selected="true" /> <!-- RHEL5 had this as chmod 400, RHEL6 as 0000 -->
 <select idref="file_owner_etc_gshadow" selected="true" />
-<select idref="groupowner_gshadow_file" selected="true" />
+<select idref="file_groupowner_etc_gshadow" selected="true" />
 <select idref="file_permissions_etc_shadow" selected="true" /> <!-- RHEL5 as 400, RHEL6 as 000 -->
 <select idref="userowner_shadow_file" selected="true" />
 <select idref="groupowner_shadow_file" selected="true" />
diff --git a/RHEL/6/input/system/permissions/files.xml b/RHEL/6/input/system/permissions/files.xml
index 0157dcf..bbae77b 100644
--- a/RHEL/6/input/system/permissions/files.xml
+++ b/RHEL/6/input/system/permissions/files.xml
@@ -107,7 +107,7 @@ is critical for system security.</rationale>
 <tested by="DS" on="20121026"/>
 </Rule>
 
-<Rule id="groupowner_gshadow_file" severity="medium">
+<Rule id="file_groupowner_etc_gshadow" severity="medium">
 <title>Verify Group Who Owns <tt>gshadow</tt> File</title>
 <description><filegroupowner-desc-macro file="/etc/gshadow" group="root"/></description>
 <ocil><filegroupowner-check-macro file="/etc/gshadow" group="root"/></ocil>
diff --git a/RHEL/7/input/auxiliary/stig_overlay.xml b/RHEL/7/input/auxiliary/stig_overlay.xml
index 5e6089d..da6a57b 100644
--- a/RHEL/7/input/auxiliary/stig_overlay.xml
+++ b/RHEL/7/input/auxiliary/stig_overlay.xml
@@ -104,7 +104,7 @@
 		<VMSinfo VKey="38443" SVKey="50243" VRelease="1" />
 		<title>The /etc/gshadow file must be owned by root.</title>
 	</overlay>
-	<overlay owner="disastig" ruleid="groupowner_gshadow_file" ownerid="RHEL-06-000037" disa="366" severity="medium">
+	<overlay owner="disastig" ruleid="file_groupowner_etc_gshadow" ownerid="RHEL-06-000037" disa="366" severity="medium">
 		<VMSinfo VKey="38448" SVKey="50248" VRelease="1" />
 		<title>The /etc/gshadow file must be group-owned by root.</title>
 	</overlay>
diff --git a/RHEL/7/input/checks/file_groupowner_etc_gshadow.xml b/RHEL/7/input/checks/file_groupowner_etc_gshadow.xml
new file mode 120000
index 0000000..a8793a7
--- /dev/null
+++ b/RHEL/7/input/checks/file_groupowner_etc_gshadow.xml
@@ -0,0 +1 @@
+../../../../shared/oval/file_groupowner_etc_gshadow.xml
\ No newline at end of file
diff --git a/RHEL/7/input/profiles/rht-ccp.xml b/RHEL/7/input/profiles/rht-ccp.xml
index 9c406bb..c2102af 100644
--- a/RHEL/7/input/profiles/rht-ccp.xml
+++ b/RHEL/7/input/profiles/rht-ccp.xml
@@ -70,7 +70,7 @@ FILE PERMISSION CHECKS
 <select idref="groupowner_shadow_file" selected="true"/>
 <select idref="file_permissions_etc_shadow" selected="true"/>
 <select idref="file_owner_etc_gshadow" selected="true"/>
-<select idref="groupowner_gshadow_file" selected="true"/>
+<select idref="file_groupowner_etc_gshadow" selected="true"/>
 <select idref="perms_gshadow_file" selected="true"/>
 <select idref="userowner_passwd_file" selected="true"/>
 <select idref="groupowner_passwd_file" selected="true"/>
diff --git a/RHEL/7/input/system/permissions/files.xml b/RHEL/7/input/system/permissions/files.xml
index 6273c3d..67b28c4 100644
--- a/RHEL/7/input/system/permissions/files.xml
+++ b/RHEL/7/input/system/permissions/files.xml
@@ -107,7 +107,7 @@ is critical for system security.</rationale>
 <tested by="DS" on="20121026"/>
 </Rule>
 
-<Rule id="groupowner_gshadow_file" severity="medium">
+<Rule id="file_groupowner_etc_gshadow" severity="medium">
 <title>Verify Group Who Owns <tt>gshadow</tt> File</title>
 <description><filegroupowner-desc-macro file="/etc/gshadow" group="root"/></description>
 <ocil><filegroupowner-check-macro file="/etc/gshadow" group="root"/></ocil>
diff --git a/shared/oval/file_groupowner_etc_gshadow.xml b/shared/oval/file_groupowner_etc_gshadow.xml
new file mode 100644
index 0000000..672cf77
--- /dev/null
+++ b/shared/oval/file_groupowner_etc_gshadow.xml
@@ -0,0 +1,30 @@
+<def-group>
+  <definition class="compliance" id="file_groupowner_etc_gshadow" version="1">
+    <metadata>
+      <title>Verify group who owns 'gshadow' file</title>
+      <affected family="unix">
+        <platform>Red Hat Enterprise Linux 6</platform>
+        <platform>Red Hat Enterprise Linux 7</platform>
+      </affected>
+      <description>The /etc/gshadow file should be owned by the appropriate
+      group.</description>
+      <reference source="swells" ref_id="20130918" ref_url="test_attestation" />
+    </metadata>
+    <criteria>
+      <criterion test_ref="test_file_groupowner_etc_gshadow" />
+    </criteria>
+  </definition>
+  <unix:file_test check="all" check_existence="all_exist"
+  comment="Testing gshadow ownership" id="test_file_groupowner_etc_gshadow"
+  version="1">
+    <unix:object object_ref="object_file_groupowner_etc_gshadow" />
+    <unix:state state_ref="state_file_groupowner_etc_gshadow" />
+  </unix:file_test>
+  <unix:file_state id="state_file_groupowner_etc_gshadow" version="1">
+    <unix:group_id datatype="int">0</unix:group_id>
+  </unix:file_state>
+  <unix:file_object comment="/etc/gshadow"
+  id="object_file_groupowner_etc_gshadow" version="1">
+    <unix:filepath>/etc/gshadow</unix:filepath>
+  </unix:file_object>
+</def-group>
-- 
1.8.3.1



More information about the scap-security-guide mailing list