1
linux/security/selinux/include
Stephen Smalley 19439d05b8 selinux: change the handling of unknown classes
If allow_unknown==deny, SELinux treats an undefined kernel security
class as an error condition rather than as a typical permission denial
and thus does not allow permissions on undefined classes even when in
permissive mode.  Change the SELinux logic so that this case is handled
as a typical permission denial, subject to the usual permissive mode and
permissive domain handling.

Also drop the 'requested' argument from security_compute_av() and
helpers as it is a legacy of the original security server interface and
is unused.

Changes:
- Handle permissive domains consistently by moving up the test for a
permissive domain.
- Make security_compute_av_user() consistent with security_compute_av();
the only difference now is that security_compute_av() performs mapping
between the kernel-private class and permission indices and the policy
values.  In the userspace case, this mapping is handled by libselinux.
- Moved avd_init inside the policy lock.

Based in part on a patch by Paul Moore <paul.moore@hp.com>.

Reported-by: Andrew Worsley <amworsley@gmail.com>
Signed-off-by:  Stephen D. Smalley <sds@tycho.nsa.gov>
Reviewed-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: James Morris <jmorris@namei.org>
2010-01-18 09:54:26 +11:00
..
audit.h SELinux: keep the code clean formating and syntax 2008-07-14 15:01:36 +10:00
avc_ss.h selinux: dynamic class/perm discovery 2009-10-07 21:56:42 +11:00
avc.h SELinux: Convert avc_audit to use lsm_audit.h 2009-08-17 08:37:18 +10:00
classmap.h selinux: dynamic class/perm discovery 2009-10-07 21:56:42 +11:00
conditional.h
initial_sid_to_string.h
netif.h SELinux: Convert the netif code to use ifindex values 2008-01-30 08:17:21 +11:00
netlabel.h SELinux: Convert avc_audit to use lsm_audit.h 2009-08-17 08:37:18 +10: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 selinux: change the handling of unknown classes 2010-01-18 09:54:26 +11:00
xfrm.h SELinux: Convert avc_audit to use lsm_audit.h 2009-08-17 08:37:18 +10:00