Skip to content

Commit

Permalink
Only apply hack if rlm_krb5 was compiled thread capable
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Dec 12, 2013
1 parent 3b4afb1 commit b44860d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/rlm_krb5/rlm_krb5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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
*/
Expand All @@ -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;
Expand Down

0 comments on commit b44860d

Please sign in to comment.