apparmor 對我的分析沒有反應

apparmor 對我的分析沒有反應

安裝 Debian Buster Apparmor 後,我的生活變得更加困難。但我想熟悉它,所以我嘗試調整設定檔(我非常debianish,所以我希望這是暫時的,下次升級應該可以解決我認為的大多數問題)。

其中一則訊息對我來說很簡單:

Jul 25 13:01:03 zenon kernel: audit: type=1400 audit(1564052463.462:1334): apparmor="DENIED" operation="open" profile="/usr/sbin/postdrop" name="/etc/postfix/dynamicmaps.cf.d/" pid=25297 comm="postdrop" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

我想我應該/etc/postfix/dynamicmaps.cf.d r,添加/etc/apparmor.d/usr.sbin.postdrop

並重新加載個人資料...但仍然被拒絕。所以我想也許我還應該添加 /etc/postfix/dynamicmaps.cf.d/* r,/etc/apparmor.d/usr.sbin.postdrop 重新加載個人資料......

但還是否認...

也許我把它加到錯誤的地方?

整份文件:

# ------------------------------------------------------------------
#
#    Copyright (C) 2002-2005 Novell/SUSE
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
# vim:syntax=apparmor

#include <tunables/global>

/usr/sbin/postdrop {
  #include <abstractions/base>
  #include <abstractions/kerberosclient>
  #include <abstractions/nameservice>
  #include <abstractions/postfix-common>

  # This is needed at least for permissions=paranoid
  capability dac_override,
  capability dac_read_search,

  /etc/postfix r,
  /etc/postfix/main.cf r,
  /etc/postfix/dynamicmaps.cf.d r,
  /etc/postfix/dynamicmaps.cf.d/* r,
  /etc/postfix/postfix-script mixr,
  @{PROC}/net/if_inet6 r,
  /usr/sbin/postdrop rmix,
  /var/spool/postfix r,
  /var/spool/postfix/maildrop r,
  /var/spool/postfix/maildrop/* rwl,
  /var/spool/postfix/pid r,
  /var/spool/postfix/public/pickup w,
}

答案1

設定檔中的現有條目

/etc/postfix/dynamicmaps.cf.d r,
/etc/postfix/dynamicmaps.cf.d/* r,

與目錄不符/etc/postfix/dynamicmaps.cf.d/。只有與尾部斜線相符的規則才會符合目錄。以下任何一項都應該有效:

/etc/postfix/dynamicmaps.cf.d/ r
/etc/postfix/** r

apparmor.d - AppArmor 安全設定檔的語法更多細節。

您可以運行 AppArmor 或單獨的配置文件抱怨模式偵錯

相關內容