Bug 494910 - chcat has flaky parsing of category ranges
Summary: chcat has flaky parsing of category ranges
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 494907
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-08 16:58 UTC by Steve Bonneville
Modified: 2009-12-07 20:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 494907
Environment:
Last Closed: 2009-12-07 20:30:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Steve Bonneville 2009-04-08 16:58:22 UTC
Confirmed in Fedora 10 against policycoreutils-2.0.57-17.fc10.

+++ This bug was initially created as a clone of Bug #494907 +++

Description of problem:

The chcat Python script has some serious parsing issues when attempting to update contexts, especially when category ranges are involved.

Case 1:
  # chcat c1 /tmp/file; chcat +c2 /tmp/file; chcat +c3 /tmp/file
  # chcat +c5 /tmp/file
  # ls -Z /tmp/file
  -rw-r--r--  root root user_u:object_r:tmp_t:s0:c1.c3,c5 /tmp/file
(fine so far...)
  # chcat +c4 /tmp/file
  /usr/bin/chcat: invalid literal for int(): 3,c5

Case 2:
  # chcon -l s0:c1,c3,c5,c7,c9 /tmp/file
  # ls -Z /tmp/file
  -rw-r--r--  root root user_u:object_r:tmp_t:s0:c1,c3,c5,c7,c9 /tmp/file
  # chcat +c4 /tmp/file
  # ls -Z /tmp/file
  -rw-r--r--  root root user_u:object_r:tmp_t:s0:c1,c3.c5,c7,c9 /tmp/file
(fine so far...)
  # chcat +c6 /tmp/file
  /usr/bin/chcat: invalid literal for int(): 1,c3

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

  policycoreutils-1.33.12-14.2.el5

Comment 1 Bug Zapper 2009-11-18 11:42:42 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Miroslav Grepl 2009-12-07 20:30:37 UTC
I don't see this issue with the current F10 policycoreutils.

# rpm -q
policycoreutils-2.0.57-22.fc10.i386

So I am closing it as CURRENTRELEASE


Note You need to log in before you can comment on or make changes to this bug.