core: mount and initialize Smack

SMACK is the Simple Mandatory Access Control Kernel, a minimal
approach to Access Control implemented as a kernel LSM.

The kernel exposes the smackfs filesystem API through which access
rules can be loaded. At boot time, we want to load the access rules
as early as possible to ensure all early boot steps are checked by Smack.

This patch mounts smackfs at the new location at /sys/fs/smackfs for
kernels 3.8 and above. The /smack mountpoint is not supported.
After mounting smackfs, rules are loaded from the usual location.

For more information about Smack see:
  http://www.kernel.org/doc/Documentation/security/Smack.txt
This commit is contained in:
Nathaniel Chen
2013-03-07 20:53:14 +01:00
committed by Lennart Poettering
parent 8f838d8aab
commit ffbd2c4d45
6 changed files with 134 additions and 1 deletions
+2
View File
@@ -44,6 +44,8 @@ REQUIREMENTS:
CONFIG_NET
CONFIG_SYSFS
Linux kernel >= 3.8 for Smack support
Udev will fail to work with the legacy layout:
CONFIG_SYSFS_DEPRECATED=n