feat(profiles): add spice-vdagent.

This commit is contained in:
Alexandre Pujol 2022-05-21 17:11:20 +01:00
parent 7a1304720e
commit 1d284c03c3
Failed to generate hash of commit
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,30 @@
# 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} = /{usr/,}bin/spice-vdagent
profile spice-vdagent @{exec_path} {
include <abstractions/base>
include <abstractions/audio>
include <abstractions/gtk>
@{exec_path} mr,
/etc/machine-id r,
/etc/pipewire/client.conf r,
owner @{user_config_dirs}/user-dirs.dirs r,
owner @{run}/user/@{uid}/.mutter-Xwaylandauth.[a-zA-z0-9]* rw,
owner @{run}/spice-vdagentd/spice-vdagent-sock rw,
@{sys}/devices/pci[0-9]*/**/{device,vendor} r,
/dev/dri/card[0-9]* rw,
include if exists <local/spice-vdagent>
}

View file

@ -0,0 +1,28 @@
# 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} = /{usr/,}bin/spice-vdagentd
profile spice-vdagentd @{exec_path} {
include <abstractions/base>
capability sys_nice,
@{exec_path} mr,
owner @{run}/spice-vdagentd/spice-vdagentd.pid rw,
@{run}/systemd/seats/seat[0-9]* r,
@{run}/systemd/sessions/[0-9]* r,
@{run}/systemd/users/@{uid} r,
@{PROC}/@{pids}/cgroup r,
/dev/uinput rw,
/dev/vport[0-9]*p[0-9]* rw,
include if exists <local/spice-vdagentd>
}