From 8315c74897f8cc28c08f27db17139e5421adba30 Mon Sep 17 00:00:00 2001 From: Alexandre Pujol Date: Fri, 2 Apr 2021 10:31:10 +0100 Subject: [PATCH] Add less (from krathalan). --- apparmor.d/profiles-a-l/less | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 apparmor.d/profiles-a-l/less diff --git a/apparmor.d/profiles-a-l/less b/apparmor.d/profiles-a-l/less new file mode 100644 index 00000000..6ccdcef0 --- /dev/null +++ b/apparmor.d/profiles-a-l/less @@ -0,0 +1,31 @@ +# apparmor.d - Full set of apparmor profiles +# Copyright (C) 2019 krathalan https://git.sr.ht/~krathalan/apparmor-profiles/ +# 2021 Alexandre Pujol +# SPDX-License-Identifier: GPL-3.0-only + +# Version of less profiled: 563 + +abi , +include + +@{exec_path} = /{usr/,}bin/less +profile less @{exec_path} { + include + include + + # less can be used to view protected files + capability dac_read_search, + capability dac_override, + + @{exec_path} mr, + + /{,**} r, + + # Source highlighting + /usr/bin/{bash,dash} mrix, + /usr/bin/source-highlight mrix, + /usr/bin/src-hilite-lesspipe.sh mrix, + + # Silence unnecessary permissions + deny /{,**} w, +}