114 lines
3.7 KiB
Text
114 lines
3.7 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/4.0>,
|
|
|
|
include <tunables/global>
|
|
|
|
@{exec_path} = @{bin}/update-notifier
|
|
profile update-notifier @{exec_path} {
|
|
include <abstractions/base>
|
|
include <abstractions/apt>
|
|
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/dconf-write>
|
|
include <abstractions/gnome-strict>
|
|
include <abstractions/nameservice-strict>
|
|
include <abstractions/notifications>
|
|
include <abstractions/python>
|
|
|
|
unix (bind) type=stream addr=@@{udbus}/bus/systemd/bus-api-user,
|
|
|
|
#aa:dbus talk bus=system name=org.debian.apt label=apt
|
|
#aa:dbus talk bus=session name=org.ayatana.NotificationItem interface+=org.kde.StatusNotifierItem label=gnome-shell
|
|
|
|
dbus receive bus=system path=/com/ubuntu/UnattendedUpgrade/Pending
|
|
interface=com.ubuntu.UnattendedUpgrade.Pending
|
|
member=Finished
|
|
peer=(name=@{busname}, label=unattended-upgrade),
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{sh_path} rix,
|
|
@{bin}/ionice rix,
|
|
@{bin}/nice rix,
|
|
|
|
@{bin}/dpkg rPx -> child-dpkg,
|
|
@{bin}/ischroot rPx,
|
|
@{bin}/lsb_release rPx,
|
|
@{bin}/pkexec rCx -> pkexec,
|
|
@{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,
|
|
@{open_path} Cx -> open,
|
|
|
|
@{lib}/@{python_name}/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 pkexec {
|
|
include <abstractions/base>
|
|
include <abstractions/app/pkexec>
|
|
|
|
ptrace read peer=update-notifier,
|
|
|
|
@{lib}/update-notifier/package-system-locked Px,
|
|
|
|
@{PROC}/@{pid}/fdinfo/@{int} r,
|
|
@{PROC}/@{pid}/stat r,
|
|
|
|
include if exists <local/update-notifier_pkexec>
|
|
}
|
|
|
|
profile systemctl {
|
|
include <abstractions/base>
|
|
include <abstractions/app/systemctl>
|
|
|
|
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>
|
|
}
|
|
|
|
profile open {
|
|
include <abstractions/base>
|
|
include <abstractions/app/open>
|
|
|
|
include if exists <local/update-notifier_open>
|
|
}
|
|
|
|
include if exists <local/update-notifier>
|
|
}
|
|
|
|
# vim:syntax=apparmor
|