mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-18 22:56:31 +00:00
Drop full privileged from audio plugin (#2570)
This commit is contained in:
parent
b61a747876
commit
59a82345a9
@ -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,
|
||||
|
@ -35,6 +35,7 @@ class PolicyGroup(str, Enum):
|
||||
USB = "usb"
|
||||
VIDEO = "video"
|
||||
AUDIO = "audio"
|
||||
BLUETOOTH = "bluetooth"
|
||||
|
||||
|
||||
class HardwareAction(str, Enum):
|
||||
|
@ -38,6 +38,9 @@ _CGROUPS: Dict[PolicyGroup, List[int]] = {
|
||||
180, # hiddev (usbmisc)
|
||||
243 # hidraw (hidraw)
|
||||
],
|
||||
PolicyGroup.BLUETOOTH: [
|
||||
13 # /dev/input (input)
|
||||
]
|
||||
}
|
||||
|
||||
# fmt: on
|
||||
|
Loading…
x
Reference in New Issue
Block a user