summaryrefslogtreecommitdiffstats
path: root/source/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
commit6ba7847ce2756fde94e530fd0bf2a055f3e27373 (patch)
tree061f6959e02e7992651286b8470734fabb0bc79b /source/smbd/change_trust_pw.c
parent77d534f7fd9ad74ca6d5e74860b29bb8ad54268f (diff)
downloadsamba-6ba7847ce2756fde94e530fd0bf2a055f3e27373.tar.gz
samba-6ba7847ce2756fde94e530fd0bf2a055f3e27373.tar.xz
samba-6ba7847ce2756fde94e530fd0bf2a055f3e27373.zip
Merge of get_dc_list() api change from HEAD.
Diffstat (limited to 'source/smbd/change_trust_pw.c')
-rw-r--r--source/smbd/change_trust_pw.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/smbd/change_trust_pw.c b/source/smbd/change_trust_pw.c
index 5da735e8751..7cb90840722 100644
--- a/source/smbd/change_trust_pw.c
+++ b/source/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,