From 3cb58b4b72ddb9ae1e354b954ae15230c9a49d6d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 6 Dec 2025 21:16:27 +0900 Subject: 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 --- internal/wayland/conn.go | 1 + 1 file changed, 1 insertion(+) (limited to 'internal/wayland') 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} -- cgit v1.3.1