From 234e3805c524a7432caed8be328df6e2fbfe9afb Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 27 Feb 2013 14:25:37 -0800 Subject: Update to rra-c-util 4.8 and C TAP Harness 1.12 Update to rra-c-util 4.8: * Look for krb5-config in /usr/kerberos/bin after the user's PATH. * Kerberos library probing fixes without transitive shared libraries. * Fix Autoconf warnings when probing for AIX's bundled Kerberos. * Avoid using krb5-config if --with-{krb5,gssapi}-{include,lib} given. * Correctly remove -I/usr/include from Kerberos and GSS-API flags. * Build on systems where krb5/krb5.h exists but krb5.h does not. * Pass --deps to krb5-config unless --enable-reduced-depends was used. * Do not use krb5-config results unless gssapi is supported. * Fix probing for Heimdal's libroken to work with older versions. * Update warning flags for GCC 4.6.1. * Update utility library and test suite for newer GCC warnings. * Fix broken GCC attribute markers causing compilation problems. * Suppress warnings on compilers that support gcc's __attribute__. * Add notices to all files copied over from rra-c-util. * Fix warnings when reporting memory allocation failure in messages.c. * Fix message utility library compiler warnings on 64-bit systems. * Include strings.h for additional POSIX functions where found. * Use an atexit handler to clean up after Kerberos tests. * Kerberos test configuration now goes in tests/config. * The principal of the test keytab is determined automatically. * Simplify the test suite calls for Kerberos and remctl tests. * Check for a missing ssize_t. * Improve the xstrndup utility function. * Checked asprintf variants are now void functions and cannot fail. * Fix use of long long in portable/mkstemp.c. * Fix test suite portability to Solaris. * Substantial improvements to the POD syntax and spelling checks. Update to C TAP Harness 1.12: * Fix compliation of runtests with more aggressive warnings. * Add a more complete usage message and a -h command-line flag. * Flush stderr before printing output from tests. * Better handle running shell tests without BUILD and SOURCE set. * Fix runtests to honor -s even if BUILD and -b aren't given. * runtests now frees all allocated resources on exit. * Only use feature-test macros when requested or built with gcc -ansi. * Drop is_double from the C TAP library to avoid requiring -lm. * Avoid using local in the shell libtap.sh library. * Suppress warnings on compilers that support gcc's __attribute__. Change-Id: I394294d5486ac1ce265c7713bec71a148aaaf1ce Reviewed-on: https://gerrit.stanford.edu/841 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- tests/config/README | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/config/README (limited to 'tests/config/README') diff --git a/tests/config/README b/tests/config/README new file mode 100644 index 0000000..2992a11 --- /dev/null +++ b/tests/config/README @@ -0,0 +1,24 @@ +This directory contains configuration required to run the complete wallet +test suite. If there is no configuration in this directory, some of the +tests will be skipped. To enable the full test suite, create the +following files: + +keytab + + A valid Kerberos keytab for a principal, preferrably in your local + realm. This will be used to test network interactions that require + Kerberos authentication. + +principal + + The name of the Kerberos principal whose keys are stored in keytab. + +password + + This file should contain two lines. The first line is the + fully-qualified principal (including the realm) of a Kerberos + principal to use for testing authentication. The second line is + the password for that principal. The realm of the principal must + be configured in your system krb5.conf file or in DNS configuration + picked up by your Kerberos libraries and must be in the same realm as + the keytab above or have valid cross-realm trust to it. -- cgit v1.2.3 From 4fb142ff9f04d32e18027f3e458226d3ac2f60c3 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Wed, 27 Feb 2013 15:35:32 -0800 Subject: Update test configuration documentation Remove the old tests/data/README documentation and move the note about krb5.conf into tests/config/README. (This should change later to use tests/config for that file.) Add a license statement to that file. Create an empty tests/config directory in the build tree if the build directory is not the source directory. Change-Id: Idf466e32cd114841c45f58dba47b11282467ec8f Reviewed-on: https://gerrit.stanford.edu/848 Reviewed-by: Russ Allbery Tested-by: Russ Allbery --- configure.ac | 2 ++ tests/config/README | 19 +++++++++++++++++++ tests/data/README | 33 --------------------------------- 3 files changed, 21 insertions(+), 33 deletions(-) delete mode 100644 tests/data/README (limited to 'tests/config/README') diff --git a/configure.ac b/configure.ac index 4fc218b..e417a5e 100644 --- a/configure.ac +++ b/configure.ac @@ -70,4 +70,6 @@ AC_CONFIG_FILES([tests/client/basic-t], [chmod +x tests/client/basic-t]) AC_CONFIG_FILES([tests/client/full-t], [chmod +x tests/client/full-t]) AC_CONFIG_FILES([tests/client/prompt-t], [chmod +x tests/client/prompt-t]) AC_CONFIG_FILES([tests/client/rekey-t], [chmod +x tests/client/rekey-t]) +AC_CONFIG_COMMANDS([tests/config], + [test -d tests/config || mkdir tests/config]) AC_OUTPUT diff --git a/tests/config/README b/tests/config/README index 2992a11..cedaccf 100644 --- a/tests/config/README +++ b/tests/config/README @@ -22,3 +22,22 @@ password be configured in your system krb5.conf file or in DNS configuration picked up by your Kerberos libraries and must be in the same realm as the keytab above or have valid cross-realm trust to it. + +If you are building in a different directory tree than the source tree, +don't put the files in this directory. Instead, after running configure, +you will have an empty tests/config directory in your build tree. Put the +keytab and principal files in that directory instead. + +If your krb5.conf file is not in /etc or /usr/local/etc, put a copy of +your krb5.conf file in the tests/data directory. The tests need to +generate a modified copy in order to test some behavior. + +----- + +Copyright 2013 + The Board of Trustees of the Leland Stanford Junior University + +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. diff --git a/tests/data/README b/tests/data/README deleted file mode 100644 index f5ebf07..0000000 --- a/tests/data/README +++ /dev/null @@ -1,33 +0,0 @@ -This directory contains data used by wallet's test suite. To enable tests -that require GSS-API authentication and a working end-to-end Kerberos -environment, create the K5 keytab that will be used for both the server -and the client and put it in this directory as test.keytab. Then, create -a file named test.principal and in it put the principal name corresponding -to the key in the keytab on a single line ending with a newline. - -The presence of these two files will enable the tests that actually do -GSS-API authentication. - -If your krb5.conf file is not in /etc or /usr/local/etc, put a copy of -your krb5.conf file in this directory. The tests need to generate a -modified copy in order to test some behavior. - -To enable tests of password prompting, create a file named test.password -that contains two lines. The first line should be a test principal and -the second line should be the password for that principal. The newline is -not taken to be part of the password. - -To enable tests of kasetkey (assuming that you've configured wallet with ---with-afs), create a K4 srvtab with ADMIN access to an AFS kaserver and -put it in test.srvtab. Then, put the fully-qualified K4 principal name -corresponding to that keytab in test.admin. The realm used for AFS -kaserver testing will be derived from the realm of that principal name. - -If you are building in a different directory tree than the source tree, -don't put the files in this directory. Instead, after running configure, -you will have an empty tests/data directory in your build tree. Put the -test.keytab, test.principal, and krb5.conf (if necessary) files in that -directory instead. - -Note that to successfully run much of the test suite, you will need to have -remctld installed on the system running the tests. -- cgit v1.2.3