Bug 1026833 - openscap (SCE) does not propagate some variables needed for check_scripts
Summary: openscap (SCE) does not propagate some variables needed for check_scripts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openscap
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Martin Preisler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-05 13:59 UTC by Petr Hracek
Modified: 2014-01-23 11:17 UTC (History)
7 users (show)

Fixed In Version: openscap-1.0.3-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-23 11:17:54 UTC
Type: Bug
Embargoed:


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

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.


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