apparmor.d/apparmor.d/profiles-a-f/fwupdmgr
2022-08-19 19:25:22 +01:00

81 lines
2.1 KiB
Text

# apparmor.d - Full set of apparmor profiles
# Copyright (C) 2020-2022 Mikhail Morfikov
# Copyright (C) 2021-2022 Alexandre Pujol <alexandre@pujol.io>
# SPDX-License-Identifier: GPL-2.0-only
abi <abi/3.0>,
include <tunables/global>
@{exec_path} = /{usr/,}bin/fwupdmgr
profile fwupdmgr @{exec_path} flags=(attach_disconnected,complain) {
include <abstractions/base>
include <abstractions/dbus-strict>
include <abstractions/dconf-write>
include <abstractions/nameservice-strict>
include <abstractions/openssl>
include <abstractions/ssl_certs>
capability sys_nice,
signal (send),
network inet stream,
network inet6 stream,
network inet dgram,
network inet6 dgram,
network netlink raw,
dbus send bus=system path=/
interface=org.freedesktop.DBus.Properties
member=GetAll,
dbus send bus=system path=/
interface=org.freedesktop.fwupd
member={GetDevices,GetPlugins,GetRemotes,SetFeatureFlags,SetHints,UpdateMetadata},
dbus send bus=system path=/org/freedesktop/systemd[0-9]
interface=org.freedesktop.DBus.Properties
member=GetAll,
dbus send bus=system path=/org/freedesktop/systemd[0-9]
interface=org.freedesktop.systemd[0-9].Manager
member={GetDefaultTarget,GetUnit},
dbus receive bus=system path=/
interface=org.freedesktop.fwupd
member=Changed,
@{exec_path} mr,
/{usr/,}bin/dbus-launch rCx -> dbus,
/{usr/,}bin/pkttyagent rPx,
/usr/share/glib-2.0/schemas/gschemas.compiled r,
/etc/machine-id r,
owner /var/cache/private/fwupdmgr/fwupd/lvfs-metadata.xml.gz{,.asc}.* rw,
owner /var/cache/private/fwupdmgr/fwupd/lvfs-metadata.xml.gz{,.asc} rw,
owner @{user_cache_dirs}/ rw,
@{user_cache_dirs}/dconf/user rw,
owner @{user_cache_dirs}/fwupd/ rw,
owner @{user_cache_dirs}/fwupd/lvfs-metadata.xml.gz{,.*} rw,
owner @{PROC}/@{pid}/fd/ r,
/dev/tty rw,
profile dbus {
include <abstractions/base>
include <abstractions/nameservice-strict>
/{usr/,}bin/dbus-launch mr,
owner @{HOME}/.Xauthority r,
}
include if exists <local/fwupdmgr>
}