feat(profiles): add switcheroo-control.

This commit is contained in:
Alexandre Pujol 2022-05-21 17:17:14 +01:00
parent 6058ef7439
commit df8cb3fe91
Failed to generate hash of commit

View file

@ -0,0 +1,27 @@
# 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} = @{libexec}/switcheroo-control
profile switcheroo-control @{exec_path} {
include <abstractions/base>
capability sys_nice,
network netlink raw,
@{exec_path} mr,
@{run}/udev/data/+drm:* r,
@{sys}/bus/ r,
@{sys}/class/ r,
@{sys}/class/drm/ r,
@{sys}/devices/pci[0-9]*/**/drm/**/uevent r,
include if exists <local/switcheroo-control>
}