summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-11 04:06:30 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-11 04:06:30 +0000
commitbd3a6e6cc984e91621f06a52ddc87909d9d83abc (patch)
tree83553c50a3f2df6b325327e98bec3afd6e6eab21 /source3/libads
parent9bdb6e2b2266eee4b02cf5217db33bd47ef882f4 (diff)
downloadsamba-bd3a6e6cc984e91621f06a52ddc87909d9d83abc.tar.gz
samba-bd3a6e6cc984e91621f06a52ddc87909d9d83abc.tar.bz2
samba-bd3a6e6cc984e91621f06a52ddc87909d9d83abc.zip
put in the ADS DNS hack, but commented out
(This used to be commit 3396a671c59e6afe70a22ce64e4a9381b1d6fef8)
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/ldap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c
index a8f9298b0f..aa6e7c0036 100644
--- a/source3/libads/ldap.c
+++ b/source3/libads/ldap.c
@@ -47,6 +47,17 @@ ADS_STATUS ads_connect(ADS_STRUCT *ads)
ldap_set_option(ads->ld, LDAP_OPT_PROTOCOL_VERSION, &version);
+#if KRB5_DNS_HACK
+ /* this is a really nasty hack to avoid ADS DNS problems. It needs a patch
+ to MIT kerberos to work (tridge) */
+ {
+ char *env;
+ asprintf(&env, "KRB5_KDC_ADDRESS_%s", ads->server_realm);
+ setenv(env, inet_ntoa(*interpret_addr2(ads->ldap_server)), 1);
+ free(env);
+ }
+#endif
+
if (ads->password) {
if ((code = ads_kinit_password(ads)))
return ADS_ERROR_KRB5(code);