1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Drop full privileged from audio plugin (#2570)

This commit is contained in:
Pascal Vizeli
2021-02-16 08:40:19 +01:00
committed by GitHub
parent b61a747876
commit 59a82345a9
3 changed files with 5 additions and 2 deletions

View File

@@ -61,9 +61,8 @@ class DockerAudio(DockerInterface, CoreSysAttributes):
name=self.name,
hostname=self.name.replace("_", "-"),
detach=True,
privileged=True,
device_cgroup_rules=self.sys_hardware.policy.get_cgroups_rules(
PolicyGroup.AUDIO
PolicyGroup.AUDIO, PolicyGroup.BLUETOOTH
),
environment={ENV_TIME: self.sys_config.timezone},
volumes=self.volumes,

View File

@@ -35,6 +35,7 @@ class PolicyGroup(str, Enum):
USB = "usb"
VIDEO = "video"
AUDIO = "audio"
BLUETOOTH = "bluetooth"
class HardwareAction(str, Enum):

View File

@@ -38,6 +38,9 @@ _CGROUPS: Dict[PolicyGroup, List[int]] = {
180, # hiddev (usbmisc)
243 # hidraw (hidraw)
],
PolicyGroup.BLUETOOTH: [
13 # /dev/input (input)
]
}
# fmt: on