selinux: implement the kernfs_init_security hook
authorOndrej Mosnacek <omosnace@redhat.com>
Fri, 22 Feb 2019 14:57:17 +0000 (15:57 +0100)
committerPaul Moore <paul@paul-moore.com>
Thu, 21 Mar 2019 02:07:45 +0000 (22:07 -0400)
commitec882da5cda911e799b8a5ede94d099fdc0c656b
treeb7a09e2138b42635095aa4c43022fd53d526ab77
parentb230d5aba2d1a7b0636408889a75bf9eae6b8bc7
selinux: implement the kernfs_init_security hook

The hook applies the same logic as selinux_determine_inode_label(), with
the exception of the super_block handling, which will be enforced on the
actual inodes later by other hooks.

Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
[PM: minor merge fixes]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c