android_kernel_motorola_sm6225/security/selinux/include
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
..
audit.h SELinux: keep the code clean formating and syntax 2008-07-14 15:01:36 +10:00
av_inherit.h [SELinux]: Add support for DCCP 2006-12-02 21:22:24 -08:00
av_perm_to_string.h SELinux: new permission between tty audit and audit socket 2009-03-06 08:50:21 +11:00
av_permissions.h SELinux: new permission between tty audit and audit socket 2009-03-06 08:50:21 +11:00
avc.h SELinux: add boundary support and thread context assignment 2008-08-29 00:33:33 +10:00
avc_ss.h SELinux: shrink sizeof av_inhert selinux_class_perm and context 2009-01-05 19:19:55 +11:00
class_to_string.h CRED: Add a kernel_service object class to SELinux 2008-11-14 10:39:27 +11:00
common_perm_to_string.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
conditional.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
flask.h CRED: Add a kernel_service object class to SELinux 2008-11-14 10:39:27 +11:00
initial_sid_to_string.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
netif.h SELinux: Convert the netif code to use ifindex values 2008-01-30 08:17:21 +11:00
netlabel.h netlabel: Label incoming TCP connections correctly in SELinux 2009-03-28 15:01:36 +11:00
netnode.h SELinux: Add a network node caching mechanism similar to the sel_netif_*() functions 2008-01-30 08:17:23 +11:00
netport.h SELinux: add netport.[ch] 2008-04-18 20:26:17 +10:00
objsec.h SELinux: Condense super block security structure flags and cleanup necessary code. 2009-01-19 09:46:40 +11:00
security.h Permissive domain in userspace object manager 2009-04-02 09:23:45 +11:00
xfrm.h LSM: Make the Labeled IPsec hooks more stack friendly 2008-04-12 19:07:52 -07:00