Debian 11 - apparmor 删除后会阻止应用程序

Debian 11 - apparmor 删除后会阻止应用程序

我安装了全新的 Debian 11,并安装了 Tor 来摆弄隐藏服务。由于它只是一台测试机器,我决定卸载 apparmor,因为我不需要该机器上的任何安全性。

因此,在一个systemctl stop apparmor和一个之后systemctl disable apparmor,我还使用 完全删除了应用程序装甲apt remove --assume-yes --purge apparmor。然后我重新启动系统。

重新启动后,我尝试再次启动我的隐藏服务,但在 /var/log/syslog 中我仍然看到 apparmore 以某种方式阻止了应用程序?

May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Read configuration file "/usr/share/tor/tor-service-defaults-torrc".
May 15 10:14:35 debian tor[1394]: May 15 10:14:35.791 [notice] Read configuration file "/etc/tor/torrc".
May 15 10:14:35 debian tor[1394]: Configuration was valid
May 15 10:14:35 debian kernel: [  872.927211] audit: type=1400 audit(1652624075.840:22): apparmor="DENIED" operation="change_onexec" info="label not found" error=-2 profile="unconfined" name="system_tor" pid=1395 comm="(tor)"

有谁知道这是从哪里来的?如何彻底摆脱apparmor?

答案1

这就是我所做的:

apt-get -y -f purge apparmor
apt-mark -y hold apparmor
rm -rf /var/cache/apparmor
rm -rf /etc/apparmor.d
cat > /etc/apt/apt.conf.d/01autoremove << END
APT
{
  NeverAutoRemove
  {
        "^firmware-linux.*";
        "^linux-firmware$";
        "^linux-image-[a-z0-9]*$";
        "^linux-image-[a-z0-9]*-[a-z0-9]*$";
  };

  VersionedKernelPackages
  {
        # kernels
        "linux-.*";
        "kfreebsd-.*";
        "gnumach-.*";
        # (out-of-tree) modules
        ".*-modules";
        ".*-kernel";
  };

  Never-MarkAuto-Sections
  {
        "metapackages";
        "contrib/metapackages";
        "non-free/metapackages";
        "restricted/metapackages";
        "universe/metapackages";
        "multiverse/metapackages";
        "apparmor*";
  };

  Move-Autobit-Sections
  {
        "oldlibs";
        "contrib/oldlibs";
        "non-free/oldlibs";
        "restricted/oldlibs";
        "universe/oldlibs";
        "multiverse/oldlibs";
  };
};
END
apt-get -y update
apt-get -y autoremove
apt-get -y autoclean

希望能帮助到你!

相关内容