From 3d9f2aa3884e7bd1f26f6ad5ec0679481775693c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 26 Nov 2001 09:28:27 +0000 Subject: don't die with a FPE if there are no DCs (This used to be commit b5999473482475ef64212f4f7204c7895cf8fdf3) --- source3/nsswitch/winbindd_cm.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cm.c b/source3/nsswitch/winbindd_cm.c index a00bc3f5d9..9b810063c5 100644 --- a/source3/nsswitch/winbindd_cm.c +++ b/source3/nsswitch/winbindd_cm.c @@ -152,6 +152,8 @@ static BOOL cm_get_dc_name(char *domain, fstring srv_name) if(is_local_net(ip_list[i])) goto got_ip; } + + if (count == 0) return False; i = (sys_random() % count); -- cgit