apparmor.d/apparmor.d/groups/ubuntu/software-properties-dbus
Alexandre Pujol 3f69b9fec4
feat(profile): use the new @{tmp} variable.
It is only used with the owner statement.
2024-05-02 22:12:02 +01:00

50 lines
1.4 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} = @{lib}/software-properties/software-properties-dbus
profile software-properties-dbus @{exec_path} {
include <abstractions/base>
include <abstractions/common/apt>
include <abstractions/bus-system>
include <abstractions/nameservice-strict>
include <abstractions/python>
#aa:dbus own bus=system name=com.ubuntu.SoftwareProperties
dbus receive bus=session
interface=org.freedesktop.DBus.Introspectable
member=Introspect
peer=(name=:*, label=gnome-shell),
dbus receive bus=system
interface=org.freedesktop.DBus.Introspectable
member=Introspect
peer=(name=:*, label=software-properties-gtk),
@{exec_path} mr,
@{bin}/python3.@{int} rix,
@{bin}/env rix,
@{bin}/apt-key rPx, # Changing trusted keys
@{bin}/lsb_release rPx -> lsb_release,
/etc/apt/apt.conf.d/10periodic w,
/etc/apt/sources.list{,.save} rw,
/usr/share/python-apt/{,**} r,
/usr/share/distro-info/*.csv r,
/usr/share/xml/iso-codes/{,**} r,
owner @{tmp}/???????? rw, # unconventional '_' tail
owner @{tmp}/tmp????????/ w, # change to 'c'
owner @{tmp}/tmp????????/apt.conf w,
owner @{PROC}/@{pid}/fd/ r,
owner @{PROC}/@{pid}/mounts r,
include if exists <local/software-properties-dbus>
}