From bdcb3741db27d6b773ce7cdf05aab063a70ea100 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 27 May 2018 20:59:59 -0700 Subject: Update to rra-c-util 7.2 and C TAP Harness 4.3 Update to rra-c-util 7.2: * Improve configure output for krb5-config testing. * Define UINT32_MAX for systems that don't have it. * Add SPDX-License-Identifier headers to all substantial source files. * Fix new warnings from GCC 7 and Clang warnings. * Require Test::Strict 0.25 or later to run those tests. * Fix off-by-one error in return-value checks for snprintf. * Use Autoconf to probe for supported warning flags. * Fix running module-version-t -u with current versions of Perl. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD. Update to C TAP Harness 4.3: * Add support for valgrind and libtool in test lists. * Report test failures as left and right, not wanted and expected. * Fix string comparisons with NULL pointers and the string "(null)". * Add SPDX-License-Identifier headers to all substantial source files. * Avoid zero-length realloc allocations in breallocarray. * Fix new warnings from GCC 7 and Clang warnings. * Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD. --- portable/krb5-extra.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'portable/krb5-extra.c') diff --git a/portable/krb5-extra.c b/portable/krb5-extra.c index c8309a4..9de8e65 100644 --- a/portable/krb5-extra.c +++ b/portable/krb5-extra.c @@ -7,17 +7,19 @@ * Kerberos libraries are fully capable, this file will be skipped. * * The canonical version of this file is maintained in the rra-c-util package, - * which can be found at . + * which can be found at . * * Written by Russ Allbery + * Copyright 2015-2016, 2018 Russ Allbery + * Copyright 2010-2012, 2014 + * The Board of Trustees of the Leland Stanford Junior University * - * The authors hereby relinquish any claim to any copyright that they may have - * in this work, whether granted under contract or by operation of law or - * international treaty, and hereby commit to the public, at large, that they - * shall not, at any time in the future, seek to enforce any copyright in this - * work against any person or entity, or prevent any person or entity from - * copying, publishing, distributing or creating derivative works of this - * work. + * Copying and distribution of this file, with or without modification, are + * permitted in any medium without royalty provided the copyright notice and + * this notice are preserved. This file is offered as-is, without any + * warranty. + * + * SPDX-License-Identifier: FSFAP */ #include @@ -49,7 +51,10 @@ * This string is returned for unknown error messages. We use a static * variable so that we can be sure not to free it. */ +#if !defined(HAVE_KRB5_GET_ERROR_MESSAGE) \ + || !defined(HAVE_KRB5_FREE_ERROR_MESSAGE) static const char error_unknown[] = "unknown error"; +#endif #ifndef HAVE_KRB5_GET_ERROR_MESSAGE @@ -62,7 +67,7 @@ static const char error_unknown[] = "unknown error"; const char * krb5_get_error_message(krb5_context ctx UNUSED, krb5_error_code code UNUSED) { - const char *msg = NULL; + const char *msg; # if defined(HAVE_KRB5_GET_ERROR_STRING) msg = krb5_get_error_string(ctx); -- cgit v1.2.3