Import the util layer from rra-c-util, use for heimdal-strength
Rather than rolling our own versions of xmalloc, xstrdup, and die,
import the util layer and use the standard versions of those
functions. Also import the test suite.
We don't really care about portability for krb5_get_error_message
since we effectively will require that it exists, but may as well
use the same structure as other code. Add some other functions
that we're using (or should be using).
Add support for new MIT plugin interface, drop old patch
Add support for the MIT Kerberos password quality plugin interface,
available in MIT Kerberos 1.9 and later, contributed by Greg Hudson
and MIT. Drop the patch for MIT Kerberos 1.4 (and hence support for
versions of MIT Kerberos prior to 1.9).
Fix the path to the Heimdal password strength header
Expect the Heimdal password strength checking plugin header in
kadm5/kadm5-pwcheck.h instead of outside of the kadm5 directory. This
is the path used by current versions of Heimdal.
* Probe for Kerberos headers using file checks instead of compiles.
* Improve probe for the Heimdal libroken library.
* Always build with large file support.
* Conditionally call AM_PROG_AR for portability to new Autotools.
Update to C TAP Harness 2.2:
* Allow more easily running single programs under tests/runtests.
* Flush the output from the test harness after each test.
Make the simplicity check dependent on password length
CrackLib checks for passwords where a character is a simple increment
or decrement of the previous character. In previous versions, the
embedded version of CrackLib allowed at most four such occurrences in
the entire password. This results in false positives on long
passphrases, since such accidental letter relationships aren't
uncommon in human languages. Change the embedded CrackLib to allow
one such simple increment for every three characters in the password,
which tightens the check somewhat for shorter passwords and loosens it
considerably for longer passwords.
Russ Allbery [Fri, 11 May 2012 21:07:18 +0000 (14:07 -0700)]
Update to rra-c-util 4.4 and C TAP Harness 1.12
Update to rra-c-util 4.4:
* Use PATH_KRB5_CONFIG to override krb5-config location.
* Fix probing for ibm_svc/krb5_svc.h on AIX.
* Support Heimdal libraries without libroken, like OpenBSD.
* Fix manual Kerberos library probing without transitive dependencies.
* Support systems that only have krb5/krb5.h.
* Pass --deps to krb5-config in the non-reduced-dependencies case.
* Silence __attribute__ warnings on more compilers.
* Include strings.h where available for additional prototypes.
* Update warning flags for make warnings.
* Flesh out MAINTCLEANFILES to remove autogen results.
* Add notices to all files copied from rra-c-util.
Update to C TAP Harness 1.12:
* Drop is_double from the C TAP library to avoid requiring -lm.
* Avoid using local in the shell libtap.sh library.
* Silence __attribute__ warnings on more compilers.
* runtests now frees all allocated resources on exit.
* Add bmalloc, bcalloc, brealloc, and bstrdup TAP library functions.
* Fix runtests to still honor SOURCE and -s without BUILD and -b.
* Add tests/HOWTO documenting how to add new tests.
* More correct handling of system-specific errors in output checking.
* Ensure correct output ordering in test results.
* Add -h and a better usage message to tests/runtests.
* Add diag and sysdiag functions to the basic TAP library.
* Clean up data types in the basic C TAP library.
* Add the GCC nonnull attribute to the TAP library bail functions.
Russ Allbery [Fri, 11 May 2012 20:31:58 +0000 (13:31 -0700)]
Update test suite for new length restriction, new username check
Make the dictionary word we use to test longer now that we require
at least eight character passwords. Also update the whitespace
tests. Add tests for rejecting the username with digits appended.
Russ Allbery [Sun, 14 Mar 2010 23:42:34 +0000 (16:42 -0700)]
Use the correct variable sizes for int8/int16/int32 in CrackLib
Fix variable sizes in the embedded CrackLib on 64-bit platforms. This
may fix interoperability problems with databases created on platforms
with a different native integer size. Thanks, Karl Lehnberger and
Benj Carson.
Russ Allbery [Wed, 17 Feb 2010 04:51:27 +0000 (20:51 -0800)]
Create a separate heimdal-strength package
* Create a separate heimdal-strength package containing only the
external password check program for Heimdal. The Heimdal version of
the libkadm5srv plugin isn't packaged for the time being.
Russ Allbery [Fri, 15 Jan 2010 07:20:14 +0000 (23:20 -0800)]
Update README, add documentation for Heimdal
Remove the beta notification for this software, since we've been running
it in production for a while. Explain more clearly how it compares to
just embedding CrackLib. Add configuration instructions for Heimdal and
details about the new external password quality check function.
Russ Allbery [Thu, 14 Jan 2010 21:25:16 +0000 (13:25 -0800)]
Allow for Heimdal passing the principal as argv[0] to external check
Current versions of Heimdal appear to pass the principal as the first
element of argv rather than passing the program name as the first element
and the principal as the first conventional argument. Allow for this in
the external check implementation.
Russ Allbery [Thu, 7 Jan 2010 04:50:08 +0000 (20:50 -0800)]
Add new plugin API for MIT Kerberos
Add a new plugin API for MIT Kerberos modelled after the plugin API
used for other MIT Kerberos plugins. Thanks to Marcus Watts for
substantial research and contributions to the interface design.
Russ Allbery [Thu, 10 Dec 2009 01:13:49 +0000 (17:13 -0800)]
Add a basic portability library
Add a basic portability library that ensures that functions like snprintf
and strlcpy are available, since I want to use them in the plugin code.
Synchronized with rra-c-util 2.1.
Russ Allbery [Thu, 19 Nov 2009 06:26:02 +0000 (22:26 -0800)]
Fixed the padding written by the packer utility
Fixed the data format written by the included packer program to add
enough nul bytes at the end of the data. Previously, there was not
enough trailing nul bytes for the expected input format, leading to
uninitialized memory reads in the password lookup.
Russ Allbery [Thu, 15 Oct 2009 03:01:51 +0000 (20:01 -0700)]
Update build system for current standards
Update the Autoconf requirement to 2.64 and the Automake requirement to
1.11. Enable optional silent rules and news file checking. Add my
normal warnings target. Use the m4 directory for Autoconf macros and
move supporting programs from tools to build-aux. Remove the increase
of warnings with gcc in favor of my normal make warnings approach.
Russ Allbery [Thu, 15 Oct 2009 03:00:57 +0000 (20:00 -0700)]
Clean up compiler warnings in the cracklib directory
This is more divergence from the original, which is somewhat annoying,
but it's nice to be able to build the whole package with the normal set
of warnings.
Russ Allbery [Wed, 14 Oct 2009 23:12:43 +0000 (16:12 -0700)]
Move licensing information to a separate LICENSE file
Rewrite the licensing information using the standard LICENSE file format
that I now use with my other packages. Include licensing information for
the Autotools files that are distributed with the package.
The check of the password against the principal checked against the
fully-qualified principal, which is not the usual problem.
Additionally check that the password doesn't match the principal with
the realm removed or the reverse of that (case-insensitive).