mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +03:00
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>
This commit is contained in:
committed by
Andreas Schneider
parent
5ea154bf25
commit
c6909887c2
@ -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 */
|
||||
|
Reference in New Issue
Block a user