From a49e221949e50a158962353c81e77a81638293e0 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Wed, 21 Apr 2021 21:56:29 +0100 Subject: [PATCH] Add reflector. --- apparmor.d/groups/pacman/reflector | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 apparmor.d/groups/pacman/reflector diff --git a/apparmor.d/groups/pacman/reflector b/apparmor.d/groups/pacman/reflector new file mode 100644 index 00000000..f3a4fc68 --- /dev/null +++ b/apparmor.d/groups/pacman/reflector @@ -0,0 +1,37 @@ +# 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/reflector +profile reflector @{exec_path} flags=(attach_disconnected) { + include + include + include + include + include + + network inet dgram, + network inet6 dgram, + network inet stream, + network inet6 stream, + network netlink raw, + + @{exec_path} mr, + /{usr/,}bin/ r, + + /etc/xdg/reflector/reflector.conf r, + /etc/pacman.d/mirrorlist rw, + + owner @{user_cache_dirs}/mirrorstatus.json rw, + /var/cache/reflector/mirrorstatus.json rw, + + @{PROC}/1/environ r, + @{PROC}/cmdline r, + @{PROC}/sys/kernel/osrelease r, + + include if exists +}