diff options
author | Günther Deschner <gd@samba.org> | 2008-08-22 16:08:00 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2008-08-29 10:59:28 +0200 |
commit | 0380fe9d823d6219441050a9b7298bf039b20742 (patch) | |
tree | f0916b143258e6b48ae01c0207ce3c5764c5a9a6 /source3 | |
parent | d4818c70eb1275e532df0e6882bb761335d2dba2 (diff) | |
download | samba-0380fe9d823d6219441050a9b7298bf039b20742.tar.gz samba-0380fe9d823d6219441050a9b7298bf039b20742.tar.bz2 samba-0380fe9d823d6219441050a9b7298bf039b20742.zip |
kerberos: move the KRB5_KEY* macros to header file.
Guenther
(This used to be commit c28fa17ffffee3e6fd4897c9c6b4937388a19600)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/ads.h | 12 | ||||
-rw-r--r-- | source3/libnet/libnet_keytab.c | 10 | ||||
-rw-r--r-- | source3/libsmb/clikrb5.c | 12 |
3 files changed, 12 insertions, 22 deletions
diff --git a/source3/include/ads.h b/source3/include/ads.h index 0d464b2d81..a31141cb25 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -376,6 +376,18 @@ typedef struct { } smb_krb5_addresses; #endif +#ifdef HAVE_KRB5_KEYBLOCK_KEYVALUE /* Heimdal */ +#define KRB5_KEY_TYPE(k) ((k)->keytype) +#define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length) +#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_LENGTH(k) ((k)->length) +#define KRB5_KEY_DATA(k) ((k)->contents) +#define KRB5_KEY_DATA_CAST krb5_octet +#endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */ + enum ads_extended_dn_flags { ADS_EXTENDED_DN_HEX_STRING = 0, ADS_EXTENDED_DN_STRING = 1 /* not supported on win2k */ diff --git a/source3/libnet/libnet_keytab.c b/source3/libnet/libnet_keytab.c index 6447183958..a4555239da 100644 --- a/source3/libnet/libnet_keytab.c +++ b/source3/libnet/libnet_keytab.c @@ -24,16 +24,6 @@ #ifdef HAVE_KRB5 -#ifdef HAVE_KRB5_KEYBLOCK_KEYVALUE /* Heimdal */ -#define KRB5_KEY_TYPE(k) ((k)->keytype) -#define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length) -#define KRB5_KEY_DATA(k) ((k)->keyvalue.data) -#else /* MIT */ -#define KRB5_KEY_TYPE(k) ((k)->enctype) -#define KRB5_KEY_LENGTH(k) ((k)->length) -#define KRB5_KEY_DATA(k) ((k)->contents) -#endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */ - /**************************************************************** ****************************************************************/ diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c index fa21ad3467..b6fb7cf050 100644 --- a/source3/libsmb/clikrb5.c +++ b/source3/libsmb/clikrb5.c @@ -27,18 +27,6 @@ #ifdef HAVE_KRB5 -#ifdef HAVE_KRB5_KEYBLOCK_KEYVALUE /* Heimdal */ -#define KRB5_KEY_TYPE(k) ((k)->keytype) -#define KRB5_KEY_LENGTH(k) ((k)->keyvalue.length) -#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_LENGTH(k) ((k)->length) -#define KRB5_KEY_DATA(k) ((k)->contents) -#define KRB5_KEY_DATA_CAST krb5_octet -#endif /* HAVE_KRB5_KEYBLOCK_KEYVALUE */ - #define GSSAPI_CHECKSUM 0x8003 /* Checksum type value for Kerberos */ #define GSSAPI_BNDLENGTH 16 /* Bind Length (rfc-1964 pg.3) */ #define GSSAPI_CHECKSUM_SIZE (12+GSSAPI_BNDLENGTH) |