From bd3a6e6cc984e91621f06a52ddc87909d9d83abc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Mar 2002 04:06:30 +0000 Subject: put in the ADS DNS hack, but commented out (This used to be commit 3396a671c59e6afe70a22ce64e4a9381b1d6fef8) --- source3/libads/ldap.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/libads/ldap.c') 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); -- cgit