summaryrefslogtreecommitdiff
path: root/source3
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
commit3d9f2aa3884e7bd1f26f6ad5ec0679481775693c (patch)
treed807fec32142ce5e8e7ad62296e334e4ccdd175b /source3
parentdf81a6ec23b9eebcf544b23d6028fe9469234818 (diff)
downloadsamba-3d9f2aa3884e7bd1f26f6ad5ec0679481775693c.tar.gz
samba-3d9f2aa3884e7bd1f26f6ad5ec0679481775693c.tar.bz2
samba-3d9f2aa3884e7bd1f26f6ad5ec0679481775693c.zip
don't die with a FPE if there are no DCs
(This used to be commit b5999473482475ef64212f4f7204c7895cf8fdf3)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd_cm.c2
1 files changed, 2 insertions, 0 deletions
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);