From 70b59a3b20bc3cd3e1456dc552c43cd1da22f1b0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 29 Mar 2006 18:55:39 +0000 Subject: r14760: Fix #3642, ensure we don't call FD_SET on read with fd == -1. Jeremy. (This used to be commit 6ae15544ccfc3ff5d97565ad41ba7f57c7d29b0f) --- source3/nsswitch/wb_common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source3/nsswitch/wb_common.c b/source3/nsswitch/wb_common.c index 0e20927941..dfefeb9f75 100644 --- a/source3/nsswitch/wb_common.c +++ b/source3/nsswitch/wb_common.c @@ -411,6 +411,10 @@ static int read_sock(void *buffer, int count) int result = 0, nread = 0; int total_time = 0, selret; + if (winbindd_fd == -1) { + return -1; + } + /* Read data from socket */ while(nread < count) { struct timeval tv; -- cgit