a662a0f206c77b7bfa0c9e070c72bf16580d6802
[AGL/meta-agl.git] / meta-pipewire / dynamic-layers / meta-app-framework / recipes-multimedia / wireplumber / wireplumber-config-agl / access-smack.lua
1 clients_om = ObjectManager {
2   Interest {
3     type = "client",
4     Constraint { "pipewire.access", "=", "restricted" },
5   }
6 }
7
8 clients_om:connect("object-added", function (om, client)
9   local smack_label = client["global-properties"]["pipewire.sec.label"]
10
11   if smack_label:match("^User::App::.+") then
12     -- FIXME: apps can work with less permissions
13     client:update_permissions { ["any"] = "all" }
14   end
15 end)
16
17 clients_om:activate()