]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only apply hack if rlm_krb5 was compiled thread capable
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 12 Dec 2013 12:24:28 +0000 (12:24 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 12 Dec 2013 12:24:28 +0000 (12:24 +0000)
src/modules/rlm_krb5/rlm_krb5.c

index 9a7df619afa865123eb71cf495c3317f25d21842..6632e2e2ad4abe8f3c991278d7d02eb78fb34304 100644 (file)
@@ -47,7 +47,7 @@ RCSID("$Id$")
  *  The functions sigs below are not provided by krb5.h, but are available
  *  in the library.
  */
-#if !defined(HEIMDAL_KRB5)
+#if !defined(HEIMDAL_KRB5) && KRB5_IS_THREAD_SAFE
 krb5_error_code
 krb5_set_default_in_tkt_ktypes(krb5_context context, const krb5_enctype *etypes);
 
@@ -259,6 +259,7 @@ static int krb5_instantiate(CONF_SECTION *conf, void *instance)
        krb5_verify_init_creds_opt_init(inst->vic_options);
        krb5_verify_init_creds_opt_set_ap_req_nofail(inst->vic_options, true);
 
+#  ifdef KRB5_IS_THREAD_SAFE
        /*
         *      Explicitly set enctypes to work around bug in krb5_copy_context
         */
@@ -273,6 +274,7 @@ static int krb5_instantiate(CONF_SECTION *conf, void *instance)
                krb5_set_default_tgs_ktypes(inst->context, enctypes);
                krb5_free_ktypes(inst->context, enctypes);
        }
+#  endif
 #endif
 
        return 0;