summaryrefslogtreecommitdiff
path: root/source3/configure.in
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-01-30 19:24:28 -0800
committerJeremy Allison <jra@samba.org>2010-01-30 19:24:28 -0800
commit687e4eba3cced6015fdcaac2c6ba675cdebc1273 (patch)
tree9e184ef885def723674ea725e9f064c04e18729b /source3/configure.in
parentf42971c520360e69c4cdd64bebb02a5f5ba49b94 (diff)
downloadsamba-687e4eba3cced6015fdcaac2c6ba675cdebc1273.tar.gz
samba-687e4eba3cced6015fdcaac2c6ba675cdebc1273.tar.bz2
samba-687e4eba3cced6015fdcaac2c6ba675cdebc1273.zip
Fix bug #7079 - cliconnect gets realm wrong with trusted domains.
Passing NULL as dest_realm for cli_session_setup_spnego() was always using our own realm (as for a NetBIOS name). Change this to look for the mapped realm using krb5_get_host_realm() if the destination machine name is a DNS name (contains a '.'). Could get fancier with DNS name detection (length, etc.) but this will do for now. Jeremy.
Diffstat (limited to 'source3/configure.in')
-rw-r--r--source3/configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 7740b3a7fc..f64110b9d4 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3660,6 +3660,9 @@ if test x"$with_ads_support" != x"no"; then
AC_CHECK_FUNC_EXT(krb5_get_creds_opt_set_impersonate, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_get_creds, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_get_credentials_for_user, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_get_host_realm, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_free_host_realm, $KRB5_LIBS)
+
# MIT krb5 1.8 does not expose this call (yet)
AC_CHECK_DECLS(krb5_get_credentials_for_user, [], [], [#include <krb5.h>])
@@ -4002,6 +4005,18 @@ if test x"$with_ads_support" != x"no"; then
[Whether the WRFILE:-keytab is supported])
fi
+ AC_CACHE_CHECK([for krb5_realm type],
+ samba_cv_HAVE_KRB5_REALM_TYPE,[
+ AC_TRY_COMPILE([#include <krb5.h>],
+ [krb5_realm realm;],
+ samba_cv_HAVE_KRB5_REALM_TYPE=yes,
+ samba_cv_HAVE_KRB5_REALM_TYPE=no)])
+
+ if test x"$samba_cv_HAVE_KRB5_REALM_TYPE" = x"yes"; then
+ AC_DEFINE(HAVE_KRB5_REALM_TYPE,1,
+ [Whether the type krb5_realm exists])
+ fi
+
AC_CACHE_CHECK([for krb5_princ_realm returns krb5_realm or krb5_data],
samba_cv_KRB5_PRINC_REALM_RETURNS_REALM,[
AC_TRY_COMPILE([#include <krb5.h>],