From: Joshua Brindle <jbrindle@tresys.com>
To: I_am alone <stupid_kid_me@yahoo.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: SID/Context Mapping
Date: Wed, 18 Oct 2006 07:12:55 -0400 [thread overview]
Message-ID: <45360C37.6020308@tresys.com> (raw)
In-Reply-To: <20061018011433.21838.qmail@web58114.mail.re3.yahoo.com>
I_am alone wrote:
>
>
> Hi All,
>
> I am new to the SELinux Enviorment. Just learning by doing a
> Code Review.
>
> 1. What i cant figure out is Where does the SID/Security Context
> Mapping Occur in the SELinux Source Code . I understand its in the
> security server (According to Flask Architecture doc)......Hows does
> it happen. (Examlpes of code part would help).... Is it dynamic
> everytime the System Restarts ? Or is it Assigned when policy is
> compiled .. (Compiled Object File contains SID-Context Mapped
> Data.)........(Bec i put sme print statements to see how does the SID
> Transition occurs at BPRM Loading ....seems like i get the same SID 4
> same processes even i reboot the system .... )
>
>
Several sids are always going to be the same because the policy defines
them in a specific order, they are called initial sids, you can look for
them in the policy source. After the initial sids all sids are generated
at runtime. In the kernel security/selinux/ss/sidtab.c is where the sids
are initialized and managed. You'll note that the security server calls
sidtab_context_to_sid, this searches for the sid associated with the
context, if it is not present it will insert it into the sidtab.
You can also look at the security server code in libsepol which is
largely the same as the kernel security server (in terms of
functionality) but is easier to play with and learn from.
--
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.
prev parent reply other threads:[~2006-10-18 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-18 1:14 SID/Context Mapping I_am alone
2006-10-18 11:12 ` Joshua Brindle [this message]
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=45360C37.6020308@tresys.com \
--to=jbrindle@tresys.com \
--cc=SELinux@tycho.nsa.gov \
--cc=stupid_kid_me@yahoo.com \
/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.