Russ Allbery [Mon, 9 May 2022 01:34:25 +0000 (18:34 -0700)]
Reorder includes in Ruby extension
Include Ruby's config.h before ours because Ruby unconditionally
defines a bunch of special C macros that can't subsequently be
undefined or redefined. Autoconf's generated config.h handles
this properly, so we can put it second.
Russ Allbery [Sun, 8 May 2022 22:04:32 +0000 (15:04 -0700)]
Document signals supported by remctld
Document sending SIGHUP to remctld when running in stand-alone mode to
ask it to re-read its configuration file, and document that SIGTERM
will cause it to exit. (Fixes #30)
Russ Allbery [Sun, 8 May 2022 20:39:32 +0000 (13:39 -0700)]
Work around cppcheck diagnostic of kerberos_free
cppcheck thinks its argument can be const, which while technically
true would be weird since it invalidates its argument. Free the
passed argument instead of the static variable to avoid this
diagnostic.
Russ Allbery [Mon, 2 May 2022 05:07:00 +0000 (22:07 -0700)]
Mark malloc functions with their deallocators
GCC 11 allows marking functions with their deallocation function
when using the __malloc__ attribute. Add those annotations to the
public and internal interfaces, with portability code to hide the
argument on older compilers.
Russ Allbery [Mon, 2 May 2022 01:49:06 +0000 (18:49 -0700)]
Update DocKnot configuration
Update the DocKnot configuration for the latest DocKnot. Document
that PCRE2 is now supported. Mention the Ruby bindings in another
place where all the bindings were listed. Update the description
to refer to more recent RPC systems that people will be more
familiar with.
Russ Allbery [Mon, 2 May 2022 00:22:55 +0000 (17:22 -0700)]
Document that regexes are not anchored
Document that pcre and regex ACL expressions are not automatically
anchored at the start and end of the principal name, so they should be
explicitly anchored in the configuration unless one intends to allow
partial matches.
Russ Allbery [Mon, 2 May 2022 00:17:22 +0000 (17:17 -0700)]
Add support for PCRE2
Add support for PCRE2 for pcre ACLs and use it by preference over
PCRE1 if it is found. UTF-8 regular expressions are not enabled by
default, but can be enabled by adding (*UTF) to the beginning of the
regular expression.
Russ Allbery [Sun, 1 May 2022 22:18:34 +0000 (15:18 -0700)]
Fix Python 2 mypy testing
This will probably be dropped soon, but for now fix mypy testing
of the Python module with Python 2, which requires an additional
dependency. This should fix a CI failure.
Pick up the changes from the new .clang-format file from
rra-c-util. Reorder some things in util/protocol.h so that
clang-format won't try to indent the value of the header guard
macro.
The Perl libraries and the remctl test suite now require Perl 5.10 or
later.
* Fix IN6_ARE_ADDR_EQUAL Autoconf probe on macOS.
* Fix compiler flag probes with Clang.
* Check that Kerberos headers can be included.
* Fix util/fdflag test on Solaris 11 and OpenBSD.
* Suppress some additional warnings in GCC 10.
There are also lots of formatting changes from the updates to
clang-format and the Perl formatting rules, and various updates
to comments and other non-user-visible changes.
Replace some obsolete macros with their new names. Add configure~
to .gitignore, since Autoconf now generates it. Drop AC_PROG_INSTALL
which no longer seems to be needed (remctl never calls install
directly).
Update my current employer, remove a now-unnecessary DOCTYPE
setting that current xml2rfc complains about, and add the
now-recommended submissionType attribute.
Ken Dreyer [Mon, 19 Jul 2021 14:44:54 +0000 (10:44 -0400)]
Use minitest for Ruby tests
Ruby 1.9+ uses Minitest as the backend for Test::Unit. This shim has
lost some backwards compatibility over time and it no longer works on
Fedora 35. Update the test suite to use minitest directly.
Russ Allbery [Sat, 13 Mar 2021 21:46:33 +0000 (13:46 -0800)]
Suppress another warning building Perl code
Disable implicit-fallthrough warnigns in Clang when building Perl
code, since in at least Perl 5.30 there is inline hash code that
uses this pattern. It has the magic comments, but the latest Clang
has stopped supporting those.
Russ Allbery [Mon, 14 Dec 2020 03:52:05 +0000 (19:52 -0800)]
Add valgrind suppression for Heimdal
Heimdal's gss_acquire_cred leads to a path that stores some
allocated memory in a library variable that intentionally isn't
freed. Add a hopefully-specific-enough pattern to supress that.
Russ Allbery [Mon, 14 Dec 2020 02:32:59 +0000 (18:32 -0800)]
Use -isystem more uniformly for warnings builds
-isystem instead of -I was used to include Kerberos headers for
the libutil build, but not for the client library and some of the
tests that also used Kerberos. Use it more uniformly by adding
KRB5_CPPFLAGS to more compilation rules.
Rename KRB5_CPPFLAGS_GCC to KRB5_CPPFLAGS_WARNINGS since that's
how it's used and sincd Clang also supports -isystem.
Russ Allbery [Mon, 14 Dec 2020 02:12:33 +0000 (18:12 -0800)]
Overhaul GitHub Actions testing
Use local::lib and cache Perl modules to speed up installation
time when repeatedly testing. Disable testing of the Perl modules,
which should speed up installation considerably. Move the list of
apt packages to install to a separate file for easier maintenance.
Fix the list of test dependencies, which was missing some of the
modules that the Perl binding test suite does use.
Russ Allbery [Sun, 13 Dec 2020 20:21:43 +0000 (12:21 -0800)]
Port the PHP extension to PHP 8
Port the PHP extention to PHP 8. This required declaring the
arguments to the functions (which should have been done with PHP 7)
and removing some obsolete constructs.
Russ Allbery [Sun, 9 Aug 2020 04:28:14 +0000 (21:28 -0700)]
Define PY_SSIZE_T_CLEAN for the Python build
Cast all the length arguments from size_t to Py_ssize_t and add
the recommended define to get rid of deprecation warnings. This
requires suppressing warnings about redundant decls.
Russ Allbery [Sun, 9 Aug 2020 03:28:55 +0000 (20:28 -0700)]
Streamline the CI build
Rather than adding the compiler to the matrix, build first with
Clang and then with GCC and only use Kerberos in the matrix. This
will make each build take a bit longer, but consume about half as
many resources.
Add cppcheck to the build for the MIT Kerberos variant (no point in
running it under both types of Kerberos).
Russ Allbery [Sun, 9 Aug 2020 03:49:17 +0000 (20:49 -0700)]
Ignore false positives from old cppcheck
cppcheck 1.82, which is the version in the current Ubuntu image
used by GitHub Actions, doesn't recognize that a variable is
passed to a function because its address is stored in another
struct that is passed to that function.
Russ Allbery [Sun, 9 Aug 2020 02:55:24 +0000 (19:55 -0700)]
Fix new cppcheck errors
Suppress cppcheck for Perl and PHP code, since both use constructs
that cppcheck doesn't understand. Avoid a false positive in the
Ruby code with a simple structural change. Add a suppression for
another constant that comes from an Autoconf define.
Russ Allbery [Sun, 9 Aug 2020 02:48:18 +0000 (19:48 -0700)]
Stop providing an snprintf replacement
Stop providing a replacement for a broken snprintf and assume the libc
version works correctly. This portability code has proven difficult
to maintain, and was only relevant for ancient proprietary UNIX
versions that have been obsolete for many years.
Russ Allbery [Sun, 9 Aug 2020 01:16:50 +0000 (18:16 -0700)]
Switch to GitHub Actions for CI tests
Install a full KDC for both MIT Kerberos and Heimdal and run a
matrix of tests using it. Enable anonymous PKINIT on the KDC so
that remctl anonymous support can be tested.
Russ Allbery [Sun, 9 Aug 2020 00:58:15 +0000 (17:58 -0700)]
Ignore temporary test files for SPDX identifiers
When checking for SPDX identifiers, ignore temporary test files.
This fixes issues when running make check-valgrind, since some of
the valgrind output can be large.
Russ Allbery [Sun, 9 Aug 2020 00:57:10 +0000 (17:57 -0700)]
Update to rra-c-util 8.3 and C TAP Harness 4.7
Update to rra-c-util 8.3:
* Fix Perl style issues found by Perl::Critic::Freenode.
* Fix support for configuring the test suite with a krb5.conf file.
* Fix tests when the system krb5.conf file does not set default_realm.
* Ignore files in tests/config when checking for license identifiers.
* Ignore object files when checking for license identifiers.
Russ Allbery [Sat, 8 Aug 2020 23:57:46 +0000 (16:57 -0700)]
Fix non-Kerberos tests on hosts without IPv4
Fix non-Kerberos network tests on hosts with no IPv4 addresses. In
this case, the network tests for binding all configured addresses will
bind only to IPv6, which broke some prior assumptions in the test
suite. Thanks to Niko Tyni for the bug report. Note that the tests
that require a Kerberos setup will still fail in this scenario, since
they assume remctld will bind to 127.0.0.1 by default.
Russ Allbery [Sat, 8 Aug 2020 23:44:44 +0000 (16:44 -0700)]
Fix compiler warning in tests/runtests.c
The internal xreallocarray implementation did not ensure that the
size of allocated memory was greater than zero. If either n or
size are 0, set them to 1.
Russ Allbery [Sun, 2 Feb 2020 22:41:21 +0000 (14:41 -0800)]
Don't build PHP with Clang on Travis-CI
Clang installed from Ubuntu is built with GCC and therefore uses
asm goto, which isn't supported by Clang yet. Skip building PHP
with Clang to avoid spurious failures.
Russ Allbery [Sun, 2 Feb 2020 22:29:04 +0000 (14:29 -0800)]
Update Perl code to Perl 5.008
Require Perl 5.008 for all Perl code. This was already the stated
minimum version, but some files required 5.006 and some didn't
state a version requirement.
Take advantage of this minimum Perl version to adopt use base
instead of explicit use of @ISA.
Move copyright and license information for Test::Remctl to the
POD documentation like other Perl modules.
Russ Allbery [Wed, 6 Nov 2019 05:01:07 +0000 (21:01 -0800)]
Make typing dependency conditional on Python version
Make the Python install_requires dependency on typing conditional on
Python versions earlier than 3.5 so that setuptools won't attempt to
download typing when it's part of the standard library. Thanks to
Gianfranco Costamagna and Matthias Klose for the bug report.
Russ Allbery [Fri, 25 Oct 2019 03:36:59 +0000 (20:36 -0700)]
Add attributes to remctl.h
Add GCC attributes to the declarations of the libremctl client
functions, which will allow some minor optimization improvements and
better compiler errors about NULL pointers.
Russ Allbery [Thu, 24 Oct 2019 23:59:48 +0000 (16:59 -0700)]
Fix Python build configuration
Skip Python checks if PYTHON is not set, since we can no longer use
the existence of setup.py as a test. Use the Autoconf-discovered
Python instead of the first Python executable in the PATH.