kernel-ark/security/selinux
KaiGai Kohei 8a6f83afd0 Permissive domain in userspace object manager
This patch enables applications to handle permissive domain correctly.

Since the v2.6.26 kernel, SELinux has supported an idea of permissive
domain which allows certain processes to work as if permissive mode,
even if the global setting is enforcing mode.
However, we don't have an application program interface to inform
what domains are permissive one, and what domains are not.
It means applications focuses on SELinux (XACE/SELinux, SE-PostgreSQL
and so on) cannot handle permissive domain correctly.

This patch add the sixth field (flags) on the reply of the /selinux/access
interface which is used to make an access control decision from userspace.
If the first bit of the flags field is positive, it means the required
access control decision is on permissive domain, so application should
allow any required actions, as the kernel doing.

This patch also has a side benefit. The av_decision.flags is set at
context_struct_compute_av(). It enables to check required permissions
without read_lock(&policy_rwlock).

Signed-off-by: KaiGai Kohei <kaigai@ak.jp.nec.com>
Acked-by:  Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: Eric Paris <eparis@redhat.com>
--
 security/selinux/avc.c              |    2 +-
 security/selinux/include/security.h |    4 +++-
 security/selinux/selinuxfs.c        |    4 ++--
 security/selinux/ss/services.c      |   30 +++++-------------------------
 4 files changed, 11 insertions(+), 29 deletions(-)
Signed-off-by: James Morris <jmorris@namei.org>
2009-04-02 09:23:45 +11:00
..
include Permissive domain in userspace object manager 2009-04-02 09:23:45 +11:00
ss Permissive domain in userspace object manager 2009-04-02 09:23:45 +11:00
avc.c Permissive domain in userspace object manager 2009-04-02 09:23:45 +11:00
exports.c CRED: Wrap current->cred and a few other accessors 2008-11-14 10:39:18 +11:00
hooks.c selinux: Remove the "compat_net" compatibility code 2009-03-28 15:01:37 +11:00
Kconfig selinux: Deprecate and schedule the removal of the the compat_net functionality 2008-12-31 12:54:11 -05:00
Makefile
netif.c
netlabel.c netlabel: Label incoming TCP connections correctly in SELinux 2009-03-28 15:01:36 +11:00
netlink.c
netnode.c
netport.c
nlmsgtab.c SELinux: new permission between tty audit and audit socket 2009-03-06 08:50:21 +11:00
selinuxfs.c Permissive domain in userspace object manager 2009-04-02 09:23:45 +11:00
xfrm.c CRED: Wrap current->cred and a few other accessors 2008-11-14 10:39:18 +11:00