This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 276121

Summary: python bindings for rpm_execcon not correct
Product: [Fedora] Fedora Reporter: Thomas Woerner <twoerner>
Component: libselinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-18 15:08:06 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 235703, 338601    

Description Thomas Woerner 2007-09-04 09:28:06 EDT
Description of problem:
The python bindings for rpm_execcon not correct:

#!/usr/bin/python

import selinux
args = [ "/bin/bash", "--version" ]
selinux.rpm_execcon(0, args[0], args, [ ])

Produces:

Traceback (most recent call last):
  File "test.py", line 5, in <module>
    selinux.rpm_execcon(0, args[0], args, [ ])
TypeError: in method 'rpm_execcon', argument 3 of type 'char *const []'

Version-Release number of selected component (if applicable):
libselinux-2.0.31-3.fc8

How reproducible:
Always

Steps to Reproduce:
1. Use test case
2.
3.
  
Actual results:
TypeError: in method 'rpm_execcon', argument 3 of type 'char *const []'

Expected results:
bash version

Additional info:
Comment 1 Thomas Woerner 2007-09-04 11:17:20 EDT
This is also a problem in FC-6:libselinux-1.33.4-2.fc6 and
F-7:libselinux-2.0.14-4.fc7.
Comment 2 Daniel Walsh 2007-09-06 08:38:39 EDT
Fixed in libselinux-2_0_31-4_fc8

Is this important enough to back port?
Comment 3 Thomas Woerner 2007-09-07 05:29:16 EDT
Yes, I think this is important enough.