feat(profiles): new children group.

This group is reserved for profile  without an attachment path because
it is ended to be used only via "Px -> <profile-name>".
This commit is contained in:
Alexandre Pujol 2022-09-26 14:59:18 +01:00
parent 42f305b244
commit 205c2d7184
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC

View file

@ -0,0 +1,38 @@
# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
# Note: This profile does not specify an attachment path because it is
# intended to be used only via "Px -> child-pager" exec transitions from
# other profiles. We want to confine the pager(1) utility when it
# is invoked from other confined applications, but not when it is used
# in regular (unconfined) shell scripts or run directly by the user.
abi <abi/3.0>,
include <tunables/global>
# Do not attach to /{usr/,}bin/pager by default
profile child-pager {
include <abstractions/base>
include <abstractions/consoles>
capability dac_override,
capability dac_read_search,
signal (receive) set=(stop, cont, term, kill),
/{usr/,}bin/ r,
/{usr/,}bin/pager mr,
/{usr/,}bin/less mr,
/{usr/,}bin/more mr,
@{system_share_dirs}/terminfo/{,**} r,
owner @{HOME}/ r,
owner @{HOME}/.lesshs* rw,
owner @{user_cache_dirs}/lesshs* rw,
include if exists <local/child-pager>
}