File: oval.template

package info (click to toggle)
scap-security-guide 0.1.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 110,644 kB
  • sloc: xml: 241,883; sh: 73,777; python: 32,527; makefile: 27
file content (25 lines) | stat: -rw-r--r-- 1,019 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>
        {{%- if EXISTS -%}}
        {{% set TENSE = "does" %}}
        {{% set CHECK = "all_exist" %}}
        {{%- else -%}}
        {{% set TENSE = "does not" %}}
        {{% set CHECK = "none_exist" %}}
        {{%- endif -%}}
    <definition class="compliance" id="{{{ _RULE_ID }}}" version="1">

        {{{ oval_metadata("This test makes sure that" + FILEPATH + " " + TENSE +  " exist.") }}}
        <criteria>
            <criterion comment="Ensure that {{{FILEPATH}}} {{{TENSE}}} exist." test_ref="test_{{{_RULE_ID}}}" />
        </criteria>
    </definition>

    <unix:file_test id="test_{{{_RULE_ID}}}" check="all" check_existence="{{{CHECK}}}"
                    version="1" comment="Test that that {{{FILEPATH}}} {{{TENSE}}} exist">
        <unix:object object_ref="object_{{{_RULE_ID}}}" />
    </unix:file_test>

    <unix:file_object comment="{{{FILEPATH}}}" id="object_{{{_RULE_ID}}}" version="1">
        <unix:filepath>{{{FILEPATH}}}</unix:filepath>
    </unix:file_object>
</def-group>