@@ -34,15 +34,15 @@ function test_offline_mode_symlink {
34
34
ln -s /etc/shadow $tmpdir /etc/passwd
35
35
touch $tmpdir /file_in_root
36
36
ln -s ../../../../../file_in_root $tmpdir /path_traversal_symlink
37
- ln -s ./some_file $tmpdir /symlink_with_period_in_path
37
+ ln -s ./some_file $tmpdir /symlink_with_dot_in_path
38
38
touch /tmp/symlinktarget
39
39
ln -s /tmp/symlinktarget /tmp/symlinktest
40
40
41
41
42
42
43
43
bash ${srcdir} /test_offline_mode_symlink.xml.sh " " > " $DF "
44
44
export OSCAP_PROBE_ROOT=" $tmpdir "
45
- $OSCAP oval eval --verbose INFO -- results $RF $DF
45
+ $OSCAP oval eval --results $RF $DF
46
46
47
47
result=$RF
48
48
@@ -54,21 +54,18 @@ function test_offline_mode_symlink {
54
54
p=' oval_results/results/system/oval_system_characteristics/'
55
55
assert_exists 12 $p ' collected_objects/object'
56
56
assert_exists 6 $p ' collected_objects/object[@flag="complete"]'
57
- assert_exists 9 $p ' system_data/unix-sys:symlink_item'
57
+ assert_exists 6 $p ' system_data/unix-sys:symlink_item'
58
58
assert_exists 6 $p ' system_data/unix-sys:symlink_item[@status="exists"]'
59
59
assert_exists 1 $p'system_data/unix-sys:symlink_item/unix-sys:filepath[text ()=" '/normal_symlink'" ]'
60
60
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/normal_symlink_relative'" ]'
61
- assert_exists 2 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /some_file" ]'
61
+ assert_exists 3 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /some_file" ]'
62
62
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/chained_symlink'" ]'
63
63
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /other_file" ]'
64
64
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/etc/passwd'" ]'
65
65
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /etc/shadow" ]'
66
- assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/chained_symlink_relative'" ]'
67
- assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /other_file" ]'
68
66
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/path_traversal_symlink'" ]'
69
67
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /file_in_root" ]'
70
68
assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:filepath[text()= " '/symlink_with_dot_in_path'" ]'
71
- assert_exists 1 $p' system_data/unix-sys:symlink_item/unix-sys:canonical_path[text()= " /some_file" ]'
72
69
assert_exists 3 $p' collected_objects/object[@flag= " error" ]'
73
70
assert_exists 3 $p' collected_objects/object[@flag= " does not exist" ]'
74
71
assert_exists 6 $p' collected_objects/object/message'
0 commit comments