apparmor.d/apparmor.d/groups/ubuntu/software-properties-dbus
2023-09-10 11:58:13 +01:00

56 lines
1.5 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} = @{lib}/software-properties/software-properties-dbus
profile software-properties-dbus @{exec_path} {
include <abstractions/base>
include <abstractions/apt-common>
include <abstractions/dbus-strict>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/python>
dbus send bus=system path=/org/freedesktop/DBus
interface=org.freedesktop.DBus
member=RequestName
peer=(name=org.freedesktop.DBus),
dbus receive bus=system path=/
interface=org.freedesktop.DBus.Introspectable
member=Introspect,
dbus receive bus=system path=/
interface=com.ubuntu.SoftwareProperties
member=Reload,
dbus bind bus=system
name=com.ubuntu.SoftwareProperties,
@{exec_path} mr,
@{bin}/python3.[0-9]* 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,
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>
}