summaryrefslogtreecommitdiffstats
path: root/source/auth
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
commit1e054e3db654801fbb5580211529cdfdea9ed686 (patch)
treee32c8707e3e53b5e04fdb887a070b57b4d38ba9b /source/auth
parentb195b1fa156472c66f919c0441fe5466e7afb414 (diff)
downloadsamba-1e054e3db654801fbb5580211529cdfdea9ed686.tar.gz
samba-1e054e3db654801fbb5580211529cdfdea9ed686.tar.xz
samba-1e054e3db654801fbb5580211529cdfdea9ed686.zip
Merge of get_dc_list() api change. This was slightly more intrusive
than the version in APPLIANCE so watch out for boogs.
Diffstat (limited to 'source/auth')
-rw-r--r--source/auth/auth_domain.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/auth/auth_domain.c b/source/auth/auth_domain.c
index 129c486562d..e18d809efbf 100644
--- a/source/auth/auth_domain.c
+++ b/source/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