summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2013-10-15 08:23:10 +0000
committerKarolin Seeger <kseeger@samba.org>2013-10-28 14:51:21 +0100
commit8d4f2708b77d917b693d361be37cee69eb14e7e4 (patch)
tree8b5e8d79a7ea21664118c1178f30e3dd49e8d8f6 /nsswitch
parenta918e7dc0c2096b96495ee5ac0115bd451aa6d69 (diff)
downloadsamba-8d4f2708b77d917b693d361be37cee69eb14e7e4.tar.gz
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. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10195 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit c6909887c26d4e827633acd50b11cf08c6aee0f7) Signed-off-by: Andreas Schneider <asn@samba.org> Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-0-test): Mon Oct 28 14:51:22 CET 2013 on sn-devel-104
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wb_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index c56a76f8261..5fde8d0f138 100644
--- a/nsswitch/wb_common.c
+++ b/nsswitch/wb_common.c
@@ -395,9 +395,9 @@ static int winbind_write_sock(void *buffer, int count, int recursing,
call would not block by calling poll(). */
pfd.fd = fd;
- pfd.events = POLLIN|POLLHUP;
+ pfd.events = POLLIN|POLLOUT|POLLHUP;
- ret = poll(&pfd, 1, 0);
+ ret = poll(&pfd, 1, -1);
if (ret == -1) {
winbind_close_sock();
return -1; /* poll error */