summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-15 13:24:28 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-11-05 00:14:05 +0100
commit74254ab3c4d6b9ca63488245bc88db7cf7689084 (patch)
treee5356e875a144b15e72e9be1fcb9976522a68e38 /src/util
parent3d05f3430006f6fe2f623c07eecfbe734519df5e (diff)
downloadsssd-74254ab3c4d6b9ca63488245bc88db7cf7689084.tar.gz
sssd-74254ab3c4d6b9ca63488245bc88db7cf7689084.tar.xz
sssd-74254ab3c4d6b9ca63488245bc88db7cf7689084.zip
Add replacement for krb5_find_authdata()
krb5_find_authdata() is only available in MIT Kerberos 1.10 or higher. To allow sssd to be compiled on platform with lower version of MIT Kerberos a replacement call is added. Please note that on those platform the replacement call will only return an error. If the krb5_find_authdata functionality is really needed on those platform it must be implemented by a different patch.
Diffstat (limited to 'src/util')
-rw-r--r--src/util/sss_krb5.c14
-rw-r--r--src/util/sss_krb5.h5
2 files changed, 19 insertions, 0 deletions
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index c36a13748..cbee96e86 100644
--- a/src/util/sss_krb5.c
+++ b/src/util/sss_krb5.c
@@ -990,3 +990,17 @@ sss_child_set_krb5_tracing(krb5_context ctx)
return 0;
}
#endif /* HAVE_KRB5_SET_TRACE_CALLBACK */
+
+krb5_error_code sss_krb5_find_authdata(krb5_context context,
+ krb5_authdata *const *ticket_authdata,
+ krb5_authdata *const *ap_req_authdata,
+ krb5_authdatatype ad_type,
+ krb5_authdata ***results)
+{
+#ifdef HAVE_KRB5_FIND_AUTHDATA
+ return krb5_find_authdata(context, ticket_authdata, ap_req_authdata,
+ ad_type, results);
+#else
+ return ENOTSUP;
+#endif
+}
diff --git a/src/util/sss_krb5.h b/src/util/sss_krb5.h
index c16dab59a..6a61f0ea8 100644
--- a/src/util/sss_krb5.h
+++ b/src/util/sss_krb5.h
@@ -170,4 +170,9 @@ typedef krb5_times sss_krb5_ticket_times;
/* Redirect libkrb5 tracing towards our DEBUG statements */
errno_t sss_child_set_krb5_tracing(krb5_context ctx);
+krb5_error_code sss_krb5_find_authdata(krb5_context context,
+ krb5_authdata *const *ticket_authdata,
+ krb5_authdata *const *ap_req_authdata,
+ krb5_authdatatype ad_type,
+ krb5_authdata ***results);
#endif /* __SSS_KRB5_H__ */