summaryrefslogtreecommitdiff
path: root/source3/auth/auth_domain.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/auth/auth_domain.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/auth/auth_domain.c')
-rw-r--r--source3/auth/auth_domain.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 129c486562..e18d809efb 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -288,8 +288,23 @@ static NTSTATUS find_connect_pdc(struct cli_state **cli,
if (time_now - last_change_time < 3600)
use_pdc_only = True;
- if (!get_dc_list(use_pdc_only, domain, &ip_list, &count))
- return NT_STATUS_NO_LOGON_SERVERS;
+ if (use_pdc_only) {
+ struct in_addr pdc_ip;
+
+ if (!get_pdc_ip(domain, &pdc_ip))
+ return NT_STATUS_NO_LOGON_SERVERS;
+
+ if ((ip_list = (struct in_addr *)
+ malloc(sizeof(struct in_addr))) == NULL)
+ return NT_STATUS_NO_MEMORY;
+
+ ip_list[0] = pdc_ip;
+ count = 1;
+
+ } else {
+ if (!get_dc_list(domain, &ip_list, &count))
+ return NT_STATUS_NO_LOGON_SERVERS;
+ }
/*
* Firstly try and contact a PDC/BDC who has the same