Bug 1026833

Summary: openscap (SCE) does not propagate some variables needed for check_scripts
Product: [Fedora] Fedora Reporter: Petr Hracek <phracek>
Component: openscapAssignee: Martin Preisler <mpreisle>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: dkopecek, mpreisle, openscap-maint, plautrba, pvrabec, slukasik, theinric
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openscap-1.0.3-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-23 11:17:54 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Here is the function for test in python script none

Description Petr Hracek 2013-11-05 13:59:50 UTC
Description of problem:
I write some check_script for OpenSCAP either in BASH or in Python
In the script when I call 'which <binary>' then it failed with
/usr/bin/which: no python in ((null))

Version-Release number of selected component (if applicable):
openscap-0.9.11

How reproducible:
always

Steps to Reproduce:
1. write the check script either in BASH or in Python
2. call which command on some binary
3. run oscap xccdf eval <path to xml file>

Actual results:
/usr/bin/which: no python in ((null))

Expected results:
/bin/python

Additional info:

Comment 1 Petr Hracek 2013-11-05 14:02:54 UTC
Created attachment 819774 [details]
Here is the function for test in python script

Comment 2 Martin Preisler 2013-12-12 15:20:11 UTC
openscap SCE plugin by design does not pass outside environment variables to checks.

However in this case I do agree that not having $PATH in the checks can make them very cumbersome to write, so we now pass a hardcoded reasonable $PATH to all SCE checks, see https://git.fedorahosted.org/cgit/openscap.git/commit/?id=f4c30de885958a656625eca4ed460ee67d95d586

This will be part of openscap 1.0.2

Comment 3 Petr Hracek 2013-12-12 16:18:09 UTC
Great work.
I will test them when the new release will be out.

Comment 4 Fedora Update System 2014-01-10 10:30:55 UTC
openscap-1.0.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openscap-1.0.2-1.fc20

Comment 5 Fedora Update System 2014-01-11 08:39:53 UTC
Package openscap-1.0.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openscap-1.0.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0618/openscap-1.0.2-1.fc20
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2014-01-14 17:36:47 UTC
openscap-1.0.3-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openscap-1.0.3-1.fc20

Comment 7 Fedora Update System 2014-01-23 11:17:54 UTC
openscap-1.0.3-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.