summaryrefslogtreecommitdiffstats
path: root/source/nsswitch
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-11-26 09:28:27 +0000
committerAndrew Tridgell <tridge@samba.org>2001-11-26 09:28:27 +0000
commitb5999473482475ef64212f4f7204c7895cf8fdf3 (patch)
treeef7009e5ef37b711e670ab8354257bb6bb363d46 /source/nsswitch
parente3698259afa79fcd318592b1d628803695406337 (diff)
downloadsamba-b5999473482475ef64212f4f7204c7895cf8fdf3.tar.gz
samba-b5999473482475ef64212f4f7204c7895cf8fdf3.tar.xz
samba-b5999473482475ef64212f4f7204c7895cf8fdf3.zip
don't die with a FPE if there are no DCs
Diffstat (limited to 'source/nsswitch')
-rw-r--r--source/nsswitch/winbindd_cm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/nsswitch/winbindd_cm.c b/source/nsswitch/winbindd_cm.c
index a00bc3f5d9f..9b810063c57 100644
--- a/source/nsswitch/winbindd_cm.c
+++ b/source/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);