From c138111a3c27863308b6552a5527a9e821a3dc11 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 17 May 2020 17:05:30 -0700 Subject: Update to rra-c-util 8.2 and C TAP Harness 4.7 Update to rra-c-util 8.2: * Implement explicit_bzero with memset if it is not available. * Reformat all C source using clang-format 10. * Work around Test::Strict not skipping .git directories. * Fix warnings with perltidy 20190601 and Perl::Critic 1.134. * Fix warnings with Clang 10, GCC 10, and the Clang static analyzer. Update to C TAP Harness 4.7: * Fix warnings with GCC 10. * Reformat all C source using clang-format 10. * Fixed malloc error checking in bstrndup. --- portable/krb5.h | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'portable/krb5.h') diff --git a/portable/krb5.h b/portable/krb5.h index d8884a7..53092e3 100644 --- a/portable/krb5.h +++ b/portable/krb5.h @@ -20,7 +20,7 @@ * which can be found at . * * Written by Russ Allbery - * Copyright 2015, 2017 Russ Allbery + * Copyright 2015, 2017, 2020 Russ Allbery * Copyright 2010-2014 * The Board of Trustees of the Leland Stanford Junior University * @@ -40,16 +40,16 @@ * stripped-down version of config.h with a different name. */ #ifndef CONFIG_H_INCLUDED -# include +# include #endif #include #if defined(HAVE_KRB5_H) -# include +# include #elif defined(HAVE_KERBEROSV5_KRB5_H) -# include +# include #else -# include +# include #endif #include @@ -76,7 +76,12 @@ void krb5_appdefault_string(krb5_context, const char *, const krb5_data *, * Kerberos library. Use krb5_xfree instead. */ #ifndef HAVE_KRB5_FREE_DEFAULT_REALM -# define krb5_free_default_realm(c, r) krb5_xfree(r) +# define krb5_free_default_realm(c, r) krb5_xfree(r) +#endif + +/* Heimdal: krb5_xfree, MIT: krb5_free_unparsed_name. */ +#ifdef HAVE_KRB5_XFREE +# define krb5_free_unparsed_name(c, p) krb5_xfree(p) #endif /* @@ -105,16 +110,17 @@ krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context, krb5_get_init_creds_opt **); #endif #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE -# ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS -# define krb5_get_init_creds_opt_free(c, o) krb5_get_init_creds_opt_free(o) -# endif +# ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS +# define krb5_get_init_creds_opt_free(c, o) \ + krb5_get_init_creds_opt_free(o) +# endif #else -# define krb5_get_init_creds_opt_free(c, o) free(o) +# define krb5_get_init_creds_opt_free(c, o) free(o) #endif /* Heimdal-specific. */ #ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS -# define krb5_get_init_creds_opt_set_default_flags(c, p, r, o) /* empty */ +# define krb5_get_init_creds_opt_set_default_flags(c, p, r, o) /* empty */ #endif /* @@ -123,7 +129,7 @@ krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context, * present in older MIT Kerberos libraries but not prototyped. */ #if !HAVE_DECL_KRB5_KT_FREE_ENTRY -# define krb5_kt_free_entry(c, e) krb5_free_keytab_entry_contents((c), (e)) +# define krb5_kt_free_entry(c, e) krb5_free_keytab_entry_contents((c), (e)) #endif /* -- cgit v1.2.3