diff options
author | Tim Potter <tpot@samba.org> | 2003-10-17 04:59:07 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2003-10-17 04:59:07 +0000 |
commit | 72b9e5571a0cdb7e4587324f42394e04a2cfa3db (patch) | |
tree | d2634b0fd2612016ced1c36e40bfac26483e6880 | |
parent | 450bc69ab36aff1e3011beaacced84de1a57a72a (diff) | |
download | samba-72b9e5571a0cdb7e4587324f42394e04a2cfa3db.tar.gz samba-72b9e5571a0cdb7e4587324f42394e04a2cfa3db.tar.bz2 samba-72b9e5571a0cdb7e4587324f42394e04a2cfa3db.zip |
Add configure test for krb5_keytab_entry keyblock vs key member. Bug #636.
(This used to be commit 3daefe9d17fb2c7b1c4d21593465e6788555b0fb)
-rw-r--r-- | source3/configure.in | 9 | ||||
-rw-r--r-- | source3/libads/kerberos_verify.c | 16 |
2 files changed, 21 insertions, 4 deletions
diff --git a/source3/configure.in b/source3/configure.in index 4065f8e40a..6946ab06b3 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -2654,6 +2654,15 @@ if test x"$with_ads_support" != x"no"; then [Whether in-memory keytabs are supported]) fi + AC_CHECK_MEMBER(krb5_keytab_entry.key, + AC_DEFINE(HAVE_KRB5_KEYTAB_ENTRY_KEY, 1, + [Whether krb5_keytab_entry has key member]), [], + [#include <krb5.h>]) + + AC_CHECK_MEMBER(krb5_keytab_entry.keyblock, + AC_DEFINE(HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK, 1, + [Whether krb5_keytab_entry has keyblock member]), [], + [#include <krb5.h>]) if test x"$ac_cv_lib_ext_krb5_krb5_mk_req_extended" = x"yes"; then AC_DEFINE(HAVE_KRB5,1,[Whether to have KRB5 support]) diff --git a/source3/libads/kerberos_verify.c b/source3/libads/kerberos_verify.c index 4ae89aa01f..cdea5a2fe4 100644 --- a/source3/libads/kerberos_verify.c +++ b/source3/libads/kerberos_verify.c @@ -71,10 +71,18 @@ static krb5_error_code create_keytab(krb5_context context, entry.principal = host_princ; entry.vno = kvno; - /* this will have to be detected in configure...heimdal - calls it keyblock, MIT calls it key, but it does not - matter we are creating keytabs with MIT */ - entry.keyblock = *key; + +#if !defined(HAVE_KRB5_KEYTAB_ENTRY_KEY) && !defined(HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK) +#error krb5_keytab_entry has no key or keyblock member +#endif + +#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEY /* MIT */ + entry.key = *key; +#endif + +#ifdef HAVE_KRB5_KEYTAB_ENTRY_KEYBLOCK /* Heimdal */ + entry.keyblock = *key; +#endif DEBUG(10,("adding keytab-entry for (%s) with encryption type (%d)\n", host_princ_s, enctypes[i])); |