summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-06 01:29:07 +0000
committerTim Potter <tpot@samba.org>2002-11-06 01:29:07 +0000
commitea24bb2da8f643e043dc3af3ed3f16388878b57b (patch)
treedcffacff686f4867441fc7b177a865bcc43ea212 /source3/smbd
parent62d4ea1bc50bcd9f89fa054f60ca475f87b4a9de (diff)
downloadsamba-ea24bb2da8f643e043dc3af3ed3f16388878b57b.tar.gz
samba-ea24bb2da8f643e043dc3af3ed3f16388878b57b.tar.bz2
samba-ea24bb2da8f643e043dc3af3ed3f16388878b57b.zip
Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs. (This used to be commit 1e054e3db654801fbb5580211529cdfdea9ed686)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/change_trust_pw.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/source3/smbd/change_trust_pw.c b/source3/smbd/change_trust_pw.c
index 5da735e875..4811083c2d 100644
--- a/source3/smbd/change_trust_pw.c
+++ b/source3/smbd/change_trust_pw.c
@@ -105,12 +105,11 @@ account password for domain %s.\n", domain));
* We have been asked to dynamcially determine the IP addresses of the PDC.
*/
- struct in_addr *ip_list = NULL;
- int count = 0;
- int i;
+ struct in_addr pdc_ip;
+ fstring dc_name;
/* Use the PDC *only* for this. */
- if(!get_dc_list(True, domain, &ip_list, &count))
+ if(!get_pdc_ip(domain, &pdc_ip))
continue;
/*
@@ -118,17 +117,11 @@ account password for domain %s.\n", domain));
* address used as a string.
*/
- for(i = 0; i < count; i++) {
- fstring dc_name;
- if(!lookup_dc_name(global_myname, domain, &ip_list[i], dc_name))
+ if(!lookup_dc_name(global_myname, domain, &pdc_ip, dc_name))
continue;
if(NT_STATUS_IS_OK(res = modify_trust_password( domain, dc_name,
old_trust_passwd_hash)))
break;
- }
-
- SAFE_FREE(ip_list);
-
} else {
res = modify_trust_password( domain, remote_machine,
old_trust_passwd_hash);