From 08a0f0189820c012373ec788cb8ddc6f2ca459e7 Mon Sep 17 00:00:00 2001 From: Anthony Nandaa Date: Wed, 24 Apr 2024 18:38:49 +0300 Subject: [PATCH] fix: create windows npipe with the right security descriptor There was already code that was creating the npipe with the right descriptors, as it has been for other like docker[1]. This fix uses the main.getLocalListener instead of the generic one from `containerd/sys`. fixes #4864 Signed-off-by: Anthony Nandaa --- cmd/buildkitd/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/buildkitd/main.go b/cmd/buildkitd/main.go index 724affb96d38..ed6fc9b07bcd 100644 --- a/cmd/buildkitd/main.go +++ b/cmd/buildkitd/main.go @@ -639,6 +639,9 @@ func getListener(addr string, uid, gid int, tlsConfig *tls.Config) (net.Listener if tlsConfig != nil { bklog.L.Warnf("TLS is disabled for %s", addr) } + if proto == "npipe" { + return getLocalListener(listenAddr) + } return sys.GetLocalListener(listenAddr, uid, gid) case "fd": return listenFD(listenAddr, tlsConfig)