Bug 1412998

Summary: policycoreutils-python: NameError: global name 'semanage_module_update_file' is not defined
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED WONTFIX QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9CC: dwalsh, lvrabec, mgrepl, mmalik, plautrba, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1408331 Environment:
Last Closed: 2017-10-02 14:23:57 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:
Embargoed:

Description Milos Malik 2017-01-13 11:12:17 UTC
+++ This bug was initially created as a clone of Bug #1408331 +++

Version-Release number of selected component (if applicable):
RHEL-6.9
policycoreutils-2.0.83-30.1.el6_8.x86_64
policycoreutils-python-2.0.83-30.1.el6_8.x86_64

How reproducible:
* always

Steps to Reproduce:
# python
Python 2.6.6 (r266:84292, Aug  9 2016, 06:11:56) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selinux
>>> import seobject
>>> semodule = seobject.moduleRecords('')
>>> semodule.modify('mypolicy.pp')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.6/site-packages/seobject.py", line 381, in modify
    rc = semanage_module_update_file(self.sh, file);
NameError: global name 'semanage_module_update_file' is not defined
>>> 

Actual results:
* traceback

Expected results:
* no traceback

Comment 1 Milos Malik 2017-01-13 11:15:39 UTC
The policy module is very simple:

# cat mypolicy.te 
policy_module(mypolicy,1.0)

# make -f /usr/share/selinux/devel/Makefile 
Compiling targeted mypolicy module
/usr/bin/checkmodule:  loading policy configuration from tmp/mypolicy.tmp
/usr/bin/checkmodule:  policy configuration loaded
/usr/bin/checkmodule:  writing binary representation (version 10) to tmp/mypolicy.mod
Creating targeted mypolicy.pp policy package
rm tmp/mypolicy.mod.fc tmp/mypolicy.mod
#

Comment 2 Petr Lautrbach 2017-10-02 14:23:57 UTC
Red Hat Enterprise Linux 6 transitioned to the Production 3 Phase on May 10, 2017.  During the Production 3 Phase, Critical impact Security Advisories (RHSAs) and selected Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available.

The official life cycle policy can be reviewed here:
http://redhat.com/rhel/lifecycle

This issue does not appear to meet the inclusion criteria for the Production Phase 3 and will be marked as CLOSED/WONTFIX. If this remains a critical requirement, please contact Red Hat Customer Support to request a re-evaluation of the issue, citing a clear business justification.  Red Hat Customer Support can be contacted via the Red Hat Customer Portal at the following URL:

https://access.redhat.com