summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/access-smack.lua
blob: a662a0f206c77b7bfa0c9e070c72bf16580d6802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
clients_om = ObjectManager {
  Interest {
    type = "client",
    Constraint { "pipewire.access", "=", "restricted" },
  }
}

clients_om:connect("object-added", function (om, client)
  local smack_label = client["global-properties"]["pipewire.sec.label"]

  if smack_label:match("^User::App::.+") then
    -- FIXME: apps can work with less permissions
    client:update_permissions { ["any"] = "all" }
  end
end)

clients_om:activate()