104 lines
3.8 KiB
Text
104 lines
3.8 KiB
Text
# apparmor.d - Full set of apparmor profiles
|
|
# Copyright (C) 2022-2024 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/audio-client>
|
|
include <abstractions/bus-accessibility>
|
|
include <abstractions/bus-session>
|
|
include <abstractions/bus-system>
|
|
include <abstractions/bus/org.a11y>
|
|
include <abstractions/bus/org.gtk.vfs.MountTracker>
|
|
include <abstractions/bus/org.kde.StatusNotifierWatcher>
|
|
include <abstractions/common/apt>
|
|
include <abstractions/dconf-write>
|
|
include <abstractions/gnome-strict>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/python>
|
|
|
|
unix (bind) type=stream addr=@@{hex16}/bus/systemd/bus-api-user,
|
|
|
|
#aa:dbus talk bus=system name=org.debian.apt label=apt
|
|
|
|
dbus receive bus=session path=/org/ayatana/NotificationItem/software_update_available
|
|
interface=org.freedesktop.DBus.Properties
|
|
member={Get,GetAll}
|
|
peer=(name=:*, label=gnome-shell),
|
|
|
|
dbus receive bus=session path=/org/ayatana/NotificationItem/livepatch{,/Menu}
|
|
interface=org.freedesktop.DBus.Properties
|
|
member=={Get,GetAll}
|
|
peer=(name=:*, label=gnome-shell),
|
|
dbus receive bus=session path=/org/ayatana/NotificationItem/livepatch/Menu
|
|
interface=com.canonical.dbusmenu
|
|
member={AboutToShow,GetGroupProperties,GetLayout}
|
|
peer=(name=:*, label=gnome-shell),
|
|
|
|
dbus send bus=session path=/org/ayatana/NotificationItem/*
|
|
interface=org.kde.StatusNotifierItem
|
|
peer=(name=org.freedesktop.DBus, label=gnome-shell),
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{sh_path} 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 rCx -> 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.@{int}/dist-packages/{apt,gi}/**/__pycache__/{,**} rw,
|
|
|
|
/usr/share/dpkg/cputable r,
|
|
/usr/share/dpkg/tupletable r,
|
|
/usr/share/update-notifier/{,**} 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,
|
|
|
|
profile systemctl {
|
|
include <abstractions/base>
|
|
include <abstractions/app/systemctl>
|
|
include <abstractions/bus-system>
|
|
|
|
unix (bind) type=stream addr=@@{hex16}/bus/systemctl/system,
|
|
|
|
dbus send bus=system path=/org/freedesktop/systemd1
|
|
interface=org.freedesktop.systemd1.Manager
|
|
member=GetUnitFileState
|
|
peer=(name=org.freedesktop.systemd1, label="@{p_systemd}"),
|
|
|
|
include if exists <local/update-notifier_systemctl>
|
|
}
|
|
|
|
include if exists <local/update-notifier>
|
|
}
|