From 003c13ff838f54a18ee2f8801846d597910bdaeb Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 15 Oct 2013 08:23:10 +0000 Subject: [PATCH] nsswitch: Fix short writes in winbind_write_sock We set the socket to nonblocking and don't handle EAGAIN right. We do a poll anyway, so wait for writability, which should fix this. --- nsswitch/wb_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c index dcfc8a5..9981e22 100644 --- a/nsswitch/wb_common.c +++ b/nsswitch/wb_common.c @@ -392,7 +392,7 @@ static int winbind_write_sock(void *buffer, int count, int recursing, call would not block by calling poll(). */ pfd.fd = winbindd_fd; - pfd.events = POLLIN|POLLHUP; + pfd.events = POLLIN|POLLOUT|POLLHUP; ret = poll(&pfd, 1, 0); if (ret == -1) { -- 1.8.1.2