Linux에서 AppArmor 활성화

Linux에서 AppArmor 활성화

커널(linux-libre-xtreme)을 컴파일했습니다.이 구성, 대부분의 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-lts-apparmor, 해당 구성 참조).여기)

내가 뭘 잘못했나요? cat /sys/module/apparmor/parameters/enabledlinux-libre-xtreme 커널을 사용 하면 그런 결과가 나오지만 Nlinux-libre-lts-apparmor를 사용하면 Y부트로더의 커널 인수가 아니라는 메시지가 표시됩니다.

답변1

CONFIG_DEFAULT_SECURITY_DAC=y비활성화하면 해결됩니다. 하나만 활성화할 수 있는 것 같습니다.CONFIG_DEFAULT_SECURITY_*

편집하다:또한 부팅 시 AppArmor가 기본적으로 활성화되도록 하려면 SECURITY_APPARMOR_BOOTPARAM_VALUE를 다음과 같이 "1"로 설정해야 한다는 사실도 발견했습니다.CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1

관련 정보