mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-19 07:06:30 +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,
|
name=self.name,
|
||||||
hostname=self.name.replace("_", "-"),
|
hostname=self.name.replace("_", "-"),
|
||||||
detach=True,
|
detach=True,
|
||||||
privileged=True,
|
|
||||||
device_cgroup_rules=self.sys_hardware.policy.get_cgroups_rules(
|
device_cgroup_rules=self.sys_hardware.policy.get_cgroups_rules(
|
||||||
PolicyGroup.AUDIO
|
PolicyGroup.AUDIO, PolicyGroup.BLUETOOTH
|
||||||
),
|
),
|
||||||
environment={ENV_TIME: self.sys_config.timezone},
|
environment={ENV_TIME: self.sys_config.timezone},
|
||||||
volumes=self.volumes,
|
volumes=self.volumes,
|
||||||
|
@ -35,6 +35,7 @@ class PolicyGroup(str, Enum):
|
|||||||
USB = "usb"
|
USB = "usb"
|
||||||
VIDEO = "video"
|
VIDEO = "video"
|
||||||
AUDIO = "audio"
|
AUDIO = "audio"
|
||||||
|
BLUETOOTH = "bluetooth"
|
||||||
|
|
||||||
|
|
||||||
class HardwareAction(str, Enum):
|
class HardwareAction(str, Enum):
|
||||||
|
@ -38,6 +38,9 @@ _CGROUPS: Dict[PolicyGroup, List[int]] = {
|
|||||||
180, # hiddev (usbmisc)
|
180, # hiddev (usbmisc)
|
||||||
243 # hidraw (hidraw)
|
243 # hidraw (hidraw)
|
||||||
],
|
],
|
||||||
|
PolicyGroup.BLUETOOTH: [
|
||||||
|
13 # /dev/input (input)
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# fmt: on
|
# fmt: on
|
||||||
|
Loading…
x
Reference in New Issue
Block a user