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>
Mon, 13 Apr 2015 16:43:07 +0000 (00:43 +0800)
commit203898ddd0de4dc61bd4e5cd705458314ff757a6
treef56c27762b04dd8bc4e112a742332d65e11232ba
parentefec6408d3e7b437204c68fbb39cb431e2872d00
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