Skip to content

Commit a9a8319

Browse files
committed
Merge branch 'maint-1.2' into maint-1.3
Conflicts: tests/DS/sds_detect_version/Makefile.am
2 parents 165e747 + 3b0b938 commit a9a8319

File tree

6 files changed

+19
-58
lines changed

6 files changed

+19
-58
lines changed

cpe/openscap-cpe-oval.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@
10481048
<lin-def:name>redhat-release</lin-def:name>
10491049
</lin-def:rpminfo_object>
10501050
<lin-def:rpminfo_object id="oval:org.open-scap.cpe.fedora-release:obj:2" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
1051-
<lin-def:name>fedora-release</lin-def:name>
1051+
<lin-def:name operation="pattern match">^fedora-release.*</lin-def:name>
10521052
</lin-def:rpminfo_object>
10531053
<lin-def:rpmverifyfile_object id="oval:org.open-scap.cpe.redhat-release:obj:3" version="1" xmlns="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux">
10541054
<!-- Sadly, OVAL cannot do the right query (rpm -q -whatprovides system-release). Let's check the filename instead. -->

src/OVAL/probes/unix/sysctl_probe.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ int sysctl_probe_main(probe_ctx *ctx, void *probe_arg)
7676
*/
7777
ent_attrs = probe_attr_creat("max_depth", r0 = SEXP_string_newf("%d", PROC_SYS_MAXDEPTH),
7878
"recurse_direction", r1 = SEXP_string_new("down", 4),
79-
"recurse_file_system", r2 = SEXP_string_new("local", 7),
79+
"recurse_file_system", r2 = SEXP_string_new("all", 3),
8080
"recurse", r3 = SEXP_string_new("symlinks and directories", 24),
8181
NULL);
8282
bh_entity = probe_ent_creat1("behaviors", ent_attrs, NULL);

tests/DS/sds_detect_version/scap-1.2-ds.xml

Lines changed: 0 additions & 51 deletions
This file was deleted.

tests/DS/sds_detect_version/scap-1.3-ds.xml renamed to tests/DS/sds_detect_version/scap-ds.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="1.3">
3-
<ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="1.3" use-case="OTHER">
2+
<ns0:data-stream-collection xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:ns0="http://scap.nist.gov/schema/scap/source/1.2" xmlns:ns1="http://www.w3.org/1999/xlink" xmlns:ns10="http://checklists.nist.gov/xccdf/1.2" xmlns:ns13="http://cpe.mitre.org/dictionary/2.0" xmlns:ns2="urn:oasis:names:tc:entity:xmlns:xml:catalog" xmlns:ns3="http://scap.nist.gov/schema/ocil/2.0" xmlns:ns4="http://oval.mitre.org/XMLSchema/oval-definitions-5" xmlns:ns6="http://oval.mitre.org/XMLSchema/oval-common-5" xmlns:ns7="http://oval.mitre.org/XMLSchema/oval-definitions-5#independent" xmlns:ns8="http://oval.mitre.org/XMLSchema/oval-definitions-5#unix" xmlns:ns9="http://oval.mitre.org/XMLSchema/oval-definitions-5#linux" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="scap_org.open-scap_collection_from_xccdf_ssg-rhel8-xccdf-1.2.xml" schematron-version="X.X">
3+
<ns0:data-stream id="scap_org.open-scap_datastream_from_xccdf_ssg-rhel8-xccdf-1.2.xml" scap-version="X.X" use-case="OTHER">
44
<ns0:checks>
55
<ns0:component-ref id="scap_org.open-scap_cref_ssg-rhel8-oval.xml" ns1:href="#scap_org.open-scap_comp_ssg-rhel8-oval.xml"/>
66
</ns0:checks>

tests/DS/sds_detect_version/test_detect_version.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,27 @@
1212

1313
set -e -o pipefail
1414

15+
echo $srcdir
16+
1517
function test_oscap_info {
1618
version="$1"
1719
stdout="$(mktemp)"
1820
stderr="$(mktemp)"
19-
$OSCAP info $srcdir/scap-$version-ds.xml > $stdout 2> $stderr
21+
ds="$(mktemp)"
22+
cp $srcdir/scap-ds.xml $ds
23+
sed -i "s/X.X/${version}/g" $ds
24+
25+
$OSCAP info $ds > $stdout 2> $stderr
2026
[ ! -s $stderr ]
2127
grep -q "Version: $version" $stdout
2228
rm $stdout
2329
rm $stderr
30+
rm $ds
2431
}
2532

26-
test_oscap_info "1.2"
27-
test_oscap_info "1.3"
33+
SDS=$(find $top_srcdir/schemas/sds -maxdepth 1 -mindepth 1 -type d -printf '%f\n')
34+
35+
for sds_version in $SDS
36+
do
37+
test_oscap_info $sds_version
38+
done

tests/probes/sysctl/test_sysctl_probe_all.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ SYSCTL_BLACKLIST='
2020
kernel.usermodehelper.inheritable
2121
net.core.bpf_jit_harden
2222
net.core.bpf_jit_kallsyms
23+
net.core.bpf_jit_limit
2324
net.ipv4.tcp_fastopen_key
2425
stable_secret
2526
vm.mmap_rnd_bits

0 commit comments

Comments
 (0)