| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | cat <<EOF |
| 4 | <?xml version="1.0"?> |
| 5 | <oval_definitions xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:unix="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" 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"> |
| 6 | <generator> |
| 7 | <oval:schema_version>5.11</oval:schema_version> |
| 8 | <oval:timestamp>0001-01-01T00:00:00+00:00</oval:timestamp> |
| 9 | </generator> |
| 10 | |
| 11 | <definitions> |
| 12 | <definition class="compliance" version="1" id="oval:x:def:1"> |
| 13 | <metadata> |
| 14 | <title>x</title> |
| 15 | <description>x</description> |
| 16 | <affected family="unix"> |
| 17 | <platform>x</platform> |
| 18 | </affected> |
| 19 | </metadata> |
| 20 | <criteria> |
| 21 | <criterion test_ref="oval:x:tst:1" comment="always pass"/> |
| 22 | <criterion test_ref="oval:x:tst:2" comment="always pass"/> |
| 23 | <criterion test_ref="oval:x:tst:3" comment="always pass"/> |
| 24 | <criterion test_ref="oval:x:tst:4" comment="always pass"/> |
| 25 | <criterion test_ref="oval:x:tst:5" comment="always pass"/> |
| 26 | <criterion test_ref="oval:x:tst:6" comment="always pass"/> |
| 27 | </criteria> |
| 28 | </definition> |
| 29 | </definitions> |
| 30 | |
| 31 | <tests> |
| 32 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:1" version="1"> |
| 33 | <unix:object object_ref="oval:1:obj:1"/> |
| 34 | <unix:state state_ref="oval:1:ste:1"/> |
| 35 | </unix:symlink_test> |
| 36 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:2" version="1"> |
| 37 | <unix:object object_ref="oval:1:obj:2"/> |
| 38 | </unix:symlink_test> |
| 39 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:3" version="1"> |
| 40 | <unix:object object_ref="oval:1:obj:3"/> |
| 41 | </unix:symlink_test> |
| 42 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:4" version="1"> |
| 43 | <unix:object object_ref="oval:1:obj:4"/> |
| 44 | </unix:symlink_test> |
| 45 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:5" version="1"> |
| 46 | <unix:object object_ref="oval:1:obj:5"/> |
| 47 | </unix:symlink_test> |
| 48 | <unix:symlink_test check="all" check_existence="all_exist" comment="x" id="oval:x:tst:6" version="1"> |
| 49 | <unix:object object_ref="oval:1:obj:6"/> |
| 50 | <unix:state state_ref="oval:1:ste:6"/> |
| 51 | </unix:symlink_test> |
| 52 | </tests> |
| 53 | |
| 54 | <objects> |
| 55 | <unix:symlink_object id="oval:1:obj:1" version="1"> |
| 56 | <unix:filepath>$1/normal_symlink</unix:filepath> |
| 57 | </unix:symlink_object> |
| 58 | <unix:symlink_object id="oval:1:obj:2" version="1"> |
| 59 | <unix:filepath>$1/broken_symlink</unix:filepath> |
| 60 | </unix:symlink_object> |
| 61 | <unix:symlink_object id="oval:1:obj:3" version="1"> |
| 62 | <unix:filepath>/etc/does_not_exist</unix:filepath> |
| 63 | </unix:symlink_object> |
| 64 | <unix:symlink_object id="oval:1:obj:4" version="1"> |
| 65 | <unix:filepath>$1/some_file</unix:filepath> |
| 66 | </unix:symlink_object> |
| 67 | <unix:symlink_object id="oval:1:obj:5" version="1"> |
| 68 | <unix:filepath>$1/circular_symlink</unix:filepath> |
| 69 | </unix:symlink_object> |
| 70 | <unix:symlink_object id="oval:1:obj:6" version="1"> |
| 71 | <unix:filepath>$1/chained_symlink</unix:filepath> |
| 72 | </unix:symlink_object> |
| 73 | </objects> |
| 74 | |
| 75 | <states> |
| 76 | <unix:symlink_state id="oval:1:ste:1" version="1"> |
| 77 | <unix:filepath>$1/normal_symlink</unix:filepath> |
| 78 | <unix:canonical_path>$1/some_file</unix:canonical_path> |
| 79 | </unix:symlink_state> |
| 80 | <unix:symlink_state id="oval:1:ste:6" version="1"> |
| 81 | <unix:filepath>$1/chained_symlink</unix:filepath> |
| 82 | <unix:canonical_path>$1/other_file</unix:canonical_path> |
| 83 | </unix:symlink_state> |
| 84 | </states> |
| 85 | |
| 86 | </oval_definitions> |
| 87 | EOF |