Bug 1026833 - openscap (SCE) does not propagate some variables needed for check_scripts
openscap (SCE) does not propagate some variables needed for check_scripts
Product: Fedora
Classification: Fedora
Component: openscap (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Martin Preisler
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-11-05 08:59 EST by Petr Hracek
Modified: 2014-01-23 06:17 EST (History)
7 users (show)

See Also:
Fixed In Version: openscap-1.0.3-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-23 06:17:54 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Here is the function for test in python script (882 bytes, text/plain)
2013-11-05 09:02 EST, Petr Hracek
no flags Details

  None (edit)
Description Petr Hracek 2013-11-05 08:59:50 EST
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):

How reproducible:

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:

Additional info:
Comment 1 Petr Hracek 2013-11-05 09:02:54 EST
Created attachment 819774 [details]
Here is the function for test in python script
Comment 2 Martin Preisler 2013-12-12 10:20:11 EST
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 11:18:09 EST
Great work.
I will test them when the new release will be out.
Comment 4 Fedora Update System 2014-01-10 05:30:55 EST
openscap-1.0.2-1.fc20 has been submitted as an update for Fedora 20.
Comment 5 Fedora Update System 2014-01-11 03:39:53 EST
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:
then log in and leave karma (feedback).
Comment 6 Fedora Update System 2014-01-14 12:36:47 EST
openscap-1.0.3-1.fc20 has been submitted as an update for Fedora 20.
Comment 7 Fedora Update System 2014-01-23 06:17:54 EST
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.

Note You need to log in before you can comment on or make changes to this bug.