summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sss_krb5.c13
-rw-r--r--src/util/sss_krb5.h3
2 files changed, 9 insertions, 7 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index 5f3177a9..a954d10a 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -811,15 +811,16 @@ cleanup:
#endif /* HAVE_KRB5_UNPARSE_NAME_FLAGS */
}
-void sss_krb5_get_init_creds_opt_set_canonicalize(krb5_get_init_creds_opt *opts,
+void sss_krb5_get_init_creds_opt_set_canonicalize(krb5_context ctx,
+ krb5_get_init_creds_opt *opts,
int canonicalize)
{
- /* FIXME: The extra check for HAVE_KRB5_TICKET_TIMES is a workaround due to Heimdal
- * defining krb5_get_init_creds_opt_set_canonicalize() with a different set of
- * arguments. We should use a better configure check in the future.
- */
-#if defined(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE) && defined(HAVE_KRB5_TICKET_TIMES)
+#if defined(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE) && \
+ KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE_ARGS == 2
krb5_get_init_creds_opt_set_canonicalize(opts, canonicalize);
+#elif defined(HAVE_KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE) && \
+ KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE_ARGS == 3
+ (void) krb5_get_init_creds_opt_set_canonicalize(ctx, opts, canonicalize);
#else
DEBUG(SSSDBG_OP_FAILURE, ("Kerberos principal canonicalization is not available!\n"));
#endif
diff --git a/src/util/sss_krb5.h b/src/util/sss_krb5.h
index 2481dc12..c7b9a69f 100644
--- a/src/util/sss_krb5.h
+++ b/src/util/sss_krb5.h
@@ -138,7 +138,8 @@ krb5_error_code
sss_krb5_unparse_name_flags(krb5_context context, krb5_const_principal principal,
int flags, char **name);
-void sss_krb5_get_init_creds_opt_set_canonicalize(krb5_get_init_creds_opt *opts,
+void sss_krb5_get_init_creds_opt_set_canonicalize(krb5_context ctx,
+ krb5_get_init_creds_opt *opts,
int canonicalize);
enum sss_krb5_cc_type {