File: template_OVAL_package_installed

package info (click to toggle)
scap-security-guide 0.1.39-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 31,836 kB
  • sloc: xml: 129,736; python: 7,462; sh: 3,796; makefile: 27
file content (51 lines) | stat: -rw-r--r-- 2,075 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<def-group>
  <definition class="compliance" id="package_%PKGNAME%_installed"
  version="1">
    <metadata>
      <title>Package %PKGNAME% Installed</title>
      <affected family="unix">
        <platform>multi_platform_all</platform>
      </affected>
      <description>The {{{ pkg_system|upper }}} package %PKGNAME% should be installed.</description>
    </metadata>
    <criteria>
      <criterion comment="package %PKGNAME% is installed"
      test_ref="test_package_%PKGNAME%_installed" />
    </criteria>
  </definition>
{{% if pkg_system == "rpm" %}}
  <linux:rpminfo_test check="all" check_existence="all_exist"
  id="test_package_%PKGNAME%_installed" version="1"
  comment="package %PKGNAME% is installed">
    <linux:object object_ref="obj_package_%PKGNAME%_installed" />
    {{% if "%EVR%" %}}
      <linux:state state_ref="ste_package_%PKGNAME%_installed" />
    {{% endif %}}
  </linux:rpminfo_test>
  <linux:rpminfo_object id="obj_package_%PKGNAME%_installed" version="1">
    <linux:name>%PKGNAME%</linux:name>
  </linux:rpminfo_object>
  {{% if "%EVR%" %}}
    <linux:rpminfo_state id="ste_package_%PKGNAME%_installed" version="1">
      <linux:evr datatype="evr_string" operation="greater than or equal">%EVR%</linux:evr>
    </linux:rpminfo_state>
  {{% endif %}}
{{% elif pkg_system == "dpkg" %}}
  <linux:dpkginfo_test check="all" check_existence="all_exist"
  id="test_package_%PKGNAME%_installed" version="1"
  comment="package %PKGNAME% is installed">
    <linux:object object_ref="obj_package_%PKGNAME%_installed" />
    {{% if "%EVR%" %}}
      <linux:state state_ref="ste_package_%PKGNAME%_installed" />
    {{% endif %}}
  </linux:dpkginfo_test>
  <linux:dpkginfo_object id="obj_package_%PKGNAME%_installed" version="1">
    <linux:name>%PKGNAME%</linux:name>
  </linux:dpkginfo_object>
  {{% if "%EVR%" %}}
    <linux:dpkginfo_state id="ste_package_%PKGNAME%_installed" version="1">
      <linux:evr datatype="evr_string" operation="greater than or equal">%EVR%</linux:evr>
    </linux:dpkginfo_state>
  {{% endif %}}
{{% endif %}}
</def-group>