Skip to content

Commit

Permalink
Add a opposite definition
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Dec 18, 2023
1 parent 50ce2c6 commit 830f301
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function test_probes_systemdunitproperty {

[ -f $RF ] && rm -f $RF

$OSCAP oval eval --results $RF $DF 2>$stderr
$OSCAP oval eval --results $RF $DF

[ -f $RF ]
verify_results "def" $DF $RF 8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
<criterion test_ref="oval:0:tst:5"/>
</criteria>
</definition>
<definition class="compliance" version="1" id="oval:0:def:55"> <!-- comment="false" -->
<metadata><title></title><description></description></metadata>
<criteria>
<criterion test_ref="oval:0:tst:55"/>
</criteria>
</definition>

<definition class="compliance" version="1" id="oval:0:def:6"> <!-- comment="false" -->
<metadata><title></title><description></description></metadata>
Expand Down Expand Up @@ -99,6 +105,11 @@
<object object_ref="oval:0:obj:5"/>
</systemdunitproperty_test>

<!-- check that there doesn't exist systemd-journald.service unit with valid Conflicts property -->
<systemdunitproperty_test id="oval:0:tst:55" check="all" check_existence="none_exist" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="true" version="1">
<object object_ref="oval:0:obj:5"/>
</systemdunitproperty_test>

<!-- check if there is at least one systemd-journald.service unit it has value of Conflicts property equal to empty string -->
<systemdunitproperty_test id="oval:0:tst:6" check="all" check_existence="at_least_one_exists" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" comment="false" version="1">
<object object_ref="oval:0:obj:5"/>
Expand Down

0 comments on commit 830f301

Please sign in to comment.