Fix comment typo in server/remctld.c

Change-Id: I580dfdea672c497aedd2e34eabb24d572d197d4b
Reviewed-on: https://gerrit.stanford.edu/271
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
TODO updates

Remove implemented items.  Add a configurable inactivity timeout to
the things waiting for global configuration.  Remove allowing the
standalone server to listen on the legacy port; the legacy port is
going to go away.

Change-Id: I3accfd913224245c9afe33cd1eaa18bfec66dc1c
Reviewed-on: https://gerrit.stanford.edu/272
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Fix GSS-API header probing with non-default headers

Fix GSS-API header probes when configure was told to build with a
specific GSS-API library in a non-default path.  Previously, configure
still used the compiler to probe for the correct header names, which
could pick up incorrect headers from the default include path.  Thanks
to Jeffrey Hutzelman for the suggested solution.

Also clean up the way library probes are handled by importing the new
GSS-API probes that will be in rra-c-util 4.3.

Change-Id: Ic94b02ef59004dad191bcd76d9e8eb6e92f4c982
Reviewed-on: https://gerrit.stanford.edu/277
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Fix uninitialized variable in network timeout tests

Change-Id: Iaf63e558ce70de0e89c13ff84a28f7bcf6d0cf5c
Reviewed-on: https://gerrit.stanford.edu/278
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Stop using local in test shell function libraries

Solaris /bin/sh lacks local, even the stripped-down version that
Debian portability requires.  Use a tap_ prefix to variable names
instead.

Change-Id: I46d26d4e3614f7d994c218dec98881d15cd5dc6c
Reviewed-on: https://gerrit.stanford.edu/279
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Fix another uninitialized variable in network timeout tests

Change-Id: Ia9be72ae32654806ed186554131b5eddccdd5e45
Reviewed-on: https://gerrit.stanford.edu/280
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Don't return in a void function in server/invalid-t.c

Even if what's being returned is the "return value" of another
function that returns void, this isn't valid C.  (Oddly, GCC doesn't
care at all.)

Change-Id: I1d521a3235aad50b65e471cd4a5bc66eac21caee
Reviewed-on: https://gerrit.stanford.edu/281
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Use of math library functions requires -lm
Stop using feature-test macros by default

Do not attempt to use feature-test macros unless compiled with gcc's
-ansi flag or PEDANTIC is defined.  Defining _XOPEN_SOURCE 600 on
Solaris 10, which is required for isinf() if feature-test macros are
in use, causes compilation to fail unless the compiler is run in C99
mode due to an ABI change.  The basic TAP library doesn't care about
this distinction and doesn't want to force specific compiler flags, so
avoiding feature-test macros is a better fix.  Thanks to Bob
Friesenhahn for the bug report.
tests/client/ccache: correct test block miscount

If ccache setting is not supported, skip the correct number of tests
(9, not counting the one used up with the error message check)
tests/client/remctl-t: avoid hostname canonicalization

Always give -s "$principal" to prevent the client from canonicalizing the
server hostname, which for these tests is generally something like ::1,
127.0.0.1, or localhost.  Otherwise, error message comparisons may fail
because they assume the hostname will be the one the test provided.
tests/util/gss-tokens: avoid sequence number mismatch

The test for sending a token with timeout effectively constructs a GSS weap
token and then throws it away without doing anything with it.  This gets the
message token sequence numbers out of sync on opposite ends of the GSS-API
context.  Normally this would not be a problem, but some older versions of
Heimdal require strict sequence number ordering on GSS wrap and MIC tokens,
even if message sequencing and replay detection were not requested.  As a
result, after this test the server side of the context will never be able
to successfully receive a token.

To avoid breaking later tests, the tests for sending and receiving tokens
with timeouts and other problems are moved to the end of the test sequence,
where there is nothing left to break.
tests/util/network: Need <signal.h> for SIGTERM
tests/server/bind: Test IPv6 only when it will be used

Before testing whether the server has bound an IPv6 address by default,
determine whether to expected it to do so, by checking whether getaddrinfo()
has returned any IPv6 addresses.
tests/tap/kerberos.sh: Don't quote test_tmpdir output

It turns out Solaris sh has a bug that introduces extra backslashes when
expanding a variable inside a here-document if the command where the
heredoc occurs is ultimately (possibly through additional levels of
functions) part of a quoted command substitution (i.e. "`foo`").  To
avoid problems caused by this, remove quoting from invocations of
test_tmpdir.
Eliminate more use of local in test shell function libraries
Don't worry if we can't remove the tmpdir

Something else may still be using the tmpdir, or have left something behind.
So, ignore the exit status of rmdir, to prevent a dubious test result.
tests/util/network: Avoid passing NULL string to printf
Minor coding style fixes from jhutz's portability changes

Change-Id: I3a4bbc3a2d0e056ad95297ace5e60c3c4c2dab00
Be more paranoid about quoting test_tmpdir in tap/kerberos.sh

Change-Id: Id8e5a2119d3b727d1aa3ea620ec4fe7989da3af2