apparmor.d/apparmor.d/groups/ubuntu/update-notifier
2023-07-20 21:00:41 +01:00

81 lines
2.9 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/dbus-accessibility-strict>
include <abstractions/dbus-session-strict>
include <abstractions/dconf-write>
include <abstractions/fonts>
include <abstractions/freedesktop.org>
include <abstractions/gtk>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/python>
include <abstractions/wayland>
dbus receive bus=session path=/org/ayatana/NotificationItem{,/**}
interface={com.canonical.dbusmenu,org.freedesktop.DBus.Properties}
peer=(name=:*, label=gnome-shell),
dbus (send) bus=accessibility path=/org/a11y/atspi/registry{,/**}
interface=org.a11y.atspi.DeviceEventController
peer=(name=org.a11y.atspi.Registry, label=at-spi2-registryd),
@{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 rPx,
@{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/snapd/desktop/icons/ 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}/at-spi/bus rw,
owner @{run}/user/@{uid}/bus rw,
owner @{run}/user/@{uid}/update-notifier.pid rwk,
owner /tmp/#[0-9]* rw,
owner @{PROC}/@{pid}/fd/ r,
@{PROC}/@{pids}/mountinfo r,
include if exists <local/update-notifier>
}