From 63f1a98c370a15ae1c90767a5d4e272572a85d58 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Sun, 10 Jul 2022 14:30:56 +0100 Subject: [PATCH] feat(profiles): add cron-ubuntu-fan. --- apparmor.d/groups/ubuntu/cron-ubuntu-fan | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 apparmor.d/groups/ubuntu/cron-ubuntu-fan diff --git a/apparmor.d/groups/ubuntu/cron-ubuntu-fan b/apparmor.d/groups/ubuntu/cron-ubuntu-fan new file mode 100644 index 00000000..ee5e23ac --- /dev/null +++ b/apparmor.d/groups/ubuntu/cron-ubuntu-fan @@ -0,0 +1,33 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2022 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only + +abi , + +include + +@{exec_path} = /etc/network/if-up.d/ubuntu-fan +profile cron-ubuntu-fan @{exec_path} { + include + + network netlink raw, + + @{exec_path} mr, + + /{usr/,}bin/{,da,ba}sh rix, + /{usr/,}{s,}bin/fanctl rix, + /{usr/,}bin/flock rix, + /{usr/,}bin/grep rix, + /{usr/,}bin/id rix, + /{usr/,}bin/ip rix, + /{usr/,}bin/mkdir rix, + /{usr/,}bin/sed rix, + /{usr/,}bin/touch rix, + + /etc/network/fan r, + + @{run}/ubuntu-fan/ rw, + @{run}/ubuntu-fan/.lock rwk, + + include if exists +} \ No newline at end of file