summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2012-05-04 11:02:48 -0400
committerSimo Sorce <idra@samba.org>2012-05-08 06:42:56 +0200
commit3ef95a0b59fa2a9ec5d01398d702bd107f290422 (patch)
treeeaa21d9d6ee10a15d912c20cb60ad57fbcf884f2
parent470cfb34aea693cdb774b648d51ceccda130f329 (diff)
downloadsamba-3ef95a0b59fa2a9ec5d01398d702bd107f290422.tar.gz
samba-3ef95a0b59fa2a9ec5d01398d702bd107f290422.tar.bz2
samba-3ef95a0b59fa2a9ec5d01398d702bd107f290422.zip
krb5samba: Add krb5_free_checksum_contents wrapper
-rw-r--r--lib/krb5_wrap/krb5_samba.c7
-rw-r--r--lib/krb5_wrap/krb5_samba.h7
-rw-r--r--source3/configure.in1
-rwxr-xr-xsource4/heimdal_build/wscript_configure1
-rw-r--r--wscript_configure_krb53
5 files changed, 18 insertions, 1 deletions
diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c
index ddebdd8ebd..cbfaa9c9fb 100644
--- a/lib/krb5_wrap/krb5_samba.c
+++ b/lib/krb5_wrap/krb5_samba.c
@@ -2175,6 +2175,13 @@ krb5_error_code smb_krb5_cc_get_lifetime(krb5_context context,
}
#endif /* HAVE_KRB5_CC_GET_LIFETIME */
+#if !defined(HAVE_KRB5_FREE_CHECKSUM_CONTENTS) && defined(HAVE_FREE_CHECKSUM)
+void smb_krb5_free_checksum_contents(krb5_context ctx, krb5_checksum *cksum)
+{
+ free_Checksum(cksum);
+}
+#endif
+
/*
* smb_krb5_principal_get_realm
*
diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h
index f036e052b3..a164ea34a8 100644
--- a/lib/krb5_wrap/krb5_samba.h
+++ b/lib/krb5_wrap/krb5_samba.h
@@ -251,6 +251,13 @@ krb5_error_code smb_krb5_cc_get_lifetime(krb5_context context,
#error krb5_cc_get_lifetime not available
#endif
+#if defined(HAVE_KRB5_FREE_CHECKSUM_CONTENTS)
+#define smb_krb5_free_checksum_contents krb5_free_checksum_contents
+#elif defined (HAVE_FREE_CHECKSUM)
+void smb_krb5_free_checksum_contents(krb5_context ctx, krb5_checksum *cksum);
+#else
+#error krb5_free_checksum_contents/free_Checksum is not vailable
+#endif
char *smb_krb5_principal_get_realm(krb5_context context,
krb5_principal principal);
diff --git a/source3/configure.in b/source3/configure.in
index edd1d1dfb3..96c7b3ee57 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3618,6 +3618,7 @@ if test x"$with_ads_support" != x"no"; then
AC_CHECK_FUNC_EXT(krb5_build_principal_alloc_va, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_cc_get_lifetime, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(krb5_cc_retrieve_cred, $KRB5_LIBS)
+ AC_CHECK_FUNC_EXT(krb5_free_checksum_contents, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(gss_krb5_import_cred, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(gss_get_name_attribute, $KRB5_LIBS)
AC_CHECK_FUNC_EXT(gsskrb5_extract_authz_data_from_sec_context, $KRB5_LIBS)
diff --git a/source4/heimdal_build/wscript_configure b/source4/heimdal_build/wscript_configure
index 619944d1d4..6fac5fee6a 100755
--- a/source4/heimdal_build/wscript_configure
+++ b/source4/heimdal_build/wscript_configure
@@ -139,6 +139,7 @@ conf.define('HAVE_KRB5_SET_DEFAULT_IN_TKT_ETYPES', 1)
conf.define('HAVE_KRB5_SET_REAL_TIME', 1)
conf.define('HAVE_KRB5_STRING_TO_KEY', 1)
conf.define('HAVE_KRB5_STRING_TO_KEY_SALT', 1)
+conf.define('HAVE_FREE_CHECKSUM', 1)
conf.define('HAVE_LIBKRB5', 1)
conf.define('KRB5_CREDS_OPT_FREE_REQUIRES_CONTEXT', 1)
conf.define('HAVE_ETYPE_IN_ENCRYPTEDDATA', 1)
diff --git a/wscript_configure_krb5 b/wscript_configure_krb5
index 9a2fe1b66c..ae1ff75e47 100644
--- a/wscript_configure_krb5
+++ b/wscript_configure_krb5
@@ -64,7 +64,8 @@ conf.CHECK_FUNCS('''
krb5_get_credentials_for_user krb5_get_host_realm krb5_free_host_realm
krb5_get_init_creds_keyblock krb5_get_init_creds_keytab
krb5_make_principal krb5_build_principal_alloc_va
- krb5_cc_get_lifetime krb5_cc_retrieve_cred''',
+ krb5_cc_get_lifetime krb5_cc_retrieve_cred
+ krb5_free_checksum_contents''',
lib='krb5 k5crypto')
conf.CHECK_DECLS('''krb5_get_credentials_for_user
krb5_auth_con_set_req_cksumtype''',