Debian Codegraph @

tests/mitre/unix-def_file_test.xml

raw symbols SCIP
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#unix unix-definitions-schema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval-def="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:oval="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:unix-def="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
3 <generator>
4 <oval:schema_version>5.10.1</oval:schema_version>
5 <oval:timestamp>2009-01-12T10:41:00-05: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:282" version="3" class="miscellaneous">
10 <metadata>
11 <title>Evaluate to true if the unix-def:file_test is properly supported</title>
12 <description>This definition is intended to evalutate to true if the interpreter properly supports the unix-def:file_test.</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 that the file_object is supported with the path entity equal to some value and the filename entity is set to nil." test_ref="oval:org.mitre.oval.test:tst:2037"/>
19 <criterion comment="Test that the file_object is supported with the path entity matching some regular expression and the filename entity is set to nil." test_ref="oval:org.mitre.oval.test:tst:1917"/>
20 <criterion comment="Test that the file_object is supported with the path entity equal to some value and the filename entity equal to some value." test_ref="oval:org.mitre.oval.test:tst:1159"/>
21 <criterion comment="Test that the file_object is supported with the path entity equal to some value and the filename entity matching some regular expression." test_ref="oval:org.mitre.oval.test:tst:1944"/>
22 <criterion comment="Test that the file_object is supported with the path entity matching some regular expression and the filename entity matching some regular expression." test_ref="oval:org.mitre.oval.test:tst:1288"/>
23 <criterion comment="Test that the file_object is supported with the max_depth behavior set to a limited depth of recursion." test_ref="oval:org.mitre.oval.test:tst:2000"/>
24 <criterion comment="Test that the file_object is supported with the max_depth behavior set to an unlimited depth of recursion." test_ref="oval:org.mitre.oval.test:tst:1479"/>
25 <criterion comment="Test that the recurse_direction behavior is supported." test_ref="oval:org.mitre.oval.test:tst:1912"/>
26 <criterion comment="Test that the file_object is supported with filepath entity equal to some value." test_ref="oval:org.mitre.oval.test:tst:1988"/>
27 <criterion comment="Test that the file_object is supported with the filepath entity matching some regular expression." test_ref="oval:org.mitre.oval.test:tst:1675"/>
28 </criteria>
29 </definition>
30 </definitions>
31 <tests>
32 <file_test id="oval:org.mitre.oval.test:tst:2037" version="1" comment="Test that the file_object is supported with the path entity equal to some value and the filename entity is set to nil." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
33 <object object_ref="oval:org.mitre.oval.test:obj:1320"/>
34 <state state_ref="oval:org.mitre.oval.test:ste:1603"/>
35 </file_test>
36 <file_test id="oval:org.mitre.oval.test:tst:1917" version="1" comment="Test that the file_object is supported with the path entity matching some regular expression and the filename entity is set to nil." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
37 <object object_ref="oval:org.mitre.oval.test:obj:1416"/>
38 <state state_ref="oval:org.mitre.oval.test:ste:1553"/>
39 </file_test>
40 <file_test id="oval:org.mitre.oval.test:tst:1159" version="1" comment="Test that the file_object is supported with the path entity equal to some value and the filename entity equal to some value." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
41 <object object_ref="oval:org.mitre.oval.test:obj:1068"/>
42 <state state_ref="oval:org.mitre.oval.test:ste:1591"/>
43 </file_test>
44 <file_test id="oval:org.mitre.oval.test:tst:1944" version="1" comment="Test that the file_object is supported with the path entity equal to some value and the filename entity matching some regular expression." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
45 <object object_ref="oval:org.mitre.oval.test:obj:1421"/>
46 <state state_ref="oval:org.mitre.oval.test:ste:1106"/>
47 </file_test>
48 <file_test id="oval:org.mitre.oval.test:tst:1288" version="1" comment="Test that the file_object is supported with the path entity matching some regular expression and the filename entity matching some regular expression." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
49 <object object_ref="oval:org.mitre.oval.test:obj:512"/>
50 <state state_ref="oval:org.mitre.oval.test:ste:1761"/>
51 </file_test>
52 <file_test id="oval:org.mitre.oval.test:tst:2000" version="1" comment="Test that the file_object is supported with the max_depth behavior set to a limited depth of recursion." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
53 <object object_ref="oval:org.mitre.oval.test:obj:1310"/>
54 <state state_ref="oval:org.mitre.oval.test:ste:1640"/>
55 </file_test>
56 <file_test id="oval:org.mitre.oval.test:tst:1479" version="1" comment="Test that the file_object is supported with the max_depth behavior set to an unlimited depth of recursion." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
57 <object object_ref="oval:org.mitre.oval.test:obj:1448"/>
58 <state state_ref="oval:org.mitre.oval.test:ste:1565"/>
59 </file_test>
60 <file_test id="oval:org.mitre.oval.test:tst:1912" version="2" comment="Test that the recurse_direction behavior is supported." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
61 <object object_ref="oval:org.mitre.oval.test:obj:1509"/>
62 <state state_ref="oval:org.mitre.oval.test:ste:1730"/>
63 </file_test>
64 <file_test id="oval:org.mitre.oval.test:tst:1988" version="1" comment="Test that the file_object is supported with filepath entity equal to some value." check_existence="at_least_one_exists" check="all" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
65 <object object_ref="oval:org.mitre.oval.test:obj:1198"/>
66 <state state_ref="oval:org.mitre.oval.test:ste:1754"/>
67 </file_test>
68 <file_test id="oval:org.mitre.oval.test:tst:1675" version="2" comment="Test that the file_object is supported with the filepath entity matching some regular expression." check_existence="at_least_one_exists" check="at least one" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
69 <object object_ref="oval:org.mitre.oval.test:obj:1377"/>
70 <state state_ref="oval:org.mitre.oval.test:ste:1476"/>
71 </file_test>
72 </tests>
73 <objects>
74 <file_object id="oval:org.mitre.oval.test:obj:1320" version="1" comment="Retrieve a file_item with a path equal to '/bin'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
75 <path>/bin</path>
76 <filename xsi:nil="true"/>
77 </file_object>
78 <file_object id="oval:org.mitre.oval.test:obj:1416" version="1" comment="Retrieve file_items with a path that matches the regular expression '^/b.n$'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
79 <path operation="pattern match">^/b.n$</path>
80 <filename xsi:nil="true"/>
81 </file_object>
82 <file_object id="oval:org.mitre.oval.test:obj:1068" version="1" comment="Retrieve a file_item with a path that equals '/bin' and filename that equals 'ls'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
83 <path>/bin</path>
84 <filename>ls</filename>
85 </file_object>
86 <file_object id="oval:org.mitre.oval.test:obj:1421" version="1" comment="Retrieve file_items with a path that equals '/bin' and filename that matches the regular expression '^l'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
87 <path>/bin</path>
88 <filename operation="pattern match">^l</filename>
89 </file_object>
90 <file_object id="oval:org.mitre.oval.test:obj:512" version="1" comment="Retrieve file_items with a path that matches the regular expression '^/etc/r' and a filename that matches the regular expression '^r'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
91 <path operation="pattern match">^/etc/r.+</path>
92 <filename operation="pattern match">^r.+</filename>
93 </file_object>
94 <file_object id="oval:org.mitre.oval.test:obj:1310" version="1" comment="Retrieve a file_item with the path starting at '/etc', recursing down 1 level, and filename that equals 'rc'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
95 <behaviors max_depth="1" recurse_direction="down" recurse="symlinks and directories"/>
96 <path>/bin</path>
97 <filename>ls</filename>
98 </file_object>
99 <file_object id="oval:org.mitre.oval.test:obj:1448" version="1" comment="Retrieve a file_item with the path starting at '/etc', recursing down infinitely, and filename that equals 'rc'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
100 <behaviors max_depth="-1" recurse_direction="down" recurse="symlinks and directories"/>
101 <path>/etc</path>
102 <filename>rc</filename>
103 </file_object>
104 <file_object id="oval:org.mitre.oval.test:obj:1509" version="1" comment="Retrieve a file_item with the path starting at '/etc/rc.d', recursing up 1 level, and filename that equals 'profile'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
105 <behaviors max_depth="1" recurse_direction="up" recurse="symlinks and directories"/>
106 <path>/etc/rc.d</path>
107 <filename>profile</filename>
108 </file_object>
109 <file_object id="oval:org.mitre.oval.test:obj:1198" version="1" comment="Retrieve a file_item with the filepath equal to '/etc/rc.d/rc'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
110 <filepath>/etc/rc.d/rc</filepath>
111 </file_object>
112 <file_object id="oval:org.mitre.oval.test:obj:1377" version="1" comment="Retrieve file_items with the filepath matching the regular expression '/etc/ssh/.+'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
113 <filepath operation="pattern match">^/etc/ssh/.+</filepath>
114 </file_object>
115 </objects>
116 <states>
117 <file_state id="oval:org.mitre.oval.test:ste:1603" version="1" comment="This state represents a file_item which has a path of '/bin'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
118 <path>/bin</path>
119 </file_state>
120 <file_state id="oval:org.mitre.oval.test:ste:1553" version="1" comment="This state represents file_items which have a path that matches the regular expression '^/b.n$'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
121 <path operation="pattern match">^/b.n$</path>
122 </file_state>
123 <file_state id="oval:org.mitre.oval.test:ste:1591" version="1" comment="This state represents a file_item which has a path equal to '/bin', a filename equal to 'ls', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
124 <path>/bin</path>
125 <filename>ls</filename>
126 <size datatype="int" operation="greater than">0</size>
127 </file_state>
128 <file_state id="oval:org.mitre.oval.test:ste:1106" version="1" comment="This state represents file_items which have a path equal to '/bin', a filename that matches the regular expression '^l', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
129 <path>/bin</path>
130 <filename operation="pattern match">^l</filename>
131 <size datatype="int" operation="greater than">0</size>
132 </file_state>
133 <file_state id="oval:org.mitre.oval.test:ste:1761" version="1" comment="This state represents file_items which have a path that matches the regular expression '^/etc/r', a filename that matches the regular expression '^r', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
134 <path operation="pattern match">^/etc/r</path>
135 <filename operation="pattern match">^r</filename>
136 <size datatype="int" operation="greater than">0</size>
137 </file_state>
138 <file_state id="oval:org.mitre.oval.test:ste:1640" version="1" comment="This state represents a file_item which has a path of '/bin', a filename equal to 'ls', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
139 <path>/bin</path>
140 <filename>ls</filename>
141 <size datatype="int" operation="greater than">0</size>
142 </file_state>
143 <file_state id="oval:org.mitre.oval.test:ste:1565" version="1" comment="This state represents a file_item which has a path that equals '/etc/rc.d', a filename that equals 'rc', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
144 <path>/etc/rc.d</path>
145 <filename>rc</filename>
146 <size datatype="int" operation="greater than">0</size>
147 </file_state>
148 <file_state id="oval:org.mitre.oval.test:ste:1730" version="2" comment="This state represents a file_item which has a filepath equal to '/etc/profile', a path equal to '/etc', a filename equal to 'profile'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
149 <filepath>/etc/profile</filepath>
150 <path>/etc</path>
151 <filename>profile</filename>
152 </file_state>
153 <file_state id="oval:org.mitre.oval.test:ste:1754" version="1" comment="This state represents a file_item with the filepath equal to '/etc/rc.d/rc'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
154 <filepath>/etc/rc.d/rc</filepath>
155 </file_state>
156 <file_state id="oval:org.mitre.oval.test:ste:1476" version="2" comment="This state represents a file_item which has a filepath equal to '/etc/rc.d/rc', a path equal to '/etc/ssh', a filename equal to 'sshd_config', and a size greater than '0'." xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix">
157 <filepath operation="pattern match">^/etc/ssh.+</filepath>
158 <size datatype="int" operation="greater than">0</size>
159 </file_state>
160 </states>
161 </oval_definitions>