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無効にすると解決されます。 1つだけアクティブにできるようです。CONFIG_DEFAULT_SECURITY_*

編集する:また、起動時にAppArmorをデフォルトで有効にするには、SECURITY_APPARMOR_BOOTPARAM_VALUEを次のように「1」に設定する必要があることも発見しました。CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1

おすすめ記事