All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guillaume PETITJEAN <guillaume.petitjean@st.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux <selinux@tycho.nsa.gov>
Subject: Re: link between roles and domains
Date: Mon, 28 Nov 2005 17:45:12 +0100	[thread overview]
Message-ID: <438B3418.2070600@st.com> (raw)
In-Reply-To: <1133192777.348.117.camel@moss-spartans.epoch.ncsc.mil>

Thank you for your answer.

It's basically what I understood and I'm still missing something : in 
the example policy (may be it is not representative of a real system ?) 
there are very few role transitions. And domain transition rules don't 
take into account the role. Then it seems to me that once a process has 
been associated the first time to a domain (the domain of the first 
security context in the default_contexts list) its role isn't used 
anymore since only domain transitions occur. Or do roles only aim to 
define the first domain of a process ?
Where is my mistake ?

Cheers,
Guillaume

Stephen Smalley wrote:

>On Mon, 2005-11-21 at 09:22 +0100, Guillaume PETITJEAN wrote:
>  
>
>>Hello,
>>
>>I'm new to SELinux.
>>
>>I have a question regarding the management of users and roles.
>>
>>I understood that a user is associated with a role (or several roles) 
>>and that each role is allowed to enter a set of domain. I understood  
>>how access control permissions are defined on couple of domains and the 
>>process of domain transitions. But I didn't understand which domain 
>>(among the set of domains allowed for a role) is selected at any time.
>>
>>In other terms let's say you have a process foo belonging to the role 
>>user_r and suppose user_r is allowed for (domain1_t, domain2_t, 
>>domain3_t), how does the policy decides to which domain will belong the 
>>process in practice in order to compute security decisions ?
>>    
>>
>
>The security context of a user process is set up by some "entrypoint"
>program, like login or sshd, by querying libselinux for an ordered list
>of reachable security contexts from the entrypoint process for the user.
>libselinux consults the kernel security server via selinuxfs as well as
>a default_contexts configuration to generate and order this list.  The
>kernel security server computes reachability based on process transition
>permission from the context of the entrypoint process to contexts for
>the user.
>
>Once the security context has been initially set for the user process,
>any subsequent domain transitions are governed by the policy based on
>the usual (file:execute, process:transition, file:entrypoint) triple.
>Any accesses by a process are governed by the domain stored in its
>security context.  A process may only have a single domain in its
>security context at any given time.
>
>  
>

--
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.

  parent reply	other threads:[~2005-11-28 16:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-21  8:22 link between roles and domains Guillaume PETITJEAN
2005-11-28 15:46 ` Stephen Smalley
2005-11-28 16:41   ` Karl MacMillan
2005-11-28 16:45   ` Guillaume PETITJEAN [this message]
2005-11-28 17:34     ` Stephen Smalley

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=438B3418.2070600@st.com \
    --to=guillaume.petitjean@st.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@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.