summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-02-19 03:19:30 +0000
committerJim McDonough <jmcd@samba.org>2003-02-19 03:19:30 +0000
commit3b541bdcfe14d30d961a5de20d382af179c381ee (patch)
tree75570f3debc5d95fd3b6041d4924eec01ec71b73
parentb63edf9a28cf81536d45fbbe8021683262ff07a2 (diff)
downloadsamba-3b541bdcfe14d30d961a5de20d382af179c381ee.tar.gz
samba-3b541bdcfe14d30d961a5de20d382af179c381ee.tar.bz2
samba-3b541bdcfe14d30d961a5de20d382af179c381ee.zip
Get non-krb systems to compile. How the heck do I keep something from being sucked into proto.h?
(This used to be commit 7e84497882df5bf933ab7ae7fe9af3728393202c)
-rw-r--r--source3/include/includes.h2
-rw-r--r--source3/libsmb/clikrb5.c17
2 files changed, 10 insertions, 9 deletions
diff --git a/source3/include/includes.h b/source3/include/includes.h
index c5738f0a61..bb78ae0780 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -1229,7 +1229,7 @@ void get_auth_data_from_tkt(DATA_BLOB *auth_data, krb5_ticket *tkt);
krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt);
krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters);
krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes);
-void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes);
+krb5_error_code free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes);
#endif /* HAVE_KRB5 */
#endif /* _INCLUDES_H */
diff --git a/source3/libsmb/clikrb5.c b/source3/libsmb/clikrb5.c
index c13f663381..2e07dfdb66 100644
--- a/source3/libsmb/clikrb5.c
+++ b/source3/libsmb/clikrb5.c
@@ -127,17 +127,18 @@ krb5_error_code get_kerberos_allowed_etypes(krb5_context context,
__ERROR_XX_UNKNOWN_GET_ENCTYPES_FUNCTIONS
#endif
-#if defined(HAVE_KRB5_FREE_KTYPES)
-void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes)
+ /* the following is defined as krb5_error_code to keep it from
+ being sucked into proto.h */
+krb5_error_code free_kerberos_etypes(krb5_context context,
+ krb5_enctype *enctypes)
{
- return krb5_free_ktypes(context, enctypes);
-}
+#if defined(HAVE_KRB5_FREE_KTYPES)
+ krb5_free_ktypes(context, enctypes);
#else
-void free_kerberos_etypes(krb5_context context, krb5_enctype *enctypes)
-{
- return free(enctypes);
-}
+ SAFE_FREE(enctypes);
#endif
+ return 0;
+}
#if defined(HAVE_KRB5_AUTH_CON_SETKEY) && !defined(HAVE_KRB5_AUTH_CON_SETUSERUSERKEY)
krb5_error_code krb5_auth_con_setuseruserkey(krb5_context context,