aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xml/SCAP/gentoo-oval.xml')
-rw-r--r--xml/SCAP/gentoo-oval.xml62
1 files changed, 62 insertions, 0 deletions
diff --git a/xml/SCAP/gentoo-oval.xml b/xml/SCAP/gentoo-oval.xml
index 7f6e674..f873701 100644
--- a/xml/SCAP/gentoo-oval.xml
+++ b/xml/SCAP/gentoo-oval.xml
@@ -562,6 +562,25 @@
</criteria>
</definition>
+ <definition id="oval:org.gentoo.dev.swift:def:34" version="1" class="compliance">
+ <metadata>
+ <title>/boot/grub/grub.conf has a password set</title>
+ <affected family="unix">
+ <platform>Gentoo Linux</platform>
+ </affected>
+ <description>
+ If /boot/grub/grub.conf exists, then it must have a password set.
+ </description>
+ </metadata>
+ <criteria operator="OR">
+ <criteria operator="AND">
+ <criterion test_ref="oval:org.gentoo.dev.swift:tst:37" comment="/boot/grub exists" />
+ <criterion test_ref="oval:org.gentoo.dev.swift:tst:35" comment="/boot/grub/grub.conf does not exist" />
+ </criteria>
+ <criterion test_ref="oval:org.gentoo.dev.swift:tst:36" comment="GRUB Legacy configuration has a password set" />
+ </criteria>
+ </definition>
+
</definitions>
<tests>
@@ -848,6 +867,27 @@
<lin-def:state state_ref="oval:org.gentoo.dev.swift:ste:14" />
</lin-def:partition_test>
+ <unix-def:file_test id="oval:org.gentoo.dev.swift:tst:35"
+ version="1" check="all" check_existence="none_exist"
+ comment="/boot/grub/grub.conf does not exist">
+ <!-- The /boot/grub/grub.conf file -->
+ <unix-def:object object_ref="oval:org.gentoo.dev.swift:obj:22" />
+ </unix-def:file_test>
+
+ <ind-def:textfilecontent54_test id="oval:org.gentoo.dev.swift:tst:36"
+ comment="The grub.conf file has a password --md5 entry"
+ version="1" check="at least one" check_existence="at_least_one_exists">
+ <!-- The /boot/grub/grub.conf file content -->
+ <ind-def:object object_ref="oval:org.gentoo.dev.swift:obj:23" />
+ <ind-def:state state_ref="oval:org.gentoo.dev.swift:ste:15" />
+ </ind-def:textfilecontent54_test>
+
+ <unix-def:file_test id="oval:org.gentoo.dev.swift:tst:37"
+ version="1" check="all" check_existence="all_exist"
+ comment="/boot/grub exists">
+ <!-- The /boot/grub location exists -->
+ <unix-def:object object_ref="oval:org.gentoo.dev.swift:obj:24" />
+ </unix-def:file_test>
</tests>
@@ -974,6 +1014,23 @@
<lin-def:mount_point>/proc</lin-def:mount_point>
</lin-def:partition_object>
+ <unix-def:file_object id="oval:org.gentoo.dev.swift:obj:22"
+ version="1" comment="The /boot/grub/grub.conf file">
+ <unix-def:filepath>/boot/grub/grub.conf</unix-def:filepath>
+ </unix-def:file_object>
+
+ <ind-def:textfilecontent54_object id="oval:org.gentoo.dev.swift:obj:23"
+ version="1" comment="The /boot/grub/grub.conf content">
+ <ind-def:filepath>/boot/grub/grub.conf</ind-def:filepath>
+ <ind-def:pattern operation="pattern match">^([^#\n]*)(?#.*)?$</ind-def:pattern>
+ <ind-def:instance operation="greater than or equal" datatype="int">1</ind-def:instance>
+ </ind-def:textfilecontent54_object>
+
+ <unix-def:file_object id="oval:org.gentoo.dev.swift:obj:24"
+ version="1" comment="The /boot/grub location">
+ <unix-def:filepath>/boot/grub</unix-def:filepath>
+ </unix-def:file_object>
+
</objects>
<states>
@@ -1048,6 +1105,11 @@
<lin-def:mount_options entity_check="at least one" operation="pattern match">hidepid=[12]</lin-def:mount_options>
</lin-def:partition_state>
+ <ind-def:textfilecontent54_state id="oval:org.gentoo.dev.swift:ste:15"
+ version="1" comment="Has a password --md5 entry">
+ <ind-def:subexpression datatype="string" operation="pattern match" entity_check="all">[\s]*password --md5 [\S]+</ind-def:subexpression>
+ </ind-def:textfilecontent54_state>
+
</states>
<variables>