diff --git a/apparmor.d/groups/pacman/pacman-conf b/apparmor.d/groups/pacman/pacman-conf new file mode 100644 index 00000000..8292d42e --- /dev/null +++ b/apparmor.d/groups/pacman/pacman-conf @@ -0,0 +1,19 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/pacman-conf +profile pacman-conf @{exec_path} flags=(attach_disconnected) { + include + + @{exec_path} mr, + + /etc/pacman.conf r, + /etc/pacman.d/mirrorlist r, + + include if exists +} diff --git a/apparmor.d/groups/pacman/pacman-key b/apparmor.d/groups/pacman/pacman-key new file mode 100644 index 00000000..569388fd --- /dev/null +++ b/apparmor.d/groups/pacman/pacman-key @@ -0,0 +1,27 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /{usr/,}bin/pacman-key +profile pacman-key @{exec_path} { + include + + @{exec_path} mr, + + /{usr/,}bin/pacman-conf rPx, + /{usr/,}bin/gpg rUx, + /{usr/,}bin/gettext rix, + /{usr/,}bin/basename rix, + /{usr/,}bin/tput rix, + + /usr/share/makepkg/{,**} r, + /usr/share/terminfo/x/xterm-256color r, + + /dev/tty rw, + + include if exists +}