OSDN Git Service

SELinux: Enable setting security contexts on rootfs inodes.
authorStephen Smalley <sds@tycho.nsa.gov>
Tue, 23 Jul 2013 21:38:41 +0000 (17:38 -0400)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 13 Dec 2014 15:14:19 +0000 (23:14 +0800)
commit81d34e2eebbb4fb6d8bd6f29fdd0fe68a9ae752f
tree09758f7f357b60085e1c745184ba9e113d35fecf
parent3830335ca8627b716b4d4fb9297f435a32edb6ff
SELinux: Enable setting security contexts on rootfs inodes.

rootfs (ramfs) can support setting of security contexts
by userspace due to the vfs fallback behavior of calling
the security module to set the in-core inode state
for security.* attributes when the filesystem does not
provide an xattr handler.  No xattr handler required
as the inodes are pinned in memory and have no backing
store.

This is useful in allowing early userspace to label individual
files within a rootfs while still providing a policy-defined
default via genfs.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
security/selinux/hooks.c