*OpenSCAP* `rpmverifypackage` does not work correctly
The `chdir` and `chroot` system calls are called twice by the `rpmverifypackage` probe. Consequently, an error occurs when the probe is utilized during an *OpenSCAP* scan with custom Open Vulnerability and Assessment Language (OVAL) content.
To work around this problem, do not use the `rpmverifypackage_test` OVAL test in your content or use only the content from the _scap-security-guide_ package where `rpmverifypackage_test` is not used.
Description of problem:
# oscap-docker image registry.access.redhat.com/rhel7 oval eval --id oval:my:def:6 probe_test_rpm.oval.xml
Command: oscap oval eval --id oval:my:def:6 --results /dev/stdout probe_test_rpm.oval.xml failed!
Command returned exit code 1.
E: probe_rpmverifypackage: RPM: Failed to initialize NSS library
error: Failed to initialize NSS library
E: probe_rpmverifypackage: Unable to chdir to '/tmp/tmp8iWJcD/e0f879ff19f6266f31f7', errno: 2 "No such file or directory"
W: oscap: Can't receive message: 125, Operation canceled.
E: oscap: Recv: retry limit (0) reached.
OpenSCAP Error: Probe at sd=1 (rpmverifypackage) reported an error: Initialization failed [oval_probe_ext.c:393]
Unable to receive a message from probe [oval_probe_ext.c:579]
Invalid oval result type: -1. [oval_resultTest.c:179]
Version-Release number of selected component (if applicable):
Steps to Reproduce:
See the description.
Created attachment 1460350 [details]
Upstream issue: https://github.com/OpenSCAP/openscap/issues/1173
This issue was not selected to be included in Red Hat Enterprise Linux 7.7 because it is seen either as low or moderate impact to a small number of use-cases. The next release will be in Maintenance Support 1 Phase, which means that qualified Critical and Important Security errata advisories (RHSAs) and Urgent Priority Bug Fix errata advisories (RHBAs) may be released as they become available. We will now close this issue, but if you believe that it qualifies for the Maintenance Support 1 Phase, please re-open; otherwise, we recommend moving the request to Red Hat Enterprise Linux 8 if applicable.