43 lines
No EOL
1 KiB
Text
43 lines
No EOL
1 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} = @{libexec}/switcheroo-control
|
|
profile switcheroo-control @{exec_path} flags=(attach_disconnected) {
|
|
include <abstractions/base>
|
|
include <abstractions/dbus-strict>
|
|
|
|
capability sys_nice,
|
|
|
|
network netlink raw,
|
|
|
|
dbus receive bus=system path=/net/hadess/SwitcherooControl
|
|
interface=org.freedesktop.DBus.Properties
|
|
member=GetAll,
|
|
|
|
dbus send bus=system path=/org/freedesktop/DBus
|
|
interface=org.freedesktop.DBus
|
|
member=RequestName,
|
|
|
|
dbus bind bus=system
|
|
name=net.hadess.SwitcherooControl,
|
|
|
|
@{exec_path} mr,
|
|
|
|
@{run}/udev/data/+drm:* r,
|
|
@{run}/udev/data/+pci:* r,
|
|
|
|
@{run}/udev/data/c226:[0-9]* r, # for /dev/dri/card*
|
|
|
|
@{sys}/bus/ r,
|
|
@{sys}/class/ r,
|
|
@{sys}/class/drm/ r,
|
|
@{sys}/devices/pci[0-9]*/**/boot_vga r,
|
|
@{sys}/devices/pci[0-9]*/**/uevent r,
|
|
|
|
include if exists <local/switcheroo-control>
|
|
} |