From 7dbb86c13d43d94c6be468bc4721072d9226b951 Mon Sep 17 00:00:00 2001 From: liuh-80 Date: Thu, 21 Sep 2023 01:20:42 +0000 Subject: [PATCH] Improve code by PR comments, and fix cherry-pick to 202205 issue --- build_debian.sh | 4 ++++ files/apparmor/usr.bin.tcpdump | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 files/apparmor/usr.bin.tcpdump diff --git a/build_debian.sh b/build_debian.sh index 34fcd84e0d28..a8c44b32cbaf 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -407,6 +407,10 @@ LogsDirectory=audit LogsDirectoryMode=0750 EOF +# latest tcpdump control resource access with AppArmor. +# override tcpdump profile to allow tcpdump access TACACS config file. +sudo cp files/apparmor/usr.bin.tcpdump $FILESYSTEM_ROOT/etc/apparmor.d/local/usr.bin.tcpdump + if [[ $CONFIGURED_ARCH == amd64 ]]; then ## Pre-install the fundamental packages for amd64 (x86) sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \ diff --git a/files/apparmor/usr.bin.tcpdump b/files/apparmor/usr.bin.tcpdump new file mode 100644 index 000000000000..353b360bb7b1 --- /dev/null +++ b/files/apparmor/usr.bin.tcpdump @@ -0,0 +1,2 @@ +# tcpdump will call getpwnam get current user information, the NSS plugin nss_tacplus hook this API and need access tacacs config file. +/etc/tacplus_nss.conf r, \ No newline at end of file