summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Thangavelu <Kumar.Thangavelu@riverbed.com>2009-05-29 11:27:38 +0200
committerKarolin Seeger <kseeger@samba.org>2009-05-29 11:27:38 +0200
commit1a7898e3a8f2c2e2cacd645b97da88054df931ae (patch)
tree6871485e1a5580093f46c8db511cd5e4990f136b
parent2228cc6a0f942b774bef7fb0b99009897fa4dff4 (diff)
downloadsamba-1a7898e3a8f2c2e2cacd645b97da88054df931ae.tar.gz
samba-1a7898e3a8f2c2e2cacd645b97da88054df931ae.tar.bz2
samba-1a7898e3a8f2c2e2cacd645b97da88054df931ae.zip
s3/getdcname: Fix 'net' crash.
'net' command crashed when attempting to join a domain. This occurred in a very specific case where the DC had multiple IPs and one of the IPs was invalid. Signed-off-by: Volker Lendecke <vl@samba.org>
-rw-r--r--source3/libsmb/dsgetdcname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/libsmb/dsgetdcname.c b/source3/libsmb/dsgetdcname.c
index 5606b8e7c9..fb87b4dc9a 100644
--- a/source3/libsmb/dsgetdcname.c
+++ b/source3/libsmb/dsgetdcname.c
@@ -626,8 +626,8 @@ static NTSTATUS discover_dc_dns(TALLOC_CTX *mem_ctx,
struct ip_service_name *r = &dclist[count];
- r->port = dcs[count].port;
- r->hostname = dcs[count].hostname;
+ r->port = dcs[i].port;
+ r->hostname = dcs[i].hostname;
/* If we don't have an IP list for a name, lookup it up */