| 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <oval_definitions xsi:schemaLocation="http://oval.mitre.org/XMLSchema/oval-definitions-5 oval-definitions-schema.xsd http://oval.mitre.org/XMLSchema/oval-definitions-5#linux linux-definitions-schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:linux-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5"> |
| 3 | <generator> |
| 4 | <oval:schema_version>5.10.1</oval:schema_version> |
| 5 | <oval:timestamp>2011-04-09T14:48:11-04:00</oval:timestamp> |
| 6 | <terms_of_use>Copyright (c) 2002-2012, The MITRE Corporation. All rights reserved. The contents of this file are subject to the license described in terms.txt.</terms_of_use> |
| 7 | </generator> |
| 8 | <definitions> |
| 9 | <definition id="oval:org.mitre.oval.test:def:693" version="4" class="miscellaneous"> |
| 10 | <metadata> |
| 11 | <title>Evaluate to true if the linux-def:selinuxsecuritycontext_test is properly supported</title> |
| 12 | <description>This definition is intended to evalutate to true if the interpreter properly supports the linux-def:selinuxsecuritycontext_test and all of its valid operations.</description> |
| 13 | </metadata> |
| 14 | <notes> |
| 15 | <note>It is important to note that the values used in this test definition are specific to a particular machine, and may not necessarily apply to your system. As a result, in order to have the definition return a result of 'true', you must either change these values to the ones found on your particular system, or you must configure your system to use these values.</note> |
| 16 | </notes> |
| 17 | <criteria operator="AND"> |
| 18 | <criterion comment="Test getting context of current process." test_ref="oval:org.mitre.oval.test:tst:1706"/> |
| 19 | <criterion comment="Test getting context of a particular pid." test_ref="oval:org.mitre.oval.test:tst:1381"/> |
| 20 | <criterion comment="Test getting context of a set of pids." test_ref="oval:org.mitre.oval.test:tst:1762"/> |
| 21 | <criterion comment="Test getting context of a file (filepath)." test_ref="oval:org.mitre.oval.test:tst:1411"/> |
| 22 | <criterion comment="Test getting context of a file (path+filename)." test_ref="oval:org.mitre.oval.test:tst:1256"/> |
| 23 | <criterion comment="Test getting context of a set of files." test_ref="oval:org.mitre.oval.test:tst:1925"/> |
| 24 | <criterion comment="Test getting context of a directory." test_ref="oval:org.mitre.oval.test:tst:1747"/> |
| 25 | </criteria> |
| 26 | </definition> |
| 27 | </definitions> |
| 28 | <tests> |
| 29 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1706" version="1" comment="Test getting context of current process." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 30 | <oval-def:notes xmlns:oval1="http://oval.mitre.org/XMLSchema/oval-definitions-5"> |
| 31 | <note xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5">There is no state, because nothing can really be said about |
| 32 | the resulting item. You can't know beforehand what the process ID will be.</note> |
| 33 | </oval-def:notes> |
| 34 | <object object_ref="oval:org.mitre.oval.test:obj:1427"/> |
| 35 | </selinuxsecuritycontext_test> |
| 36 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1381" version="1" comment="Test getting context of a particular pid." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 37 | <object object_ref="oval:org.mitre.oval.test:obj:491"/> |
| 38 | <state state_ref="oval:org.mitre.oval.test:ste:1468"/> |
| 39 | </selinuxsecuritycontext_test> |
| 40 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1762" version="1" comment="Test getting context of a set of pids." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 41 | <object object_ref="oval:org.mitre.oval.test:obj:1376"/> |
| 42 | <state state_ref="oval:org.mitre.oval.test:ste:1573"/> |
| 43 | </selinuxsecuritycontext_test> |
| 44 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1411" version="1" comment="Test getting context of a file (filepath)." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 45 | <object object_ref="oval:org.mitre.oval.test:obj:1474"/> |
| 46 | <state state_ref="oval:org.mitre.oval.test:ste:1181"/> |
| 47 | </selinuxsecuritycontext_test> |
| 48 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1256" version="2" comment="Test getting context of a file (path+filename)." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 49 | <object object_ref="oval:org.mitre.oval.test:obj:1258"/> |
| 50 | <state state_ref="oval:org.mitre.oval.test:ste:1324"/> |
| 51 | </selinuxsecuritycontext_test> |
| 52 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1925" version="3" comment="Test getting context of a set of files." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 53 | <object object_ref="oval:org.mitre.oval.test:obj:1385"/> |
| 54 | <state state_ref="oval:org.mitre.oval.test:ste:1342"/> |
| 55 | </selinuxsecuritycontext_test> |
| 56 | <selinuxsecuritycontext_test id="oval:org.mitre.oval.test:tst:1747" version="1" comment="Test getting context of a directory." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 57 | <oval-def:notes xmlns:oval1="http://oval.mitre.org/XMLSchema/oval-definitions-5"> |
| 58 | <note xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5">There is no state, because it is not possible |
| 59 | to verify whether a directory was collected (the 'filename' state entity |
| 60 | is not nillable).</note> |
| 61 | </oval-def:notes> |
| 62 | <object object_ref="oval:org.mitre.oval.test:obj:1468"/> |
| 63 | </selinuxsecuritycontext_test> |
| 64 | </tests> |
| 65 | <objects> |
| 66 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1427" version="1" comment="Get context of the current process' pid." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 67 | <pid datatype="int" xsi:nil="true"/> |
| 68 | </selinuxsecuritycontext_object> |
| 69 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:491" version="1" comment="Get context of a particular pid." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 70 | <pid datatype="int">1</pid> |
| 71 | </selinuxsecuritycontext_object> |
| 72 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1376" version="1" comment="Get context of a set of pids." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 73 | <pid datatype="int" operation="greater than">3000</pid> |
| 74 | </selinuxsecuritycontext_object> |
| 75 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1474" version="1" comment="Get context of a particular file (filepath)." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 76 | <filepath>/etc/passwd</filepath> |
| 77 | </selinuxsecuritycontext_object> |
| 78 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1258" version="2" comment="Get context of a particular file (path+filename)." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 79 | <path>/etc</path> |
| 80 | <filename>mtab</filename> |
| 81 | </selinuxsecuritycontext_object> |
| 82 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1385" version="2" comment="Get context of a set of files." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 83 | <path>/etc/profile.d</path> |
| 84 | <filename operation="pattern match">.*</filename> |
| 85 | </selinuxsecuritycontext_object> |
| 86 | <selinuxsecuritycontext_object id="oval:org.mitre.oval.test:obj:1468" version="1" comment="Get context of the directory /dev." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 87 | <path>/dev</path> |
| 88 | <filename xsi:nil="true"/> |
| 89 | </selinuxsecuritycontext_object> |
| 90 | </objects> |
| 91 | <states> |
| 92 | <selinuxsecuritycontext_state id="oval:org.mitre.oval.test:ste:1468" version="1" comment="accepts the context of pid 1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 93 | <pid datatype="int">1</pid> |
| 94 | </selinuxsecuritycontext_state> |
| 95 | <selinuxsecuritycontext_state id="oval:org.mitre.oval.test:ste:1573" version="1" comment="accepts the contexts of pids > 3000" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 96 | <pid datatype="int" operation="greater than">3000</pid> |
| 97 | </selinuxsecuritycontext_state> |
| 98 | <selinuxsecuritycontext_state id="oval:org.mitre.oval.test:ste:1181" version="1" comment="accepts the context of /etc/passwd" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 99 | <filepath>/etc/passwd</filepath> |
| 100 | </selinuxsecuritycontext_state> |
| 101 | <selinuxsecuritycontext_state id="oval:org.mitre.oval.test:ste:1324" version="1" comment="accepts the context of /etc/mtab" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 102 | <filepath>/etc/mtab</filepath> |
| 103 | </selinuxsecuritycontext_state> |
| 104 | <selinuxsecuritycontext_state id="oval:org.mitre.oval.test:ste:1342" version="2" comment="accepts the context of files in /etc/profile.d" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux"> |
| 105 | <path>/etc/profile.d</path> |
| 106 | </selinuxsecuritycontext_state> |
| 107 | </states> |
| 108 | </oval_definitions> |