[Pkg-samba-maint] [samba] 13/29: nsswitch: Fix short writes in winbind_write_sock

Jelmer Vernooij jelmer at moszumanska.debian.org
Fri Dec 6 23:16:45 UTC 2013


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch samba_4.1
in repository samba.

commit 67840df91d7370bd5c642635aa7731ccb343fd7b
Author: Volker Lendecke <vl at samba.org>
Date:   Tue Oct 15 08:23:10 2013 +0000

    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 at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit c6909887c26d4e827633acd50b11cf08c6aee0f7)
    Signed-off-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Mon Oct 28 12:50:37 CET 2013 on sn-devel-104
---
 nsswitch/wb_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nsswitch/wb_common.c b/nsswitch/wb_common.c
index c56a76f..5fde8d0 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 */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list