apparmor.d/apparmor.d/profiles-g-l/less
2021-09-26 17:28:26 +01:00

33 lines
774 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2019 krathalan https://git.sr.ht/~krathalan/apparmor-profiles/
# 2021 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-3.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/less
profile less @{exec_path} {
include <abstractions/base>
include <abstractions/bash>
capability dac_read_search,
capability dac_override,
@{exec_path} mr,
/{usr/,}bin/{,ba,da}sh rix,
/{usr/,}bin/source-highlight rix,
/{usr/,}bin/src-hilite-lesspipe.sh rix,
@{system_share_dirs}/terminfo/{,**} r,
@{user_cache_dirs}/lesshs* rw,
owner /root/.lesshs* rw,
/{,**} r,
deny /{,**} w,
include if exists <local/less>
}