From 87ea8f3fae44b5442f1e5303bf1d5326f1bfd5ae Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Fri, 22 Aug 2008 14:52:10 +0200 Subject: kerberos: add KRB5_KT_KEY abstraction macro. Guenther (This used to be commit be846d5383ef31136cca6b11eb6181736fb2e29d) --- source3/include/ads.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/include/ads.h b/source3/include/ads.h index a31141cb25..ebe8be08b6 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -382,12 +382,20 @@ typedef struct { #define KRB5_KEY_DATA(k) ((k)->keyvalue.data) #define KRB5_KEY_DATA_CAST void #else /* MIT */ -#define KRB5_KEY_TYPE(k) ((k)->enctype) +#define KRB5_KEY_TYPE(k) ((k)->enctype) #define KRB5_KEY_LENGTH(k) ((k)->length) #define KRB5_KEY_DATA(k) ((k)->contents) #define KRB5_KEY_DATA_CAST krb5_octet #endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */ +#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEY /* MIT */ +#define KRB5_KT_KEY(k) (&(k)->key) +#elif HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK /* Heimdal */ +#define KRB5_KT_KEY(k) (&(k)->keyblock) +#else +#error krb5_keytab_entry has no key or keyblock member +#endif + enum ads_extended_dn_flags { ADS_EXTENDED_DN_HEX_STRING = 0, ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */ -- cgit