diff options
author | Ira Cooper <ira@wakeful.net> | 2012-05-30 11:50:06 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-06-22 21:49:30 +0200 |
commit | 32fe0352c4935182aadba0563ce3a286e0c549b0 (patch) | |
tree | 6708f76c3c7cd4fbdc7f7bdf7d85ce079669bdbe | |
parent | 12443f27739c41410d389468230bd50ba74643f9 (diff) | |
download | samba-32fe0352c4935182aadba0563ce3a286e0c549b0.tar.gz |
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
(cherry picked from commit fc7e1113c34819de6fc8053fb81ee2e0e970bec2)
(cherry picked from commit 6797759a36b50f82fb1f75a4cc9c2555a79073a2)
-rw-r--r-- | source3/libsmb/namequery.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index d0ab62fbbeb..4ba72042df5 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -1934,7 +1934,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. */ |