apparmor.d/apparmor.d/groups/ubuntu/update-notifier
2023-12-16 21:30:47 +00:00

87 lines
3 KiB
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} = @{bin}/update-notifier
profile update-notifier @{exec_path} {
include <abstractions/base>
include <abstractions/apt-common>
include <abstractions/audio>
include <abstractions/bus-accessibility>
include <abstractions/bus-session>
include <abstractions/bus-system>
include <abstractions/bus/org.a11y>
include <abstractions/dconf-write>
include <abstractions/gnome-strict>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/python>
dbus receive bus=session path=/org/ayatana/NotificationItem{,/**}
interface={com.canonical.dbusmenu,org.freedesktop.DBus.Properties}
peer=(name=:*, label=gnome-shell),
dbus send bus=session path=/StatusNotifierWatcher
interface=org.kde.StatusNotifierWatcher
member=RegisterStatusNotifierItem
peer=(name=:*, label=gnome-shell),
dbus send bus=system path=/org/debian/apt
interface=org.debian.apt
member=GetActiveTransactions
peer=(name=:*, label=apt),
dbus send bus=system path=/org/debian/apt
interface=org.freedesktop.DBus.Properties
member=GetAll
peer=(name=:*, label=apt),
@{exec_path} mr,
@{bin}/{,ba,da}sh rix,
@{bin}/ionice rix,
@{bin}/ischroot rix,
@{bin}/nice rix,
@{bin}/dpkg rPx -> child-dpkg,
@{bin}/lsb_release rPx -> lsb_release,
@{bin}/pkexec rPx, # TODO: rCx or rix to run /usr/lib/update-notifier/package-system-locked
@{bin}/snap rPUx,
@{bin}/software-properties-gtk rPx,
@{bin}/systemctl rPx -> child-systemctl,
@{bin}/update-manager rPx,
@{lib}/ubuntu-release-upgrader/check-new-release-gtk rPx,
@{lib}/update-notifier/apt_check.py rix,
@{lib}/update-notifier/list-oem-metapackages rPx,
@{lib}/update-notifier/livepatch-notification rPx,
@{lib}/update-notifier/package-system-locked rPx,
/usr/share/apport/apport-checkreports rPx,
/usr/share/apport/apport-gtk rPx,
@{lib}/python3.[0-9]*/dist-packages/{apt,gi}/**/__pycache__/{,**} rw,
/usr/share/dpkg/cputable r,
/usr/share/dpkg/tupletable r,
/usr/share/update-notifier/{,**} r,
/usr/share/X11/{,**} r,
/etc/machine-id r,
/var/lib/snapd/desktop/applications/{,**} r,
/var/lib/update-notifier/user.d/ r,
owner @{user_config_dirs}/update-notifier/ w,
owner @{user_share_dirs}/applications/ r,
owner @{run}/user/@{uid}/update-notifier.pid rwk,
owner /tmp/#@{int} rw,
@{PROC}/@{pids}/mountinfo r,
owner @{PROC}/@{pid}/fd/ r,
include if exists <local/update-notifier>
}