From ea26482c65ec502a96ab2e195fcdf9118568100d Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Fri, 5 Oct 2012 23:17:16 +0200 Subject: [PATCH] xcb_get_auth_info: mark success if getpeername() succeeds. The code is trying getpeername() and falling back to getsockname() if the first fails, but fails to set gotsockname=1 if the getpeername() call succeeds. This bug is preventing mit magic cooling from beeing sent from Unix domain clients on OpenBSD (and probably other BSDs too). --- src/xcb_auth.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/xcb_auth.c b/src/xcb_auth.c index a5b730c..cd862f6 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -332,6 +332,8 @@ int _xcb_get_auth_info(int fd, xcb_auth_info_t *info, int display) return 0; /* except for AF_UNIX, sockets should have peernames */ } gotsockname = 1; + } else { + gotsockname = 1; } authptr = get_authptr(sockname, display); -- 1.7.6