linux/security/selinux/include
Eric Paris 811f379927 SELinux: allow fstype unknown to policy to use xattrs if present
Currently if a FS is mounted for which SELinux policy does not define an
fs_use_* that FS will either be genfs labeled or not labeled at all.
This decision is based on the existence of a genfscon rule in policy and
is irrespective of the capabilities of the filesystem itself.  This
patch allows the kernel to check if the filesystem supports security
xattrs and if so will use those if there is no fs_use_* rule in policy.
An fstype with a no fs_use_* rule but with a genfs rule will use xattrs
if available and will follow the genfs rule.

This can be particularly interesting for things like ecryptfs which
actually overlays a real underlying FS.  If we define excryptfs in
policy to use xattrs we will likely get this wrong at times, so with
this path we just don't need to define it!

Overlay ecryptfs on top of NFS with no xattr support:
SELinux: initialized (dev ecryptfs, type ecryptfs), uses genfs_contexts
Overlay ecryptfs on top of ext4 with xattr support:
SELinux: initialized (dev ecryptfs, type ecryptfs), uses xattr

It is also useful as the kernel adds new FS we don't need to add them in
policy if they support xattrs and that is how we want to handle them.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
2008-07-14 15:02:04 +10: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: create new open permission 2008-04-18 20:26:06 +10:00
av_permissions.h SELinux: create new open permission 2008-04-18 20:26:06 +10:00
avc_ss.h SELinux: avc_ss.h whitespace, syntax, and other cleanups 2008-04-28 09:28:58 +10:00
avc.h SELinux: keep the code clean formating and syntax 2008-07-14 15:01:36 +10:00
class_to_string.h selinux: support 64-bit capabilities 2008-02-11 20:30:02 +11:00
common_perm_to_string.h
conditional.h
flask.h selinux: support 64-bit capabilities 2008-02-11 20:30:02 +11:00
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: netlabel.h whitespace, syntax, and other cleanups 2008-04-28 09:28:59 +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: remove inherit field from inode_security_struct 2008-07-14 15:01:38 +10:00
security.h SELinux: allow fstype unknown to policy to use xattrs if present 2008-07-14 15:02:04 +10:00
xfrm.h LSM: Make the Labeled IPsec hooks more stack friendly 2008-04-12 19:07:52 -07:00