From: Stephen Smalley <sds@tycho.nsa.gov>
To: dE <de.techno@gmail.com>, selinux@tycho.nsa.gov
Subject: Re: The purpose of SID.
Date: Tue, 08 Apr 2014 08:16:19 -0400 [thread overview]
Message-ID: <5343E893.8050705@tycho.nsa.gov> (raw)
In-Reply-To: <5343B5EA.3010909@gmail.com>
On 04/08/2014 04:40 AM, dE wrote:
> As I read in the SELinux docs, each subject and object is assigned a
> unique SID; when using the selinux libraries, or using the SELinux
> kernel API the programs are expected to request the security server
> decisions for a particular subject and object by passing the subject and
> object's SID to the security server.
>
> Question is -- is SID created when an SELinux enabled kernel boots or
> just when a SELinux enabled program requests an SID for a subject/object
> from the kernel?
>
> Also can I see a process's and file's SID via some program?
Except for a small set of predefined initial SIDs (used for
bootstrapping before policy is loaded), SIDs are dynamically allocated
on demand for security contexts when they are first used.
The kernel does not expose its SIDs to userspace; all of the userspace
APIs provided by the kernel pass security contexts instead; see:
http://www.nsa.gov/research/_files/selinux/papers/module/x362.shtml
However, libselinux does provide a userspace SID abstraction for users
of the userspace AVC implementation (man avc_context_to_sid). Those
SIDs are likewise dynamically allocated on demand for security contexts
when they are first used, but are merely local references to the
security context; that mapping is per-process and has no global meaning.
next prev parent reply other threads:[~2014-04-08 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 8:40 The purpose of SID dE
2014-04-08 12:16 ` Stephen Smalley [this message]
2014-04-08 12:17 ` Stephen Smalley
2014-04-09 7:26 ` dE
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=5343E893.8050705@tycho.nsa.gov \
--to=sds@tycho.nsa.gov \
--cc=de.techno@gmail.com \
--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.