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)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:53:56 +0000 (13:53 -0800)
commit78d36d2111cd4ca722a602846f7db8f54a0b074c
tree940d978157a9a97bf1f0bfca897a191f85ae471d
parent713d685328efca4c4a7c123398c36c11d5dbc245
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