aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/wayland
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-12-06 21:16:27 +0900
committerOphestra <cat@gensokyo.uk>2025-12-06 21:16:27 +0900
commit3cb58b4b72ddb9ae1e354b954ae15230c9a49d6d (patch)
tree54c41c44ea2dbd7eda7163f0707b13c4484e6408 /internal/wayland
parentbb1fc4c7bcd9730b774f2afb079b814c928c0b5a (diff)
internal/pipewire: high level SecurityContext helper
This sets up close pipe and socket internally, and exposes the resulting pathname socket and close_fd cleanup as an io.Closer. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/wayland')
-rw-r--r--internal/wayland/conn.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/wayland/conn.go b/internal/wayland/conn.go
index 40a909e7..7aebafb8 100644
--- a/internal/wayland/conn.go
+++ b/internal/wayland/conn.go
@@ -52,6 +52,7 @@ func New(displayPath, bindPath *check.Absolute, appID, instanceID string) (*Secu
if f, err := os.Create(bindPath.String()); err != nil {
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}
} else if err = f.Close(); err != nil {
+ _ = os.Remove(bindPath.String())
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}
} else if err = os.Remove(bindPath.String()); err != nil {
return nil, &Error{RCreate, bindPath.String(), displayPath.String(), err}