Bug 459677

Summary: chcat won't translate multi-categories to strings as defined
Product: Red Hat Enterprise Linux 5 Reporter: Winston Li <wili>
Component: policycoreutilsAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: dwalsh, mmalik, ohudlick, pgraner, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 09:47:24 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 Winston Li 2008-08-21 03:21:49 UTC
Description of problem:
chcat won't translate the categories when user is in multiple categories.

Version-Release number of selected component (if applicable):

# uname -r
2.6.18-92.el5

# sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   enforcing
Mode from config file:          enforcing
Policy version:                 21
Policy from config file:        targeted

# rpm -qf /usr/bin/chcat
policycoreutils-1.33.12-14.el5

How reproducible:
Reproducible.

Steps to Reproduce:
1.vi /etc/selinux/targeted/setrans.conf
add two categories as below:
s0:c0=Marketing
s0:c1=Finance

restarting mcstrans service:
/etc/init.d/mcstrans restart

2. Assign one category to testuser:
#chcat -l -- +Marketing testuser
#chcat -L -l testuser
testuser: Marketing


3. Assign another category to testuser and review it:
#chcat -l -- +Finance testuser
#chcat -L -l testuser
testuser: s0:c0,c1

Actual results:
#chcat -L -l testuser
testuser: s0:c0,c1

Expected results:
# chcat -L -l testuser
testuser: Marketing,Finance

Additional info:
It works fine in RHEL5 GA with policycoreutils-1.33.12-3.el5

Comment 1 Daniel Walsh 2008-09-17 20:03:20 UTC
Updated to rawhide chcat

Fixed in policycoreutils-1.33.12-14.1.el5

Comment 2 RHEL Program Management 2008-09-17 20:25:04 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 26 errata-xmlrpc 2009-09-02 09:47:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1292.html