首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Linux中启用AppArmor

在Linux中启用AppArmor
EN

Unix & Linux用户
提问于 2017-11-01 21:49:06
回答 1查看 3K关注 0票数 2

我用这种配置编译了一个内核(Linux),它启用了大多数LSM: YAMA、SMACK、AppArmor、TOMOYO和SELinux。但是,当我用OpenRC启动设备服务时,我得到:

代码语言:javascript
复制
# 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,所以我知道它不是带有引导加载器中的内核参数的东西。

EN

回答 1

Unix & Linux用户

回答已采纳

发布于 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

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/401927

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档