From 9a48515089dd0cc69b18ce9e47d3386f8a3ab1f6 Mon Sep 17 00:00:00 2001 From: nobodysu Date: Mon, 23 May 2022 16:55:58 +0000 Subject: [PATCH] Add pstree (#38) --- apparmor.d/profiles-m-r/pstree | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 apparmor.d/profiles-m-r/pstree diff --git a/apparmor.d/profiles-m-r/pstree b/apparmor.d/profiles-m-r/pstree new file mode 100644 index 00000000..1913b203 --- /dev/null +++ b/apparmor.d/profiles-m-r/pstree @@ -0,0 +1,29 @@ +# apparmor.d - Full set of apparmor profiles +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{,usr/}bin/pstree +profile pstree @{exec_path} flags=(attach_disconnected) { + include + include + include + + capability sys_ptrace, + + ptrace (read), + + @{exec_path} mr, + + @{PROC} r, + @{PROC}/uptime r, + @{PROC}/@{pids}/stat r, + @{PROC}/@{pids}/task/ r, + @{PROC}/@{pids}/attr/current r, + owner @{PROC}/@{pids}/cmdline r, + owner @{PROC}/@{pids}/task/@{tid}/stat r, + + include if exists +}