All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darrel Goeddel <dgoeddel@TrustedCS.com>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: SELinux List <SELinux@tycho.nsa.gov>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	Eric Paris <eparis@redhat.com>
Subject: Re: [PATCH 2/2] userland support for new range_transition statements
Date: Fri, 04 Aug 2006 11:13:10 -0500	[thread overview]
Message-ID: <44D37216.8090902@trustedcs.com> (raw)
In-Reply-To: <6FE441CD9F0C0C479F2D88F959B0158832ACA7@exchange.columbia.tresys.com>

Joshua Brindle wrote:
>>From: Darrel Goeddel [mailto:dgoeddel@trustedcs.com] 
>>
>>Joshua Brindle wrote:
>>
>>>On Fri, 2006-07-28 at 11:13 -0400, Darrel Goeddel wrote:
>>>
>>>
>>>>Index: libsepol/include/sepol/policydb/policydb.h
>>>>===================================================================
>>>>--- libsepol/include/sepol/policydb/policydb.h  (revision 38)
>>>>+++ libsepol/include/sepol/policydb/policydb.h  (working copy)
>>>
>>>
>>>>+typedef struct range_trans_rule {
>>>>+       type_set_t stypes;
>>>>+       type_set_t ttypes;
>>>>+       class_perm_node_t *classes;     /* only class is used */
>>>>+       mls_range_t trange;
>>>>+       struct range_trans_rule *next; } range_trans_rule_t;
>>>>+
>>>
>>>
>>>Are we sure that mls_range_t is semantic enough to store 
>>
>>the rule, even
>>
>>>in a module situation where all the symbols are not present?
>>
>>Hmmm...  I assume that you have MLS requirements in mind when 
>>you say that,
>>especially the '.' notation.  The problem is that if we 
>>specify "s4:c0.c12" as
>>the range, how do we know what will be between c0 and c12 
>>(they are arbitrary
>>names).  Are you suggesting possibly storing the string and 
>>figuring the whole
>>thing out at expand time?
>>
>>We could also make sensitivity and category names 
>>non-arbitrary and force the 
>>naming convention of s# and c# ;)  Translations take care of 
>>human-readable for
>>us now...
>>
> 
> 
> I understand the desire to do this and chances are the sensitivies and
> categories in the policy will never change but I'd also like to stay
> away from hard coded policy logic (I'm sure others feel the same way). I
> think we are going to have to just store the levels as strings in the
> modular format and do sanity checks at expand time (eg., if s12-s0 is in
> a policy it will compile fine but the expander will bail). 
> 
> I'm not really sure where the best place to do this is, one option is to
> use the entire range "s0-s12.c1.c12" as the symbol key in the level
> symtab (very strange and awkward, I don't really like it). Otherwise we
> can add a string to range_trans_rule_t and store it there, also
> non-standard. When doing this we should go ahead and fix user as well
> since users aren't allowed in mls modules now.

I think the string may be easiest.  Otherwise a list of structs like:

struct mls_cat_component {
	int start;
	int stop;
	struct mls_cat_component *next;
} mls_cat_component_t

could be used.  Where something like c0,c4,c10.c20,c25 would be represented as:

   start=1
   stop=1
   next=......start=4
              stop=4
              next=......start=c10
                         stop=c20
                         next=......start=25
                                    stop=25
                                    next=NULL

I can play with working something up based on storing the string rather than
the mls_range_t just to see what it would look like.  I'm not sure going with
a more complicated structure based method really buys us much.  If there are
other structure ideas - I'd sure like to investigate them.

BTW, sorry for the delay, I was unavailable yesterday...

-- 

Darrel

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2006-08-04 16:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 15:13 [PATCH 2/2] userland support for new range_transition statements Darrel Goeddel
2006-07-31 16:40 ` Stephen Smalley
2006-07-31 18:25   ` Darrel Goeddel
2006-07-31 18:29 ` Karl MacMillan
2006-07-31 18:54   ` Darrel Goeddel
2006-07-31 20:52     ` Stephen Smalley
2006-08-01 13:14 ` Joshua Brindle
2006-08-02 16:38   ` Darrel Goeddel
2006-08-02 19:51     ` Karl MacMillan
2006-08-02 21:59       ` Darrel Goeddel
2006-08-03 12:01         ` Joshua Brindle
2006-08-03 15:55     ` Joshua Brindle
2006-08-04 16:13       ` Darrel Goeddel [this message]
2006-08-07 13:18         ` Joshua Brindle
2006-08-08 14:48           ` Darrel Goeddel
2006-08-08 22:45             ` Joshua Brindle
2006-08-09 15:00               ` Darrel Goeddel
2006-08-04 17:10 ` [PATCH 2/2 take 2] " Darrel Goeddel
2006-08-08 22:25   ` Joshua Brindle
2006-08-09 13:09     ` Karl MacMillan
2006-08-09 13:31       ` Joshua Brindle
2006-08-09 15:06         ` Darrel Goeddel
2006-08-09 15:13           ` Karl MacMillan
2006-08-09 15:39             ` [PATCH 2/2 take 2] userland support for new range_transitionstatements Joshua Brindle
2006-08-09 14:29     ` [PATCH 2/2 take 2] userland support for new range_transition statements Darrel Goeddel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44D37216.8090902@trustedcs.com \
    --to=dgoeddel@trustedcs.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=eparis@redhat.com \
    --cc=jbrindle@tresys.com \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.