我用这种配置编译了一个内核(Linux),它启用了大多数LSM: YAMA、SMACK、AppArmor、TOMOYO和SELinux。但是,当我用OpenRC启动设备服务时,我得到:
# rc-service apparmor start
* Stopping AppArmor ...
* Unloading AppArmor profiles
* Root privileges not available [ !! ]
* Starting AppArmor ...
* Loading AppArmor profiles ...
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.
* /etc/apparmor.d/usr.bin.apache2 failed to load
Cache read/write disabled: interface file missing. (Kernel needs AppArmor 2.4 compatibility patch.)
Warning: unable to find a suitable fs in /proc/mounts, is it mounted?
Use --subdomainfs to override.其他配置文件也会抱怨,但是我也编译过的其他内核(linux-libre,请参阅其配置这里)也不会出现这种情况。
我做错了什么?如果我用linux-libre内核做cat /sys/module/apparmor/parameters/enabled,我就会得到N,但是使用,它写的是Y,所以我知道它不是带有引导加载器中的内核参数的东西。
发布于 2017-11-02 19:59:38
通过禁用CONFIG_DEFAULT_SECURITY_DAC=y来解决,似乎只需要启用一个CONFIG_DEFAULT_SECURITY_*
编辑:我还发现,要使AppArmor在引导时默认启用,必须将SECURITY_APPARMOR_BOOTPARAM_VALUE设置为"1",如下所示:CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
https://unix.stackexchange.com/questions/401927
复制相似问题