krb5: Require krb5_set_real_time is available to build with krb5
authorAndrew Bartlett <abartlet@samba.org>
Thu, 5 Jan 2012 00:34:12 +0000 (11:34 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 10 Jan 2012 20:50:07 +0000 (21:50 +0100)
source3/configure.in
source3/include/krb5_protos.h
source3/libsmb/clikrb5.c
source3/wscript
source4/auth/kerberos/kerberos.h

index b408b1c1a6345a3bbcf6dd80b5c424792c117866..153a61050184dd031142e49724d0c08503b2316d 100644 (file)
@@ -3848,6 +3848,12 @@ if test x"$with_ads_support" != x"no"; then
   fi
 
   AC_CHECK_FUNC_EXT(krb5_set_real_time, $KRB5_LIBS)
+  ################################################################
+  # test for AD / GSSAPI support being enabled
+  if test x"$have_gssapi" != xyes ; then
+       AC_MSG_WARN([Samba cannot be supported without GSSAPI])
+  fi
+
   AC_CHECK_FUNC_EXT(krb5_set_default_in_tkt_etypes, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_set_default_tgs_enctypes, $KRB5_LIBS)
   AC_CHECK_FUNC_EXT(krb5_set_default_tgs_ktypes, $KRB5_LIBS)
@@ -4401,6 +4407,11 @@ if test x"$with_ads_support" != x"no"; then
     use_ads=no
   fi
 
+  if test x"$ac_cv_func_ext_krb5_set_real_time" != x"yes"; then
+    AC_MSG_WARN(krb5_set_real_time encryption type not found in -lkrb5)
+    use_ads=no
+  fi
+
   if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" != x"yes"; then
     AC_MSG_WARN(krb5_mk_req_extended not found in -lkrb5)
     use_ads=no
index 37fc1c6cd51f912b3b93d8c06f69cd5a9ba96797..32f995cf5d43669af2453bbf078a26a33c20cf80 100644 (file)
@@ -42,10 +42,6 @@ krb5_error_code smb_krb5_unparse_name(TALLOC_CTX *mem_ctx,
                                      krb5_const_principal principal,
                                      char **unix_name);
 
-#ifndef HAVE_KRB5_SET_REAL_TIME
-krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds);
-#endif
-
 krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc);
 
 #if defined(HAVE_KRB5_AUTH_CON_SETKEY) && !defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY)
index c0d822e5da2e0f314f328cf1ae9e514455ee2d13..9af3e49d116bb26c8268f7fdc5b9eaf8b4c9bed3 100644 (file)
@@ -50,26 +50,6 @@ krb5_error_code krb5_auth_con_set_req_cksumtype(
        krb5_cksumtype     cksumtype);
 #endif
 
-#ifndef HAVE_KRB5_SET_REAL_TIME
-/*
- * This function is not in the Heimdal mainline.
- */
- krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds)
-{
-       krb5_error_code ret;
-       int32_t sec, usec;
-
-       ret = krb5_us_timeofday(context, &sec, &usec);
-       if (ret)
-               return ret;
-
-       context->kdc_sec_offset = seconds - sec;
-       context->kdc_usec_offset = microseconds - usec;
-
-       return 0;
-}
-#endif
-
 #if !defined(HAVE_KRB5_SET_DEFAULT_TGS_KTYPES)
 
 #if defined(HAVE_KRB5_SET_DEFAULT_TGS_ENCTYPES)
index 8734a4f069f63f6f6e88f3297bc7014f2d535472..00da1948a6fe3f4008871919f34b8fcc11f52045 100644 (file)
@@ -573,7 +573,7 @@ msg.msg_acctrightslen = sizeof(fd);
         conf.CHECK_FUNCS_IN('gss_wrap_iov gss_krb5_import_cred gss_get_name_attribute gss_mech_krb5 gss_oid_equal gss_inquire_sec_context_by_oid', 'gssapi gssapi_krb5 krb5')
         conf.CHECK_FUNCS_IN('krb5_mk_req_extended krb5_kt_compare', 'krb5')
         conf.CHECK_FUNCS('''
-krb5_set_real_time krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes
+krb5_set_default_in_tkt_etypes krb5_set_default_tgs_enctypes
 krb5_set_default_tgs_ktypes krb5_principal2salt krb5_use_enctype
 krb5_string_to_key krb5_get_pw_salt krb5_string_to_key_salt krb5_auth_con_setkey
 krb5_auth_con_setuseruserkey krb5_locate_kdc krb5_get_permitted_enctypes
index a4a3275b2b7f00fc6f4ddf326bd73b736c338af8..5aff56d8335334faeff8a5b3f29d37b944097243 100644 (file)
@@ -60,10 +60,6 @@ struct keytab_container {
 #define ENC_ALL_TYPES (ENC_CRC32 | ENC_RSA_MD5 | ENC_RC4_HMAC_MD5 |    \
                       ENC_HMAC_SHA1_96_AES128 | ENC_HMAC_SHA1_96_AES256)
 
-#ifndef HAVE_KRB5_SET_REAL_TIME
-krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds);
-#endif
-
 #ifndef HAVE_KRB5_SET_DEFAULT_TGS_KTYPES
 krb5_error_code krb5_set_default_tgs_ktypes(krb5_context ctx, const krb5_enctype *enc);
 #endif