Bug 188106

Summary: matchpathcon not usable from Python
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: libselinuxAssignee: Daniel Walsh <dwalsh>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: laroche
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-04-11 18:26:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Typedef mode_t as unsigned none

Description Miloslav Trmač 2006-04-06 02:42:58 UTC
$ python
Python 2.4.2 (#1, Feb 12 2006, 03:59:46)
[GCC 4.1.0 20060210 (Red Hat 4.1.0-0.24)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import selinux
>>> selinux.matchpathcon('/', 0)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: argument number 2: a 'mode_t *' is expected, 'int(0)' is received


Version-Release number of selected component (if applicable):
libselinux-python-1.30-1.fc5

My knowledge of swig is minimal, but the attached patch seems to fix it.

Comment 1 Miloslav Trmač 2006-04-06 02:42:58 UTC
Created attachment 127386 [details]
Typedef mode_t as unsigned

Comment 2 Daniel Walsh 2006-04-11 18:26:47 UTC
Fixed in rawhide - libselinux-1.30.1-1

Is this something worth backporting to FC5, or should I just wait until
something more important comes up?


Comment 3 Miloslav Trmač 2006-04-11 20:43:15 UTC
Thanks!

I don't need it urgently, but as my main workstation has FC5 installed, it would
be nice to get a fix in FC5 sometime.