From cd1da5cec49fb7fe6238a00d9ba550b3ed78fa08 Mon Sep 17 00:00:00 2001 From: Ben Byer Date: Wed, 14 Nov 2007 03:57:57 -0800 Subject: Fix for incorrect processing of recycled launchd socket on OS X --- Xtranssock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Xtranssock.c b/Xtranssock.c index 8b18f09..b7a601b 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -535,7 +535,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port) return NULL; } - portlen = strlen(port); + portlen = strlen(port) + 1; // include space for trailing null #ifdef BSD44SOCKETS if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) { PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0); @@ -572,7 +572,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port) ciptr->peeraddrlen = portlen + 2; /* Initialize ciptr structure as if it were a normally-opened unix socket */ - ciptr->flags = TRANS_LOCAL; + ciptr->flags = TRANS_LOCAL | TRANS_NOUNLINK; #ifdef BSD44SOCKETS addr->sa_len = portlen + 1; #endif -- cgit v1.2.3