Bug 215742

Summary: seobject.py has a translation bug
Product: [Fedora] Fedora Reporter: Eric Preston <developer>
Component: policycoreutilsAssignee: Daniel Walsh <dwalsh>
Status: CLOSED CURRENTRELEASE QA Contact: Ben Levenson <benl>
Severity: low Docs Contact:
Priority: medium    
Version: 6CC: dwalsh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Current Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-21 15:42:53 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:

Description Eric Preston 2006-11-15 15:46:34 UTC
Description of problem:

Sitting in RHS429 this week a student noticed a but with MLS/MCS
translation with an example under FC6 and I tracked it down.

How reproducible:

Garranteed

Steps to Reproduce:
1. semanage translation -a -T Hipaa s0:c1
2. semanage login -l
3. Note that Hipaa seems truncated
  
Actual results:

Hip

Expected results:

Hipaa

Additional info:

seobject.py contains a bug in which string.strip("a:b:c") 
does not do what the author intended.

both

def translate(raw, prepend = 1):
   ...
   trans = trans.strip("a:b:c") ---> [Line 105]

and

def untranslate(trans, prepend = 1):
   ...
   raw = raw.strip("a:b:c") ---> [line 121?]

is not doing what is intended.

Cheers,
Eric

Comment 1 Daniel Walsh 2007-02-14 21:32:03 UTC
Fixed in policycoreutils-1.34.1-4.fc6