apparmor.d/apparmor.d/profiles-m-r/needrestart-apt-pinvoke
2023-08-22 23:23:47 +01:00

30 lines
No EOL
797 B
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = @{lib}/needrestart/apt-pinvoke
profile needrestart-apt-pinvoke @{exec_path} {
include <abstractions/base>
include <abstractions/consoles>
include <abstractions/dbus-strict>
dbus send bus=system path=/org/freedesktop/login1
interface=org.freedesktop.DBus.Properties
member=Get
peer=(name=org.freedesktop.login1, label=systemd-logind),
@{exec_path} mr,
@{bin}/{,ba,da}sh rix,
@{bin}/dbus-send rix,
@{bin}/needrestart rPx,
@{bin}/rm rix,
@{run}/needrestart/{,**} rw,
include if exists <local/needrestart-apt-pinvoke>
}