summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorIra Cooper <ira@wakeful.net>2012-05-30 11:50:06 -0700
committerJeremy Allison <jra@samba.org>2012-05-30 23:29:02 +0200
commitfc7e1113c34819de6fc8053fb81ee2e0e970bec2 (patch)
treeeb10b90a27901b46948aa98ae1d8cdd8eeac0ead /source3
parentd7e52cc5273c3ec1a0570f06610e30b48c03bf6b (diff)
downloadsamba-fc7e1113c34819de6fc8053fb81ee2e0e970bec2.tar.gz
samba-fc7e1113c34819de6fc8053fb81ee2e0e970bec2.tar.bz2
samba-fc7e1113c34819de6fc8053fb81ee2e0e970bec2.zip
Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses
Original code incorrectly used a while() instead of a for() loop. We need to iterate over the entire array here. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/namequery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 3eae347068..4c05e4f418 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2491,7 +2491,7 @@ static NTSTATUS resolve_ads(const char *name,
*return_count = 0;
- while ( i < numdcs && (*return_count<numaddrs) ) {
+ for (i = 0; i < numdcs && (*return_count<numaddrs); i++ ) {
/* If we don't have an IP list for a name, lookup it up */
if (!dcs[i].ss_s) {
/* We need to get all IP addresses here. */