summaryrefslogtreecommitdiffstats
path: root/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl
diff options
context:
space:
mode:
Diffstat (limited to 'meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl')
-rw-r--r--meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/50-access-agl.lua1
-rw-r--r--meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/access-smack.lua17
2 files changed, 18 insertions, 0 deletions
diff --git a/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/50-access-agl.lua b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/50-access-agl.lua
new file mode 100644
index 000000000..10b3d7ae3
--- /dev/null
+++ b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/50-access-agl.lua
@@ -0,0 +1 @@
+load_access("smack")
diff --git a/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/access-smack.lua b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/access-smack.lua
new file mode 100644
index 000000000..a662a0f20
--- /dev/null
+++ b/meta-pipewire/dynamic-layers/meta-app-framework/recipes-multimedia/wireplumber/wireplumber-config-agl/access-smack.lua
@@ -0,0 +1,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()