diff --git a/apparmor.d/profiles-m-r/pidof b/apparmor.d/profiles-m-r/pidof new file mode 100644 index 00000000..b0e25d97 --- /dev/null +++ b/apparmor.d/profiles-m-r/pidof @@ -0,0 +1,27 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2023 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/pidof +profile pidof @{exec_path} { + include + + capability sys_ptrace, + + ptrace (read), + + @{exec_path} mr, + + @{PROC}/ r, + @{PROC}/@{pids}/cmdline r, + @{PROC}/@{pids}/stat r, + @{PROC}/sys/kernel/osrelease r, + + owner /dev/tty[0-9]* rw, + + include if exists +} \ No newline at end of file