From cf8ae8b147235f08b5ea10492801fe50d64dcad7 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Mon, 24 Jun 2024 17:40:34 +0100 Subject: [PATCH] feat(profile): add snapshot. --- apparmor.d/profiles-s-z/snapshot | 28 ++++++++++++++++++++++++++++ dists/flags/main.flags | 1 + 2 files changed, 29 insertions(+) create mode 100644 apparmor.d/profiles-s-z/snapshot diff --git a/apparmor.d/profiles-s-z/snapshot b/apparmor.d/profiles-s-z/snapshot new file mode 100644 index 00000000..5afff36e --- /dev/null +++ b/apparmor.d/profiles-s-z/snapshot @@ -0,0 +1,28 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2024 Alexandre Pujol +# SPDX-License-Identifier: GPL-2.0-only +# vim:syntax=apparmor + +abi , + +include + +@{exec_path} = @{bin}/snapshot +profile snapshot @{exec_path} { + include + include + include + include + include + + @{exec_path} mr, + + owner @{user_pictures_dirs}/Camera/{,**} rw, + owner @{user_videos_dirs}/Camera/{,**} rw, + + owner @{PROC}/@{pid}/task/@{tid}/comm rw, + + include if exists +} + +# vim:syntax=apparmor diff --git a/dists/flags/main.flags b/dists/flags/main.flags index 1bcf1e7d..f92e225f 100644 --- a/dists/flags/main.flags +++ b/dists/flags/main.flags @@ -294,6 +294,7 @@ snap-update-ns complain snapd complain snapd-apparmor complain snapd-core-fixup complain +snapshot complain ssservice complain startplasma complain startx attach_disconnected,complain