File: grub2_entries_reference_kernelopts.xml

package info (click to toggle)
scap-security-guide 0.1.79-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 114,704 kB
  • sloc: xml: 244,677; sh: 84,647; python: 33,203; makefile: 27
file content (25 lines) | stat: -rw-r--r-- 1,533 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<def-group>
  <definition class="compliance" id="grub2_entries_reference_kernelopts" version="2">
  {{{ oval_metadata(
	  "Ensure that grubenv-defined kernel options are referenced in individual boot loader entries",
	  title="Use $kernelopts in /boot/loader/entries/*.conf",
	  affected_platforms=["multi_platform_all"], rule_title=rule_title) }}}
    <criteria operator="AND">
        <criterion test_ref="test_grub2_entries_reference_kernelopts"
        comment="check kernel command line parameters for referenced boot entries reference the $kernelopts variable." />
    </criteria>
  </definition>

    <ind:textfilecontent54_test id="test_grub2_entries_reference_kernelopts"
                                comment="check kernel command line parameters for referenced boot entries reference the $kernelopts variable."
                                check="all" check_existence="all_exist" version="1">
      <ind:object object_ref="object_grub2_entries_reference_kernelopts" />
    </ind:textfilecontent54_test>

  <ind:textfilecontent54_object id="object_grub2_entries_reference_kernelopts" version="1">
    <ind:path>/boot/loader/entries/</ind:path>
    <ind:filename operation="pattern match">^.*\.conf$</ind:filename>
    <ind:pattern operation="pattern match">^options(?:\s+.*)?\s+\$kernelopts\b.*$</ind:pattern>
    <ind:instance datatype="int" operation="greater than or equal">1</ind:instance>                                                                             
  </ind:textfilecontent54_object>
</def-group>