From 0c08fb9e3ae6aac9f37996d17e571b0c10c0f07a Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Tue, 29 Nov 2022 17:55:06 -0600 Subject: [PATCH] ipc: Exclude UNIX: prefix in socket name Otherwise we don't format the same socket name as the client. --- lib/ipc/server.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/ipc/server.c b/lib/ipc/server.c index b0b2fa1cb..3b7d5254b 100644 --- a/lib/ipc/server.c +++ b/lib/ipc/server.c @@ -1085,6 +1085,9 @@ heim_sipc_service_unix(const char *service, const char *d = secure_getenv("HEIM_IPC_DIR"); int fd, ret; + if (strncasecmp(service, "UNIX:", sizeof("UNIX:") - 1) == 0) + service += sizeof("UNIX:") - 1; + un.sun_family = AF_UNIX; if (snprintf(un.sun_path, sizeof(un.sun_path),