apparmor.d/apparmor.d/groups/systemd/loginctl

35 lines
1,015 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2023 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{bin}/loginctl
profile loginctl @{exec_path} {
include <abstractions/base>
include <abstractions/dbus-strict>
include <abstractions/systemd-common>
capability net_admin,
capability sys_resource,
dbus (send) bus=system path=/org/freedesktop/login[0-9]*
interface=org.freedesktop.login[0-9]*.Manager
member={ListSessions,GetSession}
peer=(name=org.freedesktop.login[0-9]*, label=systemd-logind),
dbus (send) bus=system path=/org/freedesktop/login[0-9]*/session/**
interface=org.freedesktop.DBus.Properties
member={Get,GetAll}
peer=(name=org.freedesktop.login[0-9]*, label=systemd-logind),
@{exec_path} mr,
@{bin}/less rPx -> child-pager,
@{bin}/more rPx -> child-pager,
@{bin}/pager rPx -> child-pager,
include if exists <local/loginctl>
}