From: Stephen Smalley <sds@tycho.nsa.gov>
To: SELinux <selinux@tycho.nsa.gov>
Subject: Fwd: [PATCH] proc.5: Fix SELinux /proc/pid/attr/current example.
Date: Mon, 23 Feb 2015 11:02:13 -0500 [thread overview]
Message-ID: <54EB4F05.8010601@tycho.nsa.gov> (raw)
In-Reply-To: <1424705805-2782-1-git-send-email-sds@tycho.nsa.gov>
FYI.
-------- Forwarded Message --------
Subject: [PATCH] proc.5: Fix SELinux /proc/pid/attr/current example.
Date: Mon, 23 Feb 2015 10:36:45 -0500
From: Stephen Smalley <sds@tycho.nsa.gov>
To: mtk.manpages@gmail.com
CC: linux-man@vger.kernel.org, Stephen Smalley <sds@tycho.nsa.gov>
Since the /proc/pid/attr API was added to the kernel, there have
been a couple of changes to the SELinux handling of /proc/pid/attr/current.
Fix the SELinux /proc/pid/attr/current example text to reflect these
changes and note which kernel versions first included the changes.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
---
man5/proc.5 | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/man5/proc.5 b/man5/proc.5
index d01a7a9..68772f3 100644
--- a/man5/proc.5
+++ b/man5/proc.5
@@ -101,13 +101,27 @@ This directory is present only if the kernel was
configured with
The contents of this file represent the current
security attributes of the process.
-In SELinux, this file is used to get the security context of a process,
-but not to set the security context (a write is always denied),
-since SELinux limits process security transitions to
+In SELinux, this file is used to get the security context of a process.
+Prior to Linux 2.6.11, this file could not be used to set the security
+context (a write was always denied), since SELinux limited process security
+transitions to
.BR execve (2)
(see the description of
.IR /proc/[pid]/attr/exec ,
below).
+Since Linux 2.6.11, SELinux lifted this restriction and began supporting
+"set" operations via writes to this node if authorized by policy,
+although use of this operation is only suitable for applications that are
+trusted to maintain any desired separation between the old and new security
+contexts. Prior to Linux 2.6.28, SELinux did not allow threads within a
+multi-threaded process to set their security context via this node
+as it would yield an inconsistency among the security contexts of the
+threads sharing the same memory space. Since Linux 2.6.28, SELinux lifted
+this restriction and began supporting "set" operations for threads within
+a multi-threaded process if the new security context is bounded by the old
+security context, where the bounded relation is defined in policy and
+guarantees that the new security context has a subset of the permissions
+of the old security context.
Other security modules may choose to support "set" operations via
writes to this node.
.TP
--
1.9.3
next prev parent reply other threads:[~2015-02-23 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 15:36 [PATCH] proc.5: Fix SELinux /proc/pid/attr/current example Stephen Smalley
2015-02-23 16:02 ` Stephen Smalley [this message]
[not found] ` <1424705805-2782-1-git-send-email-sds-+05T5uksL2qpZYMLLGbcSA@public.gmane.org>
2015-02-26 7:57 ` Michael Kerrisk (man-pages)
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=54EB4F05.8010601@tycho.nsa.gov \
--to=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.