summaryrefslogtreecommitdiff
path: root/source3/smbd/change_trust_pw.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-11-06 05:14:15 +0000
committerTim Potter <tpot@samba.org>2002-11-06 05:14:15 +0000
commitab1cf8d1cf447e85063b43b65fa05c8b4bfde2a9 (patch)
treede41e9906d94ea9b2a1d2c12920d23b9640d3e83 /source3/smbd/change_trust_pw.c
parentd21a06bbb44a0044657de38c1eb544be8c335918 (diff)
downloadsamba-ab1cf8d1cf447e85063b43b65fa05c8b4bfde2a9.tar.gz
samba-ab1cf8d1cf447e85063b43b65fa05c8b4bfde2a9.tar.bz2
samba-ab1cf8d1cf447e85063b43b65fa05c8b4bfde2a9.zip
Merge of get_dc_list() api change from HEAD.
(This used to be commit 6ba7847ce2756fde94e530fd0bf2a055f3e27373)
Diffstat (limited to 'source3/smbd/change_trust_pw.c')
-rw-r--r--source3/smbd/change_trust_pw.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source3/smbd/change_trust_pw.c b/source3/smbd/change_trust_pw.c
index 5da735e875..7cb9084072 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,16 +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,