krb5: Require krb5_fwd_tgt_creds to be available to build with krb5
authorAndrew Bartlett <abartlet@samba.org>
Wed, 4 Jan 2012 23:59:44 +0000 (10:59 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jan 2012 20:50:07 +0000 (21:50 +0100)
source3/configure.in
source3/libsmb/clikrb5.c
source3/wscript

index a2f414b4087f7918170273d015f83b38553e53eb..914b7145da594a7afaf3964e9ba9b4876b6fe961 100644 (file)
@@ -4434,6 +4434,12 @@ if test x"$with_ads_support" != x"no"; then
     use_ads=no
   fi
 
+  if test x"$ac_cv_func_ext_krb5_fwd_tgt_creds" != x"yes"
+  then
+    AC_MSG_WARN(krb5_fwd_tgt_creds not found in -lkrb5)
+    use_ads=no
+  fi
+
   if test x"$ac_cv_func_ext_krb5_principal2salt" != x"yes" -a \
           x"$ac_cv_func_ext_krb5_get_pw_salt" != x"yes"
   then
index 1bd3cede97ae926a942c5744b913badd6c60b51d..76681198b49341bb5c2de8fe7b479b7e8bd0282e 100644 (file)
@@ -538,7 +538,7 @@ static krb5_error_code setup_auth_context(krb5_context context,
        return retval;
 }
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
+#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
 static krb5_error_code create_gss_checksum(krb5_data *in_data, /* [inout] */
                                                uint32_t gss_flags)
 {
@@ -690,7 +690,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context,
                goto cleanup_creds;
        }
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
+#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
        {
                uint32_t gss_flags = 0;
 
@@ -779,7 +779,7 @@ static krb5_error_code ads_krb5_mk_req(krb5_context context,
                         error_message(retval)));
        }
 
-#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_FWD_TGT_CREDS) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
+#if defined(TKT_FLG_OK_AS_DELEGATE ) && defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY) && defined(KRB5_AUTH_CONTEXT_USE_SUBKEY) && defined(HAVE_KRB5_AUTH_CON_SET_REQ_CKSUMTYPE)
 cleanup_data:
 #endif
 
index e7d9dc09c41aa3794633ff386d6d010a8d1a09e1..33ff56aa2d3fae60b1e38e522a8d745e3bc77aa3 100644 (file)
@@ -756,6 +756,9 @@ return krb5_kt_resolve(context, "WRFILE:api", &keytab);
         if not conf.CONFIG_SET('HAVE_KRB5_FREE_HOST_REALM'):
             Logs.warn("krb5_free_host_realm not found in -lkrb5")
             use_ads=False
+        if not conf.CONFIG_SET('HAVE_KRB5_FWD_TGT_CREDS'):
+            Logs.warn("krb5_fwd_tgt_creds found in -lkrb5")
+            use_ads=False
         if not conf.CONFIG_SET('HAVE_KRB5_PRINCIPAL2SALT') and \
            not conf.CONFIG_SET('HAVE_KRB5_GET_PW_SALT'):
             Logs.warn("no CREATE_KEY_FUNCTIONS detected")