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
This is already fixed in policycoreutils-1.33.12-14.6.el5