| 1 |
#!/usr/bin/env bash |
| 2 |
|
| 3 |
VALID=$1 |
| 4 |
|
| 5 |
cat <<EOF |
| 6 |
<?xml version="1.0"?> |
| 7 |
<oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ind-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:lin-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix unix-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#independent independent-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-common-5 oval-common-schema.xsd"> |
| 8 |
|
| 9 |
<generator> |
| 10 |
<oval:product_name>systemdunitdependency</oval:product_name> |
| 11 |
<oval:product_version>1.0</oval:product_version> |
| 12 |
<oval:schema_version>5.11</oval:schema_version> |
| 13 |
<oval:timestamp>2014-06-18T00:00:00-00:00</oval:timestamp> |
| 14 |
</generator> |
| 15 |
|
| 16 |
<definitions> |
| 17 |
|
| 18 |
<definition class="compliance" version="1" id="oval:0:def:1"> <!-- comment="${VALID}" --> |
| 19 |
<metadata><title></title><description></description></metadata> |
| 20 |
<criteria operator="AND"> |
| 21 |
<criterion test_ref="oval:0:tst:1"/> |
| 22 |
</criteria> |
| 23 |
</definition> |
| 24 |
|
| 25 |
<definition class="compliance" version="1" id="oval:0:def:2"> <!-- comment="${VALID}" --> |
| 26 |
<metadata><title></title><description></description></metadata> |
| 27 |
<criteria> |
| 28 |
<criterion test_ref="oval:0:tst:2" comment="is local-fs.target a dependency of sysinit.target?"/> |
| 29 |
</criteria> |
| 30 |
</definition> |
| 31 |
|
| 32 |
</definitions> |
| 33 |
|
| 34 |
<tests> |
| 35 |
|
| 36 |
<systemdunitdependency_test check_existence="at_least_one_exists" version="1" id="oval:0:tst:1" check="all" comment="${VALID}" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 37 |
<object object_ref="oval:0:obj:1"/> |
| 38 |
</systemdunitdependency_test> |
| 39 |
|
| 40 |
<systemdunitdependency_test id="oval:0:tst:2" check_existence="at_least_one_exists" check="all" comment="${VALID}" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 41 |
<object object_ref="oval:0:obj:2"/> |
| 42 |
<state state_ref="oval:0:ste:1"/> |
| 43 |
</systemdunitdependency_test> |
| 44 |
|
| 45 |
</tests> |
| 46 |
|
| 47 |
<objects> |
| 48 |
|
| 49 |
<systemdunitdependency_object version="1" id="oval:0:obj:1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 50 |
<unit>-.mount</unit> |
| 51 |
</systemdunitdependency_object> |
| 52 |
|
| 53 |
<systemdunitdependency_object id="oval:0:obj:2" comment="list of dependencies of sysinit.target" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 54 |
<unit>sysinit.target</unit> |
| 55 |
</systemdunitdependency_object> |
| 56 |
|
| 57 |
</objects> |
| 58 |
|
| 59 |
<states> |
| 60 |
|
| 61 |
<systemdunitdependency_state id="oval:0:ste:1" comment="local-fs.target listed at least once in the dependencies" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 62 |
<dependency entity_check="at least one">local-fs.target</dependency> |
| 63 |
</systemdunitdependency_state> |
| 64 |
|
| 65 |
<systemdunitproperty_state id="oval:0:ste:2" comment="ActiveState property equal to 'active'" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 66 |
<value>active</value> |
| 67 |
</systemdunitproperty_state> |
| 68 |
|
| 69 |
</states> |
| 70 |
|
| 71 |
</oval_definitions> |
| 72 |
EOF |