summaryrefslogtreecommitdiffstats
path: root/source/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
commit3396a671c59e6afe70a22ce64e4a9381b1d6fef8 (patch)
tree9abb097224a18dcc5090598c0a1ab63180d6dc8e /source/libads
parent3e69ea6846e455d6ebb15e4481d4f98fd038c8a2 (diff)
downloadsamba-3396a671c59e6afe70a22ce64e4a9381b1d6fef8.tar.gz
samba-3396a671c59e6afe70a22ce64e4a9381b1d6fef8.tar.xz
samba-3396a671c59e6afe70a22ce64e4a9381b1d6fef8.zip
put in the ADS DNS hack, but commented out
Diffstat (limited to 'source/libads')
-rw-r--r--source/libads/ldap.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/libads/ldap.c b/source/libads/ldap.c
index a8f9298b0ff..aa6e7c00369 100644
--- a/source/libads/ldap.c
+++ b/source/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);