--- a/components/openscap/Makefile Wed Feb 11 14:29:28 2015 +0000
+++ b/components/openscap/Makefile Thu Feb 12 17:24:24 2015 +0000
@@ -71,7 +71,10 @@
-e 's|PYTHON_VERSION = 2.6|PYTHON_VERSION = 2.7|' swig2.7/Makefile swig2.7/python2/Makefile)
COMPONENT_POST_INSTALL_ACTION = \
- (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install)
+ (cd $(@D)/swig2.7 ; $(GMAKE) $(COMPONENT_INSTALL_ARGS) install) ; \
+ $(RM) $(PROTO_DIR)/usr/share/openscap/cpe/* && \
+ $(CP) files/cpe/* $(PROTO_DIR)/usr/share/openscap/cpe
+
# Needed to make "gmake test" work.
CPPFLAGS += -I$(SOURCE_DIR)/src/OVAL
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openscap/files/cpe/openscap-cpe-dict.xml Thu Feb 12 17:24:24 2015 +0000
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+-->
+<cpe-list xmlns="http://cpe.mitre.org/dictionary/2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://cpe.mitre.org/dictionary/2.0 cpe-dictionary_2.0.xsd">
+ <cpe-item name="cpe:/o:oracle:solaris">
+ <title>Oracle Solaris</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:1</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:oracle:solaris:11">
+ <title>Oracle Solaris 11</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:11</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:oracle:solaris:11:1">
+ <title>Oracle Solaris 11.1</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:111</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:oracle:solaris:11:2">
+ <title>Oracle Solaris 11.2</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:112</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:oracle:solaris:11:3">
+ <title>Oracle Solaris 11.3</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:113</check>
+ </cpe-item>
+ <cpe-item name="cpe:/o:oracle:solaris:12">
+ <title>Oracle Solaris 12</title>
+ <check system="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ href="openscap-cpe-oval.xml">oval:com.oracle.solaris.cpe:def:12</check>
+ </cpe-item>
+</cpe-list>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openscap/files/cpe/openscap-cpe-oval.xml Thu Feb 12 17:24:24 2015 +0000
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+-->
+<oval_definitions xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"
+ xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5"
+ xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd">
+ <generator>
+ <oval:product_name>Oracle Solaris</oval:product_name>
+ <oval:product_version />
+ <oval:schema_version>5.9</oval:schema_version>
+ <oval:timestamp>2015-01-28T13:10:39</oval:timestamp>
+ </generator>
+ <definitions>
+ <definition id="oval:com.oracle.solaris.cpe:def:1" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris">
+ <criterion comment="Oracle Solaris"
+ test_ref="oval:com.oracle.solaris.cpe:tst:11" />
+ </criteria>
+ </definition>
+ <definition id="oval:com.oracle.solaris.cpe:def:11" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris 11</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris 11
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris 11">
+ <criterion comment="Oracle Solaris 11"
+ test_ref="oval:com.oracle.solaris.cpe:tst:11" />
+ </criteria>
+ </definition>
+ <definition id="oval:com.oracle.solaris.cpe:def:111" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris 11.1</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris 11.1
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris 11.1">
+ <criterion comment="Oracle Solaris 11.1"
+ test_ref="oval:com.oracle.solaris.cpe:tst:111" />
+ </criteria>
+ </definition>
+ <definition id="oval:com.oracle.solaris.cpe:def:112" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris 11.2</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris 11.2
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris 11.2">
+ <criterion comment="Oracle Solaris 11.2"
+ test_ref="oval:com.oracle.solaris.cpe:tst:112" />
+ </criteria>
+ </definition>
+ <definition id="oval:com.oracle.solaris.cpe:def:113" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris 11.3</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris 11.3
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris 11.3">
+ <criterion comment="Oracle Solaris 11.3"
+ test_ref="oval:com.oracle.solaris.cpe:tst:113" />
+ </criteria>
+ </definition>
+ <definition id="oval:com.oracle.solaris.cpe:def:12" version="1"
+ class="inventory">
+ <metadata>
+ <title>Oracle Solaris 12</title>
+ <affected family="unix">
+ <product>Oracle Solaris</product>
+ </affected>
+ <description>
+ Oracle Solaris 12
+ </description>
+ </metadata>
+ <criteria operator="AND" negate="false"
+ comment="Operating System is Oracle Solaris 12">
+ <criterion comment="Oracle Solaris 12"
+ test_ref="oval:com.oracle.solaris.cpe:tst:12" />
+ </criteria>
+ </definition>
+ </definitions>
+ <tests>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:1" version="0" check="all"
+ comment="Oracle Solaris" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:1" />
+ </uname_test>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:11" version="1" check="all"
+ comment="Oracle Solaris 11" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:11" />
+ </uname_test>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:111" version="111" check="all"
+ comment="Oracle Solaris 11.1" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:111" />
+ </uname_test>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:112" version="11" check="all"
+ comment="Oracle Solaris 11.2" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:112" />
+ </uname_test>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:113" version="113" check="all"
+ comment="Oracle Solaris 11.3" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:113" />
+ </uname_test>
+ <uname_test xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:tst:12" version="12" check="all"
+ comment="Oracle Solaris 12" check_existence="all_exist">
+ <object object_ref="oval:com.oracle.solaris.cpe:obj:1" />
+ <state state_ref="oval:com.oracle.solaris.cpe:ste:12" />
+ </uname_test>
+ </tests>
+ <objects>
+ <uname_object
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:obj:1" version="1"
+ comment="Oracle Solaris release" />
+ </objects>
+ <states>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:1" version="1"
+ comment="Oracle Solaris">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_version datatype="string" operation="pattern match"
+ entity_check="all" >^5.*$</os_version>
+ </uname_state>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:11" version="1"
+ comment="Oracle Solaris 11">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_version datatype="string" operation="equals"
+ entity_check="all">5.11</os_version>
+ </uname_state>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:111" version="1"
+ comment="Oracle Solaris 11.1">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_release datatype="string" operation="equals"
+ entity_check="all">11.1</os_release>
+ <os_version datatype="string" operation="equals"
+ entity_check="all">5.11</os_version>
+ </uname_state>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:112" version="1"
+ comment="Oracle Solaris 11.2">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_release datatype="string" operation="equals"
+ entity_check="all">11.2</os_release>
+ <os_version datatype="string" operation="equals"
+ entity_check="all">5.11</os_version>
+ </uname_state>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:113" version="1"
+ comment="Oracle Solaris 11.3">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_release datatype="string" operation="equals"
+ entity_check="all">11.3</os_release>
+ <os_version datatype="string" operation="equals"
+ entity_check="all">5.11</os_version>
+ </uname_state>
+ <uname_state
+ xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix"
+ id="oval:com.oracle.solaris.cpe:ste:12" version="1"
+ comment="Oracle Solaris 12">
+ <os_name datatype="string" operation="equals"
+ entity_check="all">SunOS</os_name>
+ <os_release datatype="string" operation="equals"
+ entity_check="all">5.12</os_release>
+ </uname_state>
+ </states>
+</oval_definitions>