<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>You are correct - my mistake in the original post. I too was unable to reproduce on FC11. Originally observed the problem in RHEL5.3 (selinux-policy-targeted.noarch 2.4.6-203.el5) using targeted policy v21 enforcing.</DIV>
<DIV> </DIV>
<DIV>On RHEL5.3, if I assign >6 non contiguous categories, the mappings are lost.</DIV>
<DIV> </DIV>
<DIV>For example, assigning six noncontiguous categories to a user works just fine:</DIV>
<DIV># semanage login -m -s user_u -r s0-s0:c3,c5,c7,c9,c11,c13 user_1</DIV>
<DIV> </DIV>
<DIV><login as user_1><BR>id -Z<BR>user_u:system_r:unconfined_t:s0-s0:c3;c5,c7,c9,c11,c13<BR></DIV>
<DIV><logout of user_1></DIV>
<DIV> </DIV>
<DIV>Now, assign 7 categories to user_1<BR># semanage login -m -s user_u -r s0-s0:c3,c5,c7,c9,c11,c13,c15 user_1</DIV>
<DIV> </DIV>
<DIV>All 7 category mappings appear to have been applied:<BR># semanage login -l<BR>user_1 user_u s0-s0:c3,c5,c7,c9,c11,c13,c15</DIV>
<DIV><BR>However, as user_1, the 7 category mappings are not linked to the user per the id -Z command. Subsequent attempts to open a file requiring the 7 categories as user_1 fails:<BR></DIV>
<DIV>login as user_1 after the 7 categories have been assigned:<BR>id -Z<BR>user_u:system_r:unconfined_t:s0<BR><BR><BR>--- On <B>Mon, 8/17/09, Stephen Smalley <I><sds@tycho.nsa.gov></I></B> wrote:<BR></DIV>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(16,16,255) 2px solid"><BR>From: Stephen Smalley <sds@tycho.nsa.gov><BR>Subject: Re: MCS Max Number of Category Element Comparisions?<BR>To: "Sam Marshall" <sm3501@yahoo.com><BR>Cc: fedora-selinux-list@redhat.com<BR>Date: Monday, August 17, 2009, 11:29 AM<BR><BR>
<DIV class=plainMail>On Fri, 2009-08-14 at 13:30 -0700, Sam Marshall wrote:<BR>> Hi,<BR>>  <BR>> In FC11, is there a limit to the number of category elements that can<BR>> be compared to make access decisions using MCS? My understanding is<BR>> that up to 1024 categories can be assigned in setrans.conf, however,<BR>> only six or fewer categories can be used for comparision to make<BR>> access decisions.<BR>>  <BR>> For example, when I assign a login user to 7 categories (e.g., s:0,<BR>> c1, c2, c5, c8, c11, c12, c19) and label a file with the exact same<BR>> categories number, permission is denied if the user tries to cat out<BR>> the file(Unix dacl permissions allow the user read access)<BR>>  <BR>> When I assign less than 7 of the exact same categories to the file and<BR>> user, the user can open the file.<BR>>  <BR>> I've tried using ranges (c2.c5, c10.c18, etc ), and found that
 there<BR>> appears to be a four element limitation with the range notation.<BR>>  <BR>> Does this sound right? <BR><BR>No, that sounds like a bug.  Can you provide more specifics, please?<BR>The following worked for me just fine:<BR># useradd foo<BR># passwd foo<BR># semanage login -a -s unconfined_u -r s0-s0:c0,c1,c2,c5,c8,c11,c12,c19 foo<BR># ssh -l foo localhost<BR>$ id -Z<BR>unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c2,c5,c8,c11,c12,c19<BR>$ echo hello > foo<BR>$ chcon -l s0:c0.c2,c5,c8,c11,c12,c19 foo<BR>$ cat foo<BR>hello<BR><BR>-- <BR>Stephen Smalley<BR>National Security Agency<BR><BR></DIV></BLOCKQUOTE></td></tr></table><br>