summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-15 13:24:28 +0200
committerSumit Bose <sbose@redhat.com>2012-10-26 10:32:05 +0200
commit7219ef88751bb05edd77629b8068330bb6d9b117 (patch)
tree02d3578662c3add07ac5aca9e1044fe1a08541c7 /src
parent28269b2c1fa38e4579853b7afbe30381a8ab8912 (diff)
downloadsssd-7219ef88751bb05edd77629b8068330bb6d9b117.tar.gz
sssd-7219ef88751bb05edd77629b8068330bb6d9b117.tar.bz2
sssd-7219ef88751bb05edd77629b8068330bb6d9b117.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')
-rw-r--r--src/external/krb5.m41
-rw-r--r--src/util/sss_krb5.c14
-rw-r--r--src/util/sss_krb5.h5
3 files changed, 20 insertions, 0 deletions
diff --git a/src/external/krb5.m4 b/src/external/krb5.m4
index cb420aae..5bc87112 100644
--- a/src/external/krb5.m4
+++ b/src/external/krb5.m4
@@ -60,6 +60,7 @@ AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
krb5_cc_cache_match \
krb5_timestamp_to_sfstring \
krb5_set_trace_callback \
+ krb5_find_authdata \
krb5_cc_get_full_name])
CFLAGS=$SAVE_CFLAGS
LIBS=$SAVE_LIBS
diff --git a/src/util/sss_krb5.c b/src/util/sss_krb5.c
index c36a1374..cbee96e8 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 c16dab59..6a61f0ea 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__ */