From 249a3635c23a8a543459fd084faf7ddb4241b06d Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 15 Apr 2024 16:09:16 +0200 Subject: [PATCH] X11, Wayland: only give access to the current display, not all of them --- profiles.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/profiles.py b/profiles.py index 69445f4..18c3116 100644 --- a/profiles.py +++ b/profiles.py @@ -42,10 +42,12 @@ def DESKTOP(name): "dev": { ("dri", "snd"): Access.Device, }, - "/tmp/.X11-unix/": Access.Read, + "/tmp/.X11-unix/": { + "X"+os.environ["DISPLAY"].removeprefix(":"): Access.Read, + }, os.environ["XAUTHORITY"]: Access.Read, XDG_RUNTIME_DIR: { - ("wayland*", "pulse"): Access.Read, + (os.environ["WAYLAND_DISPLAY"], "pulse"): Access.Read, }, }), # Access to some key user configuration -- 2.30.2