aboutsummaryrefslogtreecommitdiff
path: root/portable/krb5.h
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
commitc138111a3c27863308b6552a5527a9e821a3dc11 (patch)
treefe3c16462bf0213708f20d251a63e5b9bbf2d23f /portable/krb5.h
parentccfbd34d597318215b979338c4cb5d7e4a3f0d6f (diff)
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.
Diffstat (limited to 'portable/krb5.h')
-rw-r--r--portable/krb5.h30
1 files changed, 18 insertions, 12 deletions
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 <https://www.eyrie.org/~eagle/software/rra-c-util/>.
*
* Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2015, 2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015, 2017, 2020 Russ Allbery <eagle@eyrie.org>
* 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 <config.h>
+# include <config.h>
#endif
#include <portable/macros.h>
#if defined(HAVE_KRB5_H)
-# include <krb5.h>
+# include <krb5.h>
#elif defined(HAVE_KERBEROSV5_KRB5_H)
-# include <kerberosv5/krb5.h>
+# include <kerberosv5/krb5.h>
#else
-# include <krb5/krb5.h>
+# include <krb5/krb5.h>
#endif
#include <stdlib.h>
@@ -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
/*