s3/profiling: don't use CLOCK_PROCESS_CPUTIME_ID
[Samba/gebeck_regimport.git] / source3 / include / smb_krb5.h
blob0a6ba79038a18c56b92fe7d63ca57b98cb5a44ad
1 #ifndef _HEADER_smb_krb5_h
2 #define _HEADER_smb_krb5_h
4 #define KRB5_PRIVATE 1 /* this file uses PRIVATE interfaces! */
5 /* this file uses DEPRECATED interfaces! */
7 #define ADS_IGNORE_PRINCIPAL "not_defined_in_RFC4178@please_ignore"
9 #if defined(HAVE_KRB5_DEPRECATED_WITH_IDENTIFIER)
10 #define KRB5_DEPRECATED 1
11 #else
12 #define KRB5_DEPRECATED
13 #endif
15 #if HAVE_KRB5_H
16 #include <krb5.h>
17 #endif
19 #ifndef KRB5_ADDR_NETBIOS
20 #define KRB5_ADDR_NETBIOS 0x14
21 #endif
23 #ifndef KRB5KRB_ERR_RESPONSE_TOO_BIG
24 #define KRB5KRB_ERR_RESPONSE_TOO_BIG (-1765328332L)
25 #endif
27 /* Heimdal uses a slightly different name */
28 #if defined(HAVE_ENCTYPE_ARCFOUR_HMAC_MD5) && !defined(HAVE_ENCTYPE_ARCFOUR_HMAC)
29 #define ENCTYPE_ARCFOUR_HMAC ENCTYPE_ARCFOUR_HMAC_MD5
30 #endif
32 /* The older versions of heimdal that don't have this
33 define don't seem to use it anyway. I'm told they
34 always use a subkey */
35 #ifndef HAVE_AP_OPTS_USE_SUBKEY
36 #define AP_OPTS_USE_SUBKEY 0
37 #endif
39 #ifdef HAVE_KRB5
40 typedef struct {
41 #if defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) /* MIT */
42 krb5_address **addrs;
43 #elif defined(HAVE_KRB5_ADDRESSES) /* Heimdal */
44 krb5_addresses *addrs;
45 #else
46 #error UNKNOWN_KRB5_ADDRESS_TYPE
47 #endif /* defined(HAVE_MAGIC_IN_KRB5_ADDRESS) && defined(HAVE_ADDRTYPE_IN_KRB5_ADDRESS) */
48 } smb_krb5_addresses;
50 #ifdef HAVE_KRB5_KEYBLOCK_KEYVALUE /* Heimdal */
51 #define KRB5_KEY_TYPE(k) ((k)->keytype)
52 #define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length)
53 #define KRB5_KEY_DATA(k) ((k)->keyvalue.data)
54 #define KRB5_KEY_DATA_CAST void
55 #else /* MIT */
56 #define KRB5_KEY_TYPE(k) ((k)->enctype)
57 #define KRB5_KEY_LENGTH(k) ((k)->length)
58 #define KRB5_KEY_DATA(k) ((k)->contents)
59 #define KRB5_KEY_DATA_CAST krb5_octet
60 #endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */
62 #ifdef HAVE_KRB5_KEYTAB_ENTRY_KEY /* MIT */
63 #define KRB5_KT_KEY(k) (&(k)->key)
64 #elif HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK /* Heimdal */
65 #define KRB5_KT_KEY(k) (&(k)->keyblock)
66 #else
67 #error krb5_keytab_entry has no key or keyblock member
68 #endif /* HAVE_KRB5_KEYTAB_ENTRY_KEY */
70 #endif /* HAVE_KRB5 */
72 #include "krb5_protos.h"
74 #endif /* _HEADER_smb_krb5_h */