summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorGerald W. Carter <jerry@samba.org>2008-06-27 10:22:39 -0400
committerGerald W. Carter <jerry@samba.org>2008-06-27 10:26:11 -0400
commit9ff1ffcbee46257c3b2b13b84c2a539322493190 (patch)
tree8cafc550e0378e56a44a89787fcfafa708d578e4 /source3/winbindd
parente08943f8d855b85765615b2a231fb65d5788a2a6 (diff)
downloadsamba-9ff1ffcbee46257c3b2b13b84c2a539322493190.tar.gz
samba-9ff1ffcbee46257c3b2b13b84c2a539322493190.tar.bz2
samba-9ff1ffcbee46257c3b2b13b84c2a539322493190.zip
libads: Add API call to connect to a global catalog server.
Extends ads_connect() to a new call ads_connect_gc() which connects on port 3268 rather than port 389. Also makes ads_try_connect() static and only used internally to ldap.c (This used to be commit f4c37dbe2c986fb7bfe510cdff3b4a9fbc06d079)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 1f1544ea0d..51ef14b708 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1043,14 +1043,16 @@ static bool dcip_to_name(TALLOC_CTX *mem_ctx,
if (lp_security() == SEC_ADS) {
ADS_STRUCT *ads;
+ ADS_STATUS ads_status;
char addr[INET6_ADDRSTRLEN];
print_sockaddr(addr, sizeof(addr), pss);
- ads = ads_init(domain->alt_name, domain->name, NULL);
+ ads = ads_init(domain->alt_name, domain->name, addr);
ads->auth.flags |= ADS_AUTH_NO_BIND;
- if (ads_try_connect(ads, addr)) {
+ ads_status = ads_connect(ads);
+ if (ADS_ERR_OK(ads_status)) {
/* We got a cldap packet. */
fstrcpy(name, ads->config.ldap_server_name);
namecache_store(name, 0x20, 1, &ip_list);