]> eyrie.org Git - kerberos/krb5-strength.git/commitdiff
Declare fast forward from 3.1-2 archive/debian/3.2-1 debian/3.2-1
authorRuss Allbery <rra@debian.org>
Sun, 17 May 2020 17:27:44 +0000 (10:27 -0700)
committerRuss Allbery <rra@debian.org>
Sun, 17 May 2020 17:27:44 +0000 (10:27 -0700)
[dgit --overwrite]

154 files changed:
.clang-format [new file with mode: 0644]
.github/workflows/build.yaml [new file with mode: 0644]
.travis.yml [deleted file]
LICENSE
Makefile.am
Makefile.in
NEWS
README
README.md
aclocal.m4
bootstrap
build-aux/ar-lib
build-aux/compile
build-aux/config.guess
build-aux/config.sub
build-aux/depcomp
build-aux/install-sh
build-aux/ltmain.sh
build-aux/missing
ci/README [new file with mode: 0644]
ci/install [new file with mode: 0755]
ci/test [new file with mode: 0755]
config.h.in
configure
configure.ac
cracklib/HISTORY
cracklib/packer.h
cracklib/packlib.c
cracklib/rules.c
debian/changelog
debian/compat [deleted file]
debian/control
debian/copyright
debian/patches/0001-Change-CrackLib-tests-for-system-CrackLib.patch [deleted file]
debian/patches/series [deleted file]
debian/postinst
debian/postrm
debian/upstream/signing-key.asc
docs/krb5-strength.5.in
docs/krb5-strength.pod
docs/metadata/build/middle
docs/metadata/debian/summary [new file with mode: 0644]
docs/metadata/metadata.json
docs/metadata/requirements
docs/metadata/test/suffix [new file with mode: 0644]
m4/cc-flags.m4
m4/clang.m4
m4/cracklib.m4
m4/krb5-config.m4
m4/krb5.m4
m4/lib-depends.m4
m4/lib-helper.m4
m4/lib-pathname.m4
m4/libtool.m4
m4/snprintf.m4
m4/sqlite.m4
m4/tinycdb.m4
m4/vamacros.m4
plugin/cdb.c
plugin/classes.c
plugin/config.c
plugin/cracklib.c
plugin/error.c
plugin/general.c
plugin/heimdal.c
plugin/internal.h
plugin/mit.c
plugin/principal.c
plugin/sqlite.c
plugin/vector.c
portable/asprintf.c
portable/dummy.c
portable/kadmin.h
portable/krb5-extra.c
portable/krb5-profile.c [new file with mode: 0644]
portable/krb5.h
portable/macros.h
portable/mkstemp.c
portable/reallocarray.c
portable/snprintf.c
portable/stdbool.h
portable/strndup.c
portable/system.h
tests/README
tests/TESTS
tests/data/cppcheck.supp [new file with mode: 0644]
tests/data/make-krb5-conf
tests/data/passwords/cdb.c
tests/data/passwords/classes.c
tests/data/passwords/cracklib.c
tests/data/passwords/cracklib.json
tests/data/passwords/history.c
tests/data/passwords/length.c
tests/data/passwords/letter.c
tests/data/passwords/make-c-data
tests/data/passwords/principal.c
tests/data/passwords/sqlite.c
tests/data/passwords/tests.h
tests/data/perlcriticrc
tests/data/perltidyrc
tests/data/valgrind.supp
tests/data/wordlist.sqlite
tests/docs/pod-spelling-t
tests/docs/pod-t
tests/docs/spdx-license-t [new file with mode: 0755]
tests/perl/critic-t
tests/perl/minimum-version-t
tests/perl/strict-t
tests/plugin/heimdal-t.c
tests/plugin/mit-t.c
tests/portable/asprintf-t.c
tests/portable/mkstemp-t.c
tests/portable/reallocarray-t.c
tests/portable/snprintf-t.c
tests/portable/strndup-t.c
tests/runtests.c
tests/style/obsolete-strings-t [moved from tests/docs/urls-t with 81% similarity]
tests/tap/basic.c
tests/tap/basic.h
tests/tap/kerberos.c
tests/tap/kerberos.h
tests/tap/libtap.sh
tests/tap/macros.h
tests/tap/perl/Test/RRA.pm
tests/tap/perl/Test/RRA/Automake.pm
tests/tap/perl/Test/RRA/Config.pm
tests/tap/process.c
tests/tap/process.h
tests/tap/string.c
tests/tap/string.h
tests/tools/heimdal-history-t
tests/tools/heimdal-strength-t
tests/tools/wordlist-cdb-t
tests/tools/wordlist-sqlite-t
tests/tools/wordlist-t
tests/util/messages-krb5-t.c
tests/util/messages-t.c
tests/util/xmalloc-t
tests/util/xmalloc.c
tests/valgrind/logs-t [new file with mode: 0755]
tools/heimdal-history
tools/heimdal-history.1
tools/heimdal-strength.1
tools/heimdal-strength.c
tools/heimdal-strength.pod
tools/krb5-strength-wordlist
tools/krb5-strength-wordlist.1
util/macros.h
util/messages-krb5.c
util/messages-krb5.h
util/messages.c
util/messages.h
util/xmalloc.c
util/xmalloc.h

diff --git a/.clang-format b/.clang-format
new file mode 100644 (file)
index 0000000..993594c
--- /dev/null
@@ -0,0 +1,29 @@
+# Configuration for clang-format automated reformatting.  -*- yaml -*-
+#
+# The canonical version of this file is maintained in the rra-c-util package,
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
+#
+# Copyright 2020 Russ Allbery <eagle@eyrie.org>
+#
+# 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
+
+---
+Language: Cpp
+BasedOnStyle: LLVM
+AlignConsecutiveMacros: true
+AlignEscapedNewlines: Left
+AlwaysBreakAfterReturnType: AllDefinitions
+BreakBeforeBinaryOperators: NonAssignment
+BreakBeforeBraces: WebKit
+ColumnLimit: 79
+IndentPPDirectives: AfterHash
+IndentWidth: 4
+IndentWrappedFunctionNames: false
+MaxEmptyLinesToKeep: 2
+SpaceAfterCStyleCast: true
+---
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644 (file)
index 0000000..1950ff5
--- /dev/null
@@ -0,0 +1,42 @@
+name: build
+
+on:
+  push:
+    branches-ignore:
+      - "debian/**"
+      - "pristine-tar"
+      - "ubuntu/**"
+      - "upstream/**"
+    tags:
+      - "release/*"
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    env:
+      AUTHOR_TESTING: 1
+      C_TAP_VERBOSE: 1
+
+    strategy:
+      fail-fast: false
+      matrix:
+        compiler:
+          - "gcc"
+          - "clang"
+        kerberos:
+          - "mit"
+          - "heimdal"
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: install
+        run: sudo ci/install
+      - name: test
+        run: ci/test
+        env:
+          COMPILER: ${{ matrix.compiler }}
+          KERBEROS: ${{ matrix.kerberos }}
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644 (file)
index d30d2e2..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-language: c
-compiler:
-  - gcc
-dist: trusty
-sudo: required
-
-before_install:
-  - sudo apt-get update -qq
-  - sudo apt-get install libcdb-dev libdb-file-lock-perl libcrypt-pbkdf2-perl libdbd-sqlite3-perl libdbi-perl libgetopt-long-descriptive-perl libipc-run-perl libjson-perl libkrb5-dev libperl6-slurp-perl libreadonly-perl libsqlite3-dev libtest-minimumversion-perl libtest-perl-critic-perl libtest-pod-perl libtest-strict-perl pkg-config sqlite tinycdb
-env: AUTHOR_TESTING=1
-script: ./bootstrap && ./configure && make warnings && make check
-
-branches:
-  only:
-    - master
diff --git a/LICENSE b/LICENSE
index d724bd464fa245f94421f7d5ace3256e65c369c0..7792e110ea62609b9a0874a0d16654174b2169b2 100644 (file)
--- a/LICENSE
+++ b/LICENSE
@@ -10,33 +10,49 @@ Copyright: 2006-2007, 2009-2014
 License: Expat
 
 Files: *
-Copyright: 1993 Alec Muffett
-  2000-2002, 2004-2016 Russ Allbery <eagle@eyrie.org>
+Copyright: 2000-2002, 2004-2020 Russ Allbery <eagle@eyrie.org>
   2001-2002, 2004-2014
     The Board of Trustees of the Leland Stanford Junior University
   2010 the Massachusetts Institute of Technology
 License: Expat
 
+Files: .clang-format docs/krb5-strength.5.in docs/krb5-strength.pod
+ portable/asprintf.c portable/dummy.c portable/kadmin.h
+ portable/krb5-extra.c portable/krb5.h portable/macros.h portable/mkstemp.c
+ portable/reallocarray.c portable/stdbool.h portable/strndup.c
+ portable/system.h tests/README tests/TESTS tests/data/cppcheck.supp
+ tests/data/perltidyrc tests/portable/asprintf-t.c
+ tests/portable/mkstemp-t.c tests/portable/reallocarray-t.c
+ tests/portable/strndup-t.c tools/heimdal-strength.1
+ tools/heimdal-strength.pod util/macros.h
+Copyright: 2006, 2010, 2014-2020 Russ Allbery <eagle@eyrie.org>
+  2006-2014 The Board of Trustees of the Leland Stanford Junior University
+License: all-permissive
+ 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.
+
 Files: Makefile.in
-Copyright: 1994-2014 Free Software Foundation, Inc.
+Copyright: 1994-2020 Free Software Foundation, Inc.
   2007, 2009-2010, 2012-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2016 Russ Allbery <eagle@eyrie.org>
+  2016, 2020 Russ Allbery <eagle@eyrie.org>
 License: FSF-unlimited and Expat
 
 Files: aclocal.m4
-Copyright: 1996-2016 Free Software Foundation, Inc.
+Copyright: 1996-2020 Free Software Foundation, Inc.
   2004 Scott James Remnant <scott@netsplit.com>
   2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 License: FSF-unlimited, and GPL-2+ with Autoconf exception or Expat
 
 Files: build-aux/ar-lib build-aux/compile build-aux/depcomp
  build-aux/missing
-Copyright: 1996-2014 Free Software Foundation, Inc.
+Copyright: 1996-2020 Free Software Foundation, Inc.
 License: GPL-2+ with Autoconf exception or Expat
 
 Files: build-aux/config.guess build-aux/config.sub
-Copyright: 1992-2016 Free Software Foundation, Inc.
+Copyright: 1992-2018 Free Software Foundation, Inc.
 License: GPL-3+ with Autoconf exception or Expat
 
 Files: build-aux/install-sh
@@ -84,24 +100,13 @@ License: Artistic
  .
  See cracklib/LICENCE for the full licensing terms.
 
-Files: docs/krb5-strength.5.in docs/krb5-strength.pod tests/README
- tools/heimdal-strength.1 tools/heimdal-strength.pod
-Copyright: 2006-2007, 2009-2010, 2012-2014
-    The Board of Trustees of the Leland Stanford Junior University
-  2010, 2016 Russ Allbery <eagle@eyrie.org>
-License: all-permissive
- 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.
-
 Files: m4/cc-flags.m4 util/messages.c util/messages.h util/xmalloc.c
  util/xmalloc.h
 Copyright: 1991, 1994-2003 The Internet Software Consortium and Rich Salz
   2004-2006, 2009, 2016 Internet Systems Consortium, Inc.
   2008-2010, 2012-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2015-2016 Russ Allbery <eagle@eyrie.org>
+  2015-2020 Russ Allbery <eagle@eyrie.org>
 License: ISC
  Permission to use, copy, modify, and distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
@@ -120,7 +125,7 @@ Files: m4/clang.m4 m4/cracklib.m4 m4/krb5-config.m4 m4/krb5.m4
  m4/sqlite.m4 m4/tinycdb.m4 m4/vamacros.m4
 Copyright: 2005-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2015 Russ Allbery <eagle@eyrie.org>
+  2015, 2018, 2020 Russ Allbery <eagle@eyrie.org>
 License: unlimited
  This file is free software; the authors give unlimited permission to copy
  and/or distribute it, with or without modifications, as long as this
@@ -134,24 +139,48 @@ Files: m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
 Copyright: 2004-2005, 2007-2009, 2011-2015 Free Software Foundation, Inc.
 License: FSF-unlimited
 
-Files: portable/asprintf.c portable/dummy.c portable/kadmin.h
- portable/krb5-extra.c portable/krb5.h portable/macros.h portable/mkstemp.c
- portable/reallocarray.c portable/stdbool.h portable/strndup.c
- portable/system.h tests/portable/asprintf-t.c tests/portable/mkstemp-t.c
- tests/portable/reallocarray-t.c tests/portable/strndup-t.c util/macros.h
-Copyright: no copyright notice, see License below
-License: rra-public-domain
- 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.
+Files: portable/krb5-profile.c
+Copyright: 1985-2005 the Massachusetts Institute of Technology
+License: MIT-Kerberos
+ Export of this software from the United States of America may require
+ a specific license from the United States Government.  It is the
+ responsibility of any person or organization contemplating export to
+ obtain such a license before exporting.
+ .
+ WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ distribute this software and its documentation for any purpose and
+ without fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright notice and
+ this permission notice appear in supporting documentation, and that
+ the name of M.I.T. not be used in advertising or publicity pertaining
+ to distribution of the software without specific, written prior
+ permission.  Furthermore if you modify this software you must label
+ your software as modified software and not distribute it in such a
+ fashion that it might be confused with the original MIT software.
+ M.I.T. makes no representations about the suitability of this software
+ for any purpose.  It is provided "as is" without express or implied
+ warranty.
+ .
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ .
+ Individual source code files are copyright MIT, Cygnus Support,
+ OpenVision, Oracle, Sun Soft, FundsXpress, and others.
+ .
+ Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
+ and Zephyr are trademarks of the Massachusetts Institute of Technology
+ (MIT).  No commercial use of these trademarks may be made without
+ prior written permission of MIT.
+ .
+ "Commercial use" means use of a name in a product or other for-profit
+ manner.  It does NOT prevent a commercial firm from referring to the
+ MIT trademarks in order to convey information (although in doing so,
+ recognition of their trademark status should be given).
 
 Files: portable/snprintf.c tests/portable/snprintf-t.c
 Copyright: 1995 Patrick Powell
-  2000-2006 Russ Allbery <eagle@eyrie.org>
+  2000-2006, 2018-2020 Russ Allbery <eagle@eyrie.org>
   2001 Hrvoje Niksic
   2009-2010 The Board of Trustees of the Leland Stanford Junior University
 License: Powell-snprintf
@@ -204,7 +233,7 @@ License: GPL-2+ with Autoconf exception
  Public License for more details.
  .
  You should have received a copy of the GNU General Public License along
- with this program.  If not, see <http://www.gnu.org/licenses/>.
+ with this program.  If not, see <https://www.gnu.org/licenses/>.
  .
  As a special exception to the GNU General Public License, if you
  distribute this file as part of a program that contains a configuration
@@ -258,7 +287,7 @@ License: GPL-3+ with Autoconf exception
  Public License for more details.
  .
  You should have received a copy of the GNU General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>.
+ with this program; if not, see <https://www.gnu.org/licenses/>.
  .
  As a special exception to the GNU General Public License, if you
  distribute this file as part of a program that contains a configuration
index 1636bef1e2df39f60cb667bef8aeb129ec2995b3..10b96dd36293e4fa8c37da2262b862388bcebd8d 100644 (file)
@@ -1,29 +1,32 @@
 # Automake makefile for krb5-strength.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2007, 2009, 2010, 2012, 2013, 2014
+# Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
+# Copyright 2007, 2009-2010, 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = .gitignore .travis.yml README.md LICENSE bootstrap                    \
-       cracklib/HISTORY cracklib/LICENCE cracklib/README                   \
-       cracklib/genrules.pl cracklib/mkdict docs/krb5-strength.5.in        \
-       docs/krb5-strength.pod docs/metadata tests/README tests/TESTS       \
+EXTRA_DIST = .clang-format .github .gitignore README.md LICENSE bootstrap   \
+       ci/README ci/install ci/test cracklib/HISTORY cracklib/LICENCE      \
+       cracklib/README cracklib/genrules.pl cracklib/mkdict                \
+       docs/krb5-strength.5.in docs/krb5-strength.pod docs/metadata        \
+       tests/README tests/TESTS tests/data/cppcheck.supp                   \
        tests/data/krb5.conf tests/data/make-krb5-conf tests/data/passwords \
        tests/data/perl.conf tests/data/perlcriticrc tests/data/perltidyrc  \
        tests/data/valgrind.supp tests/data/wordlist                        \
        tests/data/wordlist.cdb tests/data/wordlist.sqlite                  \
-       tests/docs/pod-spelling-t tests/docs/pod-t tests/docs/urls-t        \
-       tests/perl/critic-t tests/perl/minimum-version-t                    \
-       tests/perl/strict-t tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm  \
-       tests/tap/perl/Test/RRA/Config.pm                                   \
+       tests/docs/pod-spelling-t tests/docs/pod-t                          \
+       tests/docs/spdx-license-t tests/perl/critic-t                       \
+       tests/perl/minimum-version-t tests/perl/strict-t                    \
+       tests/style/obsolete-strings-t tests/tap/libtap.sh                  \
+       tests/tap/perl/Test/RRA.pm tests/tap/perl/Test/RRA/Config.pm        \
        tests/tap/perl/Test/RRA/Automake.pm tests/tools/heimdal-history-t   \
        tests/tools/heimdal-strength-t tests/tools/wordlist-cdb-t           \
        tests/tools/wordlist-sqlite-t tests/tools/wordlist-t                \
-       tests/util/xmalloc-t tools/heimdal-strength.pod
+       tests/util/xmalloc-t tests/valgrind/logs-t                          \
+       tools/heimdal-strength.pod
 
 # Do this globally.  Everything needs to find the Kerberos headers and
 # libraries, and if we're using the system CrackLib, TinyCDB, or SQLite, add
@@ -194,17 +197,32 @@ endif
 check-local: $(check_PROGRAMS) tests/data/dictionary.pwd
        cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS
 
-# Used by maintainers to run the main test suite under valgrind.  Suppress
-# the xmalloc and pod-spelling tests because the former won't work properly
-# under valgrind (due to increased memory usage) and the latter is pointless
-# to run under valgrind.  Don't try to trace several of the tests that are
-# written in Perl or shell and test Perl programs.
+# Used by maintainers to check the source code with cppcheck.
+check-cppcheck:
+       cd $(abs_top_srcdir) &&                                         \
+           find . -name .git -prune -o -name '*.[ch]' -print           \
+           | cppcheck -q --force --error-exitcode=2 --file-list=-      \
+               --suppressions-list=tests/data/cppcheck.supp            \
+               --enable=warning,performance,portability,style
+
+# The full path to valgrind and its options, used when doing valgrind
+# testing.
+VALGRIND_COMMAND = $(PATH_VALGRIND) --leak-check=full                  \
+       --trace-children=yes --trace-children-skip=/bin/sh              \
+       --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp       \
+       --log-file=$(abs_top_builddir)/tests/tmp/valgrind/log.%p
+
+# Used by maintainers to run the main test suite under valgrind.
 check-valgrind: $(check_PROGRAMS) tests/data/dictionary.pwd
-       rm -rf $(abs_top_builddir)/tmp-valgrind
-       mkdir $(abs_top_builddir)/tmp-valgrind
-       env RRA_MAINTAINER_TESTS= valgrind --leak-check=full            \
-           --show-reachable=yes --trace-children=yes                   \
-           --log-file=$(abs_top_builddir)/tmp-valgrind/log.%p          \
-           --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp   \
-           --trace-children-skip="/bin/sh,*/cat,*/diff,*/expr,*/grep,*/mkdir,*/rm,*/rmdir,*/sed,*/sleep,*/true,*/wc,*/docs/*-t,*/perl/*-t,*/data/make-krb5-conf,*/tools/heimdal-history-t,*/tools/wordlist*-t" \
-           tests/runtests -l '$(abs_top_srcdir)/tests/TESTS'
+       rm -rf $(abs_top_builddir)/tests/tmp
+       mkdir $(abs_top_builddir)/tests/tmp
+       mkdir $(abs_top_builddir)/tests/tmp/valgrind
+       C_TAP_VALGRIND="$(VALGRIND_COMMAND)" tests/runtests \
+           -l '$(abs_top_srcdir)/tests/TESTS'
+
+# Used by maintainers to reformat all source code using clang-format and
+# excluding some files.
+reformat:
+       find . -name '*.[ch]' \! -name snprintf.c \! -name krb5-profile.c \
+           \! -path './cracklib/*' -print                                \
+           | xargs clang-format-10 -style=file -i
index 4a3b535035ab30df29614bd2a27900a7287b8733..7a74fefa2a9a79c83eb4739ec5e631a18fb45bac 100644 (file)
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.16.2 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2020 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # Automake makefile for krb5-strength.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2007, 2009, 2010, 2012, 2013, 2014
+# Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
+# Copyright 2007, 2009-2010, 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 
 
@@ -135,26 +135,12 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(moduledir)" \
+       "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
+       "$(DESTDIR)$(man5dir)"
+@EMBEDDED_CRACKLIB_TRUE@am__EXEEXT_1 = cracklib/packer$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 LIBRARIES = $(noinst_LIBRARIES)
-ARFLAGS = cru
-AM_V_AR = $(am__v_AR_@AM_V@)
-am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
-am__v_AR_0 = @echo "  AR      " $@;
-am__v_AR_1 = 
-tests_tap_libtap_a_AR = $(AR) $(ARFLAGS)
-tests_tap_libtap_a_LIBADD =
-am__dirstamp = $(am__leading_dot)dirstamp
-am_tests_tap_libtap_a_OBJECTS =  \
-       tests/tap/tests_tap_libtap_a-basic.$(OBJEXT) \
-       tests/tap/tests_tap_libtap_a-kerberos.$(OBJEXT) \
-       tests/tap/tests_tap_libtap_a-process.$(OBJEXT) \
-       tests/tap/tests_tap_libtap_a-string.$(OBJEXT)
-tests_tap_libtap_a_OBJECTS = $(am_tests_tap_libtap_a_OBJECTS)
-util_libutil_a_AR = $(AR) $(ARFLAGS)
-util_libutil_a_LIBADD =
-am_util_libutil_a_OBJECTS = util/messages-krb5.$(OBJEXT) \
-       util/messages.$(OBJEXT) util/xmalloc.$(OBJEXT)
-util_libutil_a_OBJECTS = $(am_util_libutil_a_OBJECTS)
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -182,16 +168,31 @@ am__uninstall_files_from_dir = { \
     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
          $(am__cd) "$$dir" && rm -f $$files; }; \
   }
-am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(bindir)" \
-       "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \
-       "$(DESTDIR)$(man5dir)"
 LTLIBRARIES = $(module_LTLIBRARIES) $(noinst_LTLIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_@AM_V@)
+am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
+am__v_AR_0 = @echo "  AR      " $@;
+am__v_AR_1 = 
+tests_tap_libtap_a_AR = $(AR) $(ARFLAGS)
+tests_tap_libtap_a_LIBADD =
+am__dirstamp = $(am__leading_dot)dirstamp
+am_tests_tap_libtap_a_OBJECTS = tests/tap/libtap_a-basic.$(OBJEXT) \
+       tests/tap/libtap_a-kerberos.$(OBJEXT) \
+       tests/tap/libtap_a-process.$(OBJEXT) \
+       tests/tap/libtap_a-string.$(OBJEXT)
+tests_tap_libtap_a_OBJECTS = $(am_tests_tap_libtap_a_OBJECTS)
+util_libutil_a_AR = $(AR) $(ARFLAGS)
+util_libutil_a_LIBADD =
+am_util_libutil_a_OBJECTS = util/messages-krb5.$(OBJEXT) \
+       util/messages.$(OBJEXT) util/xmalloc.$(OBJEXT)
+util_libutil_a_OBJECTS = $(am_util_libutil_a_OBJECTS)
 cracklib_libcracklib_la_LIBADD =
 am_cracklib_libcracklib_la_OBJECTS =  \
-       cracklib/cracklib_libcracklib_la-fascist.lo \
-       cracklib/cracklib_libcracklib_la-packlib.lo \
-       cracklib/cracklib_libcracklib_la-rules.lo \
-       cracklib/cracklib_libcracklib_la-stringlib.lo
+       cracklib/libcracklib_la-fascist.lo \
+       cracklib/libcracklib_la-packlib.lo \
+       cracklib/libcracklib_la-rules.lo \
+       cracklib/libcracklib_la-stringlib.lo
 cracklib_libcracklib_la_OBJECTS =  \
        $(am_cracklib_libcracklib_la_OBJECTS)
 AM_V_lt = $(am__v_lt_@AM_V@)
@@ -226,20 +227,17 @@ portable_libportable_la_DEPENDENCIES = $(LTLIBOBJS)
 am_portable_libportable_la_OBJECTS = portable/dummy.lo
 portable_libportable_la_OBJECTS =  \
        $(am_portable_libportable_la_OBJECTS)
-@EMBEDDED_CRACKLIB_TRUE@am__EXEEXT_1 = cracklib/packer$(EXEEXT)
-PROGRAMS = $(bin_PROGRAMS)
 am_cracklib_packer_OBJECTS = cracklib/packer.$(OBJEXT)
 cracklib_packer_OBJECTS = $(am_cracklib_packer_OBJECTS)
 cracklib_packer_DEPENDENCIES = cracklib/libcracklib.la
 tests_plugin_heimdal_t_SOURCES = tests/plugin/heimdal-t.c
 tests_plugin_heimdal_t_OBJECTS =  \
-       tests/plugin/tests_plugin_heimdal_t-heimdal-t.$(OBJEXT)
+       tests/plugin/heimdal_t-heimdal-t.$(OBJEXT)
 tests_plugin_heimdal_t_DEPENDENCIES = tests/tap/libtap.a \
        portable/libportable.la $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
 tests_plugin_mit_t_SOURCES = tests/plugin/mit-t.c
-tests_plugin_mit_t_OBJECTS =  \
-       tests/plugin/tests_plugin_mit_t-mit-t.$(OBJEXT)
+tests_plugin_mit_t_OBJECTS = tests/plugin/mit_t-mit-t.$(OBJEXT)
 tests_plugin_mit_t_DEPENDENCIES = tests/tap/libtap.a \
        portable/libportable.la $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
@@ -279,7 +277,7 @@ tests_portable_strndup_t_OBJECTS =  \
 tests_portable_strndup_t_DEPENDENCIES = tests/tap/libtap.a \
        portable/libportable.la
 tests_runtests_SOURCES = tests/runtests.c
-tests_runtests_OBJECTS = tests/tests_runtests-runtests.$(OBJEXT)
+tests_runtests_OBJECTS = tests/runtests-runtests.$(OBJEXT)
 tests_runtests_LDADD = $(LDADD)
 tests_util_messages_krb5_t_SOURCES = tests/util/messages-krb5-t.c
 tests_util_messages_krb5_t_OBJECTS =  \
@@ -304,7 +302,7 @@ am_tools_heimdal_strength_OBJECTS =  \
        plugin/tools_heimdal_strength-principal.$(OBJEXT) \
        plugin/tools_heimdal_strength-sqlite.$(OBJEXT) \
        plugin/tools_heimdal_strength-vector.$(OBJEXT) \
-       tools/tools_heimdal_strength-heimdal-strength.$(OBJEXT)
+       tools/heimdal_strength-heimdal-strength.$(OBJEXT)
 tools_heimdal_strength_OBJECTS = $(am_tools_heimdal_strength_OBJECTS)
 @EMBEDDED_CRACKLIB_FALSE@tools_heimdal_strength_DEPENDENCIES =  \
 @EMBEDDED_CRACKLIB_FALSE@      $(am__DEPENDENCIES_1) util/libutil.a \
@@ -337,7 +335,55 @@ am__v_at_0 = @
 am__v_at_1 = 
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
-am__depfiles_maybe = depfiles
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = cracklib/$(DEPDIR)/libcracklib_la-fascist.Plo \
+       cracklib/$(DEPDIR)/libcracklib_la-packlib.Plo \
+       cracklib/$(DEPDIR)/libcracklib_la-rules.Plo \
+       cracklib/$(DEPDIR)/libcracklib_la-stringlib.Plo \
+       cracklib/$(DEPDIR)/packer.Po plugin/$(DEPDIR)/cdb.Plo \
+       plugin/$(DEPDIR)/classes.Plo plugin/$(DEPDIR)/config.Plo \
+       plugin/$(DEPDIR)/cracklib.Plo plugin/$(DEPDIR)/error.Plo \
+       plugin/$(DEPDIR)/general.Plo plugin/$(DEPDIR)/heimdal.Plo \
+       plugin/$(DEPDIR)/mit.Plo plugin/$(DEPDIR)/principal.Plo \
+       plugin/$(DEPDIR)/sqlite.Plo \
+       plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-classes.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-config.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-cracklib.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-error.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-general.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-principal.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-sqlite.Po \
+       plugin/$(DEPDIR)/tools_heimdal_strength-vector.Po \
+       plugin/$(DEPDIR)/vector.Plo portable/$(DEPDIR)/asprintf.Plo \
+       portable/$(DEPDIR)/dummy.Plo portable/$(DEPDIR)/krb5-extra.Plo \
+       portable/$(DEPDIR)/krb5-profile.Plo \
+       portable/$(DEPDIR)/mkstemp.Plo \
+       portable/$(DEPDIR)/reallocarray.Plo \
+       portable/$(DEPDIR)/snprintf.Plo portable/$(DEPDIR)/strndup.Plo \
+       tests/$(DEPDIR)/runtests-runtests.Po \
+       tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po \
+       tests/plugin/$(DEPDIR)/mit_t-mit-t.Po \
+       tests/portable/$(DEPDIR)/asprintf-t.Po \
+       tests/portable/$(DEPDIR)/asprintf.Po \
+       tests/portable/$(DEPDIR)/mkstemp-t.Po \
+       tests/portable/$(DEPDIR)/mkstemp.Po \
+       tests/portable/$(DEPDIR)/reallocarray-t.Po \
+       tests/portable/$(DEPDIR)/reallocarray.Po \
+       tests/portable/$(DEPDIR)/snprintf-t.Po \
+       tests/portable/$(DEPDIR)/snprintf.Po \
+       tests/portable/$(DEPDIR)/strndup-t.Po \
+       tests/portable/$(DEPDIR)/strndup.Po \
+       tests/tap/$(DEPDIR)/libtap_a-basic.Po \
+       tests/tap/$(DEPDIR)/libtap_a-kerberos.Po \
+       tests/tap/$(DEPDIR)/libtap_a-process.Po \
+       tests/tap/$(DEPDIR)/libtap_a-string.Po \
+       tests/util/$(DEPDIR)/messages-krb5-t.Po \
+       tests/util/$(DEPDIR)/messages-t.Po \
+       tests/util/$(DEPDIR)/xmalloc.Po \
+       tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po \
+       util/$(DEPDIR)/messages-krb5.Po util/$(DEPDIR)/messages.Po \
+       util/$(DEPDIR)/xmalloc.Po
 am__mv = mv -f
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -390,8 +436,8 @@ man1dir = $(mandir)/man1
 man5dir = $(mandir)/man5
 NROFF = nroff
 MANS = $(dist_man_MANS) $(man_MANS)
-am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
-       $(LISP)config.h.in
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
+       config.h.in
 # Read a list of newline-separated strings from the standard input,
 # and print each of them once, without duplicates.  Input order is
 # *not* preserved.
@@ -423,6 +469,7 @@ am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \
        $(top_srcdir)/build-aux/missing \
        $(top_srcdir)/portable/asprintf.c \
        $(top_srcdir)/portable/krb5-extra.c \
+       $(top_srcdir)/portable/krb5-profile.c \
        $(top_srcdir)/portable/mkstemp.c \
        $(top_srcdir)/portable/reallocarray.c \
        $(top_srcdir)/portable/snprintf.c \
@@ -517,6 +564,7 @@ PACKAGE_URL = @PACKAGE_URL@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_KRB5_CONFIG = @PATH_KRB5_CONFIG@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PATH_VALGRIND = @PATH_VALGRIND@
 PKG_CONFIG = @PKG_CONFIG@
 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
@@ -585,22 +633,25 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = .gitignore .travis.yml README.md LICENSE bootstrap                    \
-       cracklib/HISTORY cracklib/LICENCE cracklib/README                   \
-       cracklib/genrules.pl cracklib/mkdict docs/krb5-strength.5.in        \
-       docs/krb5-strength.pod docs/metadata tests/README tests/TESTS       \
+EXTRA_DIST = .clang-format .github .gitignore README.md LICENSE bootstrap   \
+       ci/README ci/install ci/test cracklib/HISTORY cracklib/LICENCE      \
+       cracklib/README cracklib/genrules.pl cracklib/mkdict                \
+       docs/krb5-strength.5.in docs/krb5-strength.pod docs/metadata        \
+       tests/README tests/TESTS tests/data/cppcheck.supp                   \
        tests/data/krb5.conf tests/data/make-krb5-conf tests/data/passwords \
        tests/data/perl.conf tests/data/perlcriticrc tests/data/perltidyrc  \
        tests/data/valgrind.supp tests/data/wordlist                        \
        tests/data/wordlist.cdb tests/data/wordlist.sqlite                  \
-       tests/docs/pod-spelling-t tests/docs/pod-t tests/docs/urls-t        \
-       tests/perl/critic-t tests/perl/minimum-version-t                    \
-       tests/perl/strict-t tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm  \
-       tests/tap/perl/Test/RRA/Config.pm                                   \
+       tests/docs/pod-spelling-t tests/docs/pod-t                          \
+       tests/docs/spdx-license-t tests/perl/critic-t                       \
+       tests/perl/minimum-version-t tests/perl/strict-t                    \
+       tests/style/obsolete-strings-t tests/tap/libtap.sh                  \
+       tests/tap/perl/Test/RRA.pm tests/tap/perl/Test/RRA/Config.pm        \
        tests/tap/perl/Test/RRA/Automake.pm tests/tools/heimdal-history-t   \
        tests/tools/heimdal-strength-t tests/tools/wordlist-cdb-t           \
        tests/tools/wordlist-sqlite-t tests/tools/wordlist-t                \
-       tests/util/xmalloc-t tools/heimdal-strength.pod
+       tests/util/xmalloc-t tests/valgrind/logs-t                          \
+       tools/heimdal-strength.pod
 
 
 # Do this globally.  Everything needs to find the Kerberos headers and
@@ -744,6 +795,14 @@ tests_util_messages_krb5_t_LDADD = tests/tap/libtap.a util/libutil.a \
        portable/libportable.la $(KRB5_LIBS)
 
 tests_util_xmalloc_LDADD = util/libutil.a portable/libportable.la
+
+# The full path to valgrind and its options, used when doing valgrind
+# testing.
+VALGRIND_COMMAND = $(PATH_VALGRIND) --leak-check=full                  \
+       --trace-children=yes --trace-children-skip=/bin/sh              \
+       --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp       \
+       --log-file=$(abs_top_builddir)/tests/tmp/valgrind/log.%p
+
 all: config.h
        $(MAKE) $(AM_MAKEFLAGS) all-am
 
@@ -770,8 +829,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
            echo ' $(SHELL) ./config.status'; \
            $(SHELL) ./config.status;; \
          *) \
-           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
-           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
        esac;
 
 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
@@ -797,48 +856,70 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
 
 distclean-hdr:
        -rm -f config.h stamp-h1
+install-binPROGRAMS: $(bin_PROGRAMS)
+       @$(NORMAL_INSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do echo "$$p $$p"; done | \
+       sed 's/$(EXEEXT)$$//' | \
+       while read p p1; do if test -f $$p \
+        || test -f $$p1 \
+         ; then echo "$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n;h' \
+           -e 's|.*|.|' \
+           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+       sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) files[d] = files[d] " " $$1; \
+           else { print "f", $$3 "/" $$4, $$1; } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+           test -z "$$files" || { \
+           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+           } \
+       ; done
+
+uninstall-binPROGRAMS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       files=`for p in $$list; do echo "$$p"; done | \
+         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+             -e 's/$$/$(EXEEXT)/' \
+       `; \
+       test -n "$$list" || exit 0; \
+       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+       cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
+
+clean-checkPROGRAMS:
+       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+       echo " rm -f" $$list; \
+       rm -f $$list || exit $$?; \
+       test -n "$(EXEEXT)" || exit 0; \
+       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+       echo " rm -f" $$list; \
+       rm -f $$list
 
 clean-checkLIBRARIES:
        -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
 
 clean-noinstLIBRARIES:
        -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-tests/tap/$(am__dirstamp):
-       @$(MKDIR_P) tests/tap
-       @: > tests/tap/$(am__dirstamp)
-tests/tap/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) tests/tap/$(DEPDIR)
-       @: > tests/tap/$(DEPDIR)/$(am__dirstamp)
-tests/tap/tests_tap_libtap_a-basic.$(OBJEXT):  \
-       tests/tap/$(am__dirstamp) tests/tap/$(DEPDIR)/$(am__dirstamp)
-tests/tap/tests_tap_libtap_a-kerberos.$(OBJEXT):  \
-       tests/tap/$(am__dirstamp) tests/tap/$(DEPDIR)/$(am__dirstamp)
-tests/tap/tests_tap_libtap_a-process.$(OBJEXT):  \
-       tests/tap/$(am__dirstamp) tests/tap/$(DEPDIR)/$(am__dirstamp)
-tests/tap/tests_tap_libtap_a-string.$(OBJEXT):  \
-       tests/tap/$(am__dirstamp) tests/tap/$(DEPDIR)/$(am__dirstamp)
-
-tests/tap/libtap.a: $(tests_tap_libtap_a_OBJECTS) $(tests_tap_libtap_a_DEPENDENCIES) $(EXTRA_tests_tap_libtap_a_DEPENDENCIES) tests/tap/$(am__dirstamp)
-       $(AM_V_at)-rm -f tests/tap/libtap.a
-       $(AM_V_AR)$(tests_tap_libtap_a_AR) tests/tap/libtap.a $(tests_tap_libtap_a_OBJECTS) $(tests_tap_libtap_a_LIBADD)
-       $(AM_V_at)$(RANLIB) tests/tap/libtap.a
-util/$(am__dirstamp):
-       @$(MKDIR_P) util
-       @: > util/$(am__dirstamp)
-util/$(DEPDIR)/$(am__dirstamp):
-       @$(MKDIR_P) util/$(DEPDIR)
-       @: > util/$(DEPDIR)/$(am__dirstamp)
-util/messages-krb5.$(OBJEXT): util/$(am__dirstamp) \
-       util/$(DEPDIR)/$(am__dirstamp)
-util/messages.$(OBJEXT): util/$(am__dirstamp) \
-       util/$(DEPDIR)/$(am__dirstamp)
-util/xmalloc.$(OBJEXT): util/$(am__dirstamp) \
-       util/$(DEPDIR)/$(am__dirstamp)
-
-util/libutil.a: $(util_libutil_a_OBJECTS) $(util_libutil_a_DEPENDENCIES) $(EXTRA_util_libutil_a_DEPENDENCIES) util/$(am__dirstamp)
-       $(AM_V_at)-rm -f util/libutil.a
-       $(AM_V_AR)$(util_libutil_a_AR) util/libutil.a $(util_libutil_a_OBJECTS) $(util_libutil_a_LIBADD)
-       $(AM_V_at)$(RANLIB) util/libutil.a
 
 install-moduleLTLIBRARIES: $(module_LTLIBRARIES)
        @$(NORMAL_INSTALL)
@@ -885,20 +966,56 @@ clean-noinstLTLIBRARIES:
          echo rm -f $${locs}; \
          rm -f $${locs}; \
        }
+tests/tap/$(am__dirstamp):
+       @$(MKDIR_P) tests/tap
+       @: > tests/tap/$(am__dirstamp)
+tests/tap/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) tests/tap/$(DEPDIR)
+       @: > tests/tap/$(DEPDIR)/$(am__dirstamp)
+tests/tap/libtap_a-basic.$(OBJEXT): tests/tap/$(am__dirstamp) \
+       tests/tap/$(DEPDIR)/$(am__dirstamp)
+tests/tap/libtap_a-kerberos.$(OBJEXT): tests/tap/$(am__dirstamp) \
+       tests/tap/$(DEPDIR)/$(am__dirstamp)
+tests/tap/libtap_a-process.$(OBJEXT): tests/tap/$(am__dirstamp) \
+       tests/tap/$(DEPDIR)/$(am__dirstamp)
+tests/tap/libtap_a-string.$(OBJEXT): tests/tap/$(am__dirstamp) \
+       tests/tap/$(DEPDIR)/$(am__dirstamp)
+
+tests/tap/libtap.a: $(tests_tap_libtap_a_OBJECTS) $(tests_tap_libtap_a_DEPENDENCIES) $(EXTRA_tests_tap_libtap_a_DEPENDENCIES) tests/tap/$(am__dirstamp)
+       $(AM_V_at)-rm -f tests/tap/libtap.a
+       $(AM_V_AR)$(tests_tap_libtap_a_AR) tests/tap/libtap.a $(tests_tap_libtap_a_OBJECTS) $(tests_tap_libtap_a_LIBADD)
+       $(AM_V_at)$(RANLIB) tests/tap/libtap.a
+util/$(am__dirstamp):
+       @$(MKDIR_P) util
+       @: > util/$(am__dirstamp)
+util/$(DEPDIR)/$(am__dirstamp):
+       @$(MKDIR_P) util/$(DEPDIR)
+       @: > util/$(DEPDIR)/$(am__dirstamp)
+util/messages-krb5.$(OBJEXT): util/$(am__dirstamp) \
+       util/$(DEPDIR)/$(am__dirstamp)
+util/messages.$(OBJEXT): util/$(am__dirstamp) \
+       util/$(DEPDIR)/$(am__dirstamp)
+util/xmalloc.$(OBJEXT): util/$(am__dirstamp) \
+       util/$(DEPDIR)/$(am__dirstamp)
+
+util/libutil.a: $(util_libutil_a_OBJECTS) $(util_libutil_a_DEPENDENCIES) $(EXTRA_util_libutil_a_DEPENDENCIES) util/$(am__dirstamp)
+       $(AM_V_at)-rm -f util/libutil.a
+       $(AM_V_AR)$(util_libutil_a_AR) util/libutil.a $(util_libutil_a_OBJECTS) $(util_libutil_a_LIBADD)
+       $(AM_V_at)$(RANLIB) util/libutil.a
 cracklib/$(am__dirstamp):
        @$(MKDIR_P) cracklib
        @: > cracklib/$(am__dirstamp)
 cracklib/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) cracklib/$(DEPDIR)
        @: > cracklib/$(DEPDIR)/$(am__dirstamp)
-cracklib/cracklib_libcracklib_la-fascist.lo: cracklib/$(am__dirstamp) \
+cracklib/libcracklib_la-fascist.lo: cracklib/$(am__dirstamp) \
        cracklib/$(DEPDIR)/$(am__dirstamp)
-cracklib/cracklib_libcracklib_la-packlib.lo: cracklib/$(am__dirstamp) \
+cracklib/libcracklib_la-packlib.lo: cracklib/$(am__dirstamp) \
        cracklib/$(DEPDIR)/$(am__dirstamp)
-cracklib/cracklib_libcracklib_la-rules.lo: cracklib/$(am__dirstamp) \
+cracklib/libcracklib_la-rules.lo: cracklib/$(am__dirstamp) \
+       cracklib/$(DEPDIR)/$(am__dirstamp)
+cracklib/libcracklib_la-stringlib.lo: cracklib/$(am__dirstamp) \
        cracklib/$(DEPDIR)/$(am__dirstamp)
-cracklib/cracklib_libcracklib_la-stringlib.lo:  \
-       cracklib/$(am__dirstamp) cracklib/$(DEPDIR)/$(am__dirstamp)
 
 cracklib/libcracklib.la: $(cracklib_libcracklib_la_OBJECTS) $(cracklib_libcracklib_la_DEPENDENCIES) $(EXTRA_cracklib_libcracklib_la_DEPENDENCIES) cracklib/$(am__dirstamp)
        $(AM_V_CCLD)$(LINK) $(am_cracklib_libcracklib_la_rpath) $(cracklib_libcracklib_la_OBJECTS) $(cracklib_libcracklib_la_LIBADD) $(LIBS)
@@ -932,8 +1049,22 @@ plugin/vector.lo: plugin/$(am__dirstamp) \
 plugin/strength.la: $(plugin_strength_la_OBJECTS) $(plugin_strength_la_DEPENDENCIES) $(EXTRA_plugin_strength_la_DEPENDENCIES) plugin/$(am__dirstamp)
        $(AM_V_CCLD)$(plugin_strength_la_LINK) -rpath $(moduledir) $(plugin_strength_la_OBJECTS) $(plugin_strength_la_LIBADD) $(LIBS)
 portable/$(am__dirstamp):
-       @$(MKDIR_P) portable
+       @$(MKDIR_P) portable/
        @: > portable/$(am__dirstamp)
+portable/snprintf.$(OBJEXT): portable/$(am__dirstamp)
+portable/snprintf.lo: portable/$(am__dirstamp)
+portable/krb5-extra.$(OBJEXT): portable/$(am__dirstamp)
+portable/krb5-extra.lo: portable/$(am__dirstamp)
+portable/krb5-profile.$(OBJEXT): portable/$(am__dirstamp)
+portable/krb5-profile.lo: portable/$(am__dirstamp)
+portable/reallocarray.$(OBJEXT): portable/$(am__dirstamp)
+portable/reallocarray.lo: portable/$(am__dirstamp)
+portable/asprintf.$(OBJEXT): portable/$(am__dirstamp)
+portable/asprintf.lo: portable/$(am__dirstamp)
+portable/strndup.$(OBJEXT): portable/$(am__dirstamp)
+portable/strndup.lo: portable/$(am__dirstamp)
+portable/mkstemp.$(OBJEXT): portable/$(am__dirstamp)
+portable/mkstemp.lo: portable/$(am__dirstamp)
 portable/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) portable/$(DEPDIR)
        @: > portable/$(DEPDIR)/$(am__dirstamp)
@@ -942,64 +1073,6 @@ portable/dummy.lo: portable/$(am__dirstamp) \
 
 portable/libportable.la: $(portable_libportable_la_OBJECTS) $(portable_libportable_la_DEPENDENCIES) $(EXTRA_portable_libportable_la_DEPENDENCIES) portable/$(am__dirstamp)
        $(AM_V_CCLD)$(LINK)  $(portable_libportable_la_OBJECTS) $(portable_libportable_la_LIBADD) $(LIBS)
-install-binPROGRAMS: $(bin_PROGRAMS)
-       @$(NORMAL_INSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       if test -n "$$list"; then \
-         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
-         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
-       fi; \
-       for p in $$list; do echo "$$p $$p"; done | \
-       sed 's/$(EXEEXT)$$//' | \
-       while read p p1; do if test -f $$p \
-        || test -f $$p1 \
-         ; then echo "$$p"; echo "$$p"; else :; fi; \
-       done | \
-       sed -e 'p;s,.*/,,;n;h' \
-           -e 's|.*|.|' \
-           -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
-       sed 'N;N;N;s,\n, ,g' | \
-       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
-         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
-           if ($$2 == $$4) files[d] = files[d] " " $$1; \
-           else { print "f", $$3 "/" $$4, $$1; } } \
-         END { for (d in files) print "f", d, files[d] }' | \
-       while read type dir files; do \
-           if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
-           test -z "$$files" || { \
-           echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
-           $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
-           } \
-       ; done
-
-uninstall-binPROGRAMS:
-       @$(NORMAL_UNINSTALL)
-       @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-       files=`for p in $$list; do echo "$$p"; done | \
-         sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-             -e 's/$$/$(EXEEXT)/' \
-       `; \
-       test -n "$$list" || exit 0; \
-       echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
-       cd "$(DESTDIR)$(bindir)" && rm -f $$files
-
-clean-binPROGRAMS:
-       @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
-       echo " rm -f" $$list; \
-       rm -f $$list || exit $$?; \
-       test -n "$(EXEEXT)" || exit 0; \
-       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-       echo " rm -f" $$list; \
-       rm -f $$list
-
-clean-checkPROGRAMS:
-       @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
-       echo " rm -f" $$list; \
-       rm -f $$list || exit $$?; \
-       test -n "$(EXEEXT)" || exit 0; \
-       list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
-       echo " rm -f" $$list; \
-       rm -f $$list
 cracklib/packer.$(OBJEXT): cracklib/$(am__dirstamp) \
        cracklib/$(DEPDIR)/$(am__dirstamp)
 
@@ -1012,15 +1085,14 @@ tests/plugin/$(am__dirstamp):
 tests/plugin/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) tests/plugin/$(DEPDIR)
        @: > tests/plugin/$(DEPDIR)/$(am__dirstamp)
-tests/plugin/tests_plugin_heimdal_t-heimdal-t.$(OBJEXT):  \
+tests/plugin/heimdal_t-heimdal-t.$(OBJEXT):  \
        tests/plugin/$(am__dirstamp) \
        tests/plugin/$(DEPDIR)/$(am__dirstamp)
 
 tests/plugin/heimdal-t$(EXEEXT): $(tests_plugin_heimdal_t_OBJECTS) $(tests_plugin_heimdal_t_DEPENDENCIES) $(EXTRA_tests_plugin_heimdal_t_DEPENDENCIES) tests/plugin/$(am__dirstamp)
        @rm -f tests/plugin/heimdal-t$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(tests_plugin_heimdal_t_OBJECTS) $(tests_plugin_heimdal_t_LDADD) $(LIBS)
-tests/plugin/tests_plugin_mit_t-mit-t.$(OBJEXT):  \
-       tests/plugin/$(am__dirstamp) \
+tests/plugin/mit_t-mit-t.$(OBJEXT): tests/plugin/$(am__dirstamp) \
        tests/plugin/$(DEPDIR)/$(am__dirstamp)
 
 tests/plugin/mit-t$(EXEEXT): $(tests_plugin_mit_t_OBJECTS) $(tests_plugin_mit_t_DEPENDENCIES) $(EXTRA_tests_plugin_mit_t_DEPENDENCIES) tests/plugin/$(am__dirstamp)
@@ -1079,7 +1151,7 @@ tests/$(am__dirstamp):
 tests/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) tests/$(DEPDIR)
        @: > tests/$(DEPDIR)/$(am__dirstamp)
-tests/tests_runtests-runtests.$(OBJEXT): tests/$(am__dirstamp) \
+tests/runtests-runtests.$(OBJEXT): tests/$(am__dirstamp) \
        tests/$(DEPDIR)/$(am__dirstamp)
 
 tests/runtests$(EXEEXT): $(tests_runtests_OBJECTS) $(tests_runtests_DEPENDENCIES) $(EXTRA_tests_runtests_DEPENDENCIES) tests/$(am__dirstamp)
@@ -1133,7 +1205,7 @@ tools/$(am__dirstamp):
 tools/$(DEPDIR)/$(am__dirstamp):
        @$(MKDIR_P) tools/$(DEPDIR)
        @: > tools/$(DEPDIR)/$(am__dirstamp)
-tools/tools_heimdal_strength-heimdal-strength.$(OBJEXT):  \
+tools/heimdal_strength-heimdal-strength.$(OBJEXT):  \
        tools/$(am__dirstamp) tools/$(DEPDIR)/$(am__dirstamp)
 
 tools/heimdal-strength$(EXEEXT): $(tools_heimdal_strength_OBJECTS) $(tools_heimdal_strength_DEPENDENCIES) $(EXTRA_tools_heimdal_strength_DEPENDENCIES) tools/$(am__dirstamp)
@@ -1194,62 +1266,69 @@ mostlyclean-compile:
 distclean-compile:
        -rm -f *.tab.c
 
-@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/cracklib_libcracklib_la-fascist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/cracklib_libcracklib_la-packlib.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/cracklib_libcracklib_la-rules.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/cracklib_libcracklib_la-stringlib.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/packer.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/cdb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/classes.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/config.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/cracklib.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/error.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/general.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/heimdal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/mit.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/principal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/sqlite.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-classes.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-config.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-cracklib.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-error.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-general.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-principal.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-sqlite.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-vector.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/vector.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/asprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/dummy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/krb5-extra.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/mkstemp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/reallocarray.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/snprintf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/strndup.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/tests_runtests-runtests.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/asprintf-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/asprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/mkstemp-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/mkstemp.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/reallocarray-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/reallocarray.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/snprintf-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/snprintf.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/strndup-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/strndup.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/messages-krb5-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/messages-t.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/xmalloc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/messages-krb5.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/messages.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/xmalloc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/libcracklib_la-fascist.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/libcracklib_la-packlib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/libcracklib_la-rules.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/libcracklib_la-stringlib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@cracklib/$(DEPDIR)/packer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/cdb.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/classes.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/config.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/cracklib.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/error.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/general.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/heimdal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/mit.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/principal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/sqlite.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-classes.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-config.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-cracklib.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-error.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-general.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-principal.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-sqlite.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/tools_heimdal_strength-vector.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@plugin/$(DEPDIR)/vector.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/asprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/dummy.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/krb5-extra.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/krb5-profile.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/mkstemp.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/reallocarray.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/snprintf.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/strndup.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/$(DEPDIR)/runtests-runtests.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/plugin/$(DEPDIR)/mit_t-mit-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/asprintf-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/asprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/mkstemp-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/mkstemp.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/reallocarray-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/reallocarray.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/snprintf-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/snprintf.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/strndup-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/portable/$(DEPDIR)/strndup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/libtap_a-basic.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/libtap_a-kerberos.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/libtap_a-process.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/tap/$(DEPDIR)/libtap_a-string.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/messages-krb5-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/messages-t.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tests/util/$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/messages-krb5.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/messages.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/xmalloc.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+       @$(MKDIR_P) $(@D)
+       @echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
 
 .c.o:
 @am__fastdepCC_TRUE@   $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
@@ -1275,131 +1354,131 @@ distclean-compile:
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
 
-tests/tap/tests_tap_libtap_a-basic.o: tests/tap/basic.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-basic.o -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Tpo -c -o tests/tap/tests_tap_libtap_a-basic.o `test -f 'tests/tap/basic.c' || echo '$(srcdir)/'`tests/tap/basic.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/basic.c' object='tests/tap/tests_tap_libtap_a-basic.o' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-basic.o: tests/tap/basic.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-basic.o -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-basic.Tpo -c -o tests/tap/libtap_a-basic.o `test -f 'tests/tap/basic.c' || echo '$(srcdir)/'`tests/tap/basic.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-basic.Tpo tests/tap/$(DEPDIR)/libtap_a-basic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/basic.c' object='tests/tap/libtap_a-basic.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-basic.o `test -f 'tests/tap/basic.c' || echo '$(srcdir)/'`tests/tap/basic.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-basic.o `test -f 'tests/tap/basic.c' || echo '$(srcdir)/'`tests/tap/basic.c
 
-tests/tap/tests_tap_libtap_a-basic.obj: tests/tap/basic.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-basic.obj -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Tpo -c -o tests/tap/tests_tap_libtap_a-basic.obj `if test -f 'tests/tap/basic.c'; then $(CYGPATH_W) 'tests/tap/basic.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/basic.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-basic.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/basic.c' object='tests/tap/tests_tap_libtap_a-basic.obj' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-basic.obj: tests/tap/basic.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-basic.obj -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-basic.Tpo -c -o tests/tap/libtap_a-basic.obj `if test -f 'tests/tap/basic.c'; then $(CYGPATH_W) 'tests/tap/basic.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/basic.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-basic.Tpo tests/tap/$(DEPDIR)/libtap_a-basic.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/basic.c' object='tests/tap/libtap_a-basic.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-basic.obj `if test -f 'tests/tap/basic.c'; then $(CYGPATH_W) 'tests/tap/basic.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/basic.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-basic.obj `if test -f 'tests/tap/basic.c'; then $(CYGPATH_W) 'tests/tap/basic.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/basic.c'; fi`
 
-tests/tap/tests_tap_libtap_a-kerberos.o: tests/tap/kerberos.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-kerberos.o -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Tpo -c -o tests/tap/tests_tap_libtap_a-kerberos.o `test -f 'tests/tap/kerberos.c' || echo '$(srcdir)/'`tests/tap/kerberos.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/kerberos.c' object='tests/tap/tests_tap_libtap_a-kerberos.o' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-kerberos.o: tests/tap/kerberos.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-kerberos.o -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-kerberos.Tpo -c -o tests/tap/libtap_a-kerberos.o `test -f 'tests/tap/kerberos.c' || echo '$(srcdir)/'`tests/tap/kerberos.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-kerberos.Tpo tests/tap/$(DEPDIR)/libtap_a-kerberos.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/kerberos.c' object='tests/tap/libtap_a-kerberos.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-kerberos.o `test -f 'tests/tap/kerberos.c' || echo '$(srcdir)/'`tests/tap/kerberos.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-kerberos.o `test -f 'tests/tap/kerberos.c' || echo '$(srcdir)/'`tests/tap/kerberos.c
 
-tests/tap/tests_tap_libtap_a-kerberos.obj: tests/tap/kerberos.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-kerberos.obj -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Tpo -c -o tests/tap/tests_tap_libtap_a-kerberos.obj `if test -f 'tests/tap/kerberos.c'; then $(CYGPATH_W) 'tests/tap/kerberos.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/kerberos.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-kerberos.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/kerberos.c' object='tests/tap/tests_tap_libtap_a-kerberos.obj' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-kerberos.obj: tests/tap/kerberos.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-kerberos.obj -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-kerberos.Tpo -c -o tests/tap/libtap_a-kerberos.obj `if test -f 'tests/tap/kerberos.c'; then $(CYGPATH_W) 'tests/tap/kerberos.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/kerberos.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-kerberos.Tpo tests/tap/$(DEPDIR)/libtap_a-kerberos.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/kerberos.c' object='tests/tap/libtap_a-kerberos.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-kerberos.obj `if test -f 'tests/tap/kerberos.c'; then $(CYGPATH_W) 'tests/tap/kerberos.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/kerberos.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-kerberos.obj `if test -f 'tests/tap/kerberos.c'; then $(CYGPATH_W) 'tests/tap/kerberos.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/kerberos.c'; fi`
 
-tests/tap/tests_tap_libtap_a-process.o: tests/tap/process.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-process.o -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Tpo -c -o tests/tap/tests_tap_libtap_a-process.o `test -f 'tests/tap/process.c' || echo '$(srcdir)/'`tests/tap/process.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/process.c' object='tests/tap/tests_tap_libtap_a-process.o' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-process.o: tests/tap/process.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-process.o -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-process.Tpo -c -o tests/tap/libtap_a-process.o `test -f 'tests/tap/process.c' || echo '$(srcdir)/'`tests/tap/process.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-process.Tpo tests/tap/$(DEPDIR)/libtap_a-process.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/process.c' object='tests/tap/libtap_a-process.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-process.o `test -f 'tests/tap/process.c' || echo '$(srcdir)/'`tests/tap/process.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-process.o `test -f 'tests/tap/process.c' || echo '$(srcdir)/'`tests/tap/process.c
 
-tests/tap/tests_tap_libtap_a-process.obj: tests/tap/process.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-process.obj -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Tpo -c -o tests/tap/tests_tap_libtap_a-process.obj `if test -f 'tests/tap/process.c'; then $(CYGPATH_W) 'tests/tap/process.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/process.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-process.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/process.c' object='tests/tap/tests_tap_libtap_a-process.obj' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-process.obj: tests/tap/process.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-process.obj -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-process.Tpo -c -o tests/tap/libtap_a-process.obj `if test -f 'tests/tap/process.c'; then $(CYGPATH_W) 'tests/tap/process.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/process.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-process.Tpo tests/tap/$(DEPDIR)/libtap_a-process.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/process.c' object='tests/tap/libtap_a-process.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-process.obj `if test -f 'tests/tap/process.c'; then $(CYGPATH_W) 'tests/tap/process.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/process.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-process.obj `if test -f 'tests/tap/process.c'; then $(CYGPATH_W) 'tests/tap/process.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/process.c'; fi`
 
-tests/tap/tests_tap_libtap_a-string.o: tests/tap/string.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-string.o -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Tpo -c -o tests/tap/tests_tap_libtap_a-string.o `test -f 'tests/tap/string.c' || echo '$(srcdir)/'`tests/tap/string.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/string.c' object='tests/tap/tests_tap_libtap_a-string.o' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-string.o: tests/tap/string.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-string.o -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-string.Tpo -c -o tests/tap/libtap_a-string.o `test -f 'tests/tap/string.c' || echo '$(srcdir)/'`tests/tap/string.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-string.Tpo tests/tap/$(DEPDIR)/libtap_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/string.c' object='tests/tap/libtap_a-string.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-string.o `test -f 'tests/tap/string.c' || echo '$(srcdir)/'`tests/tap/string.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-string.o `test -f 'tests/tap/string.c' || echo '$(srcdir)/'`tests/tap/string.c
 
-tests/tap/tests_tap_libtap_a-string.obj: tests/tap/string.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/tests_tap_libtap_a-string.obj -MD -MP -MF tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Tpo -c -o tests/tap/tests_tap_libtap_a-string.obj `if test -f 'tests/tap/string.c'; then $(CYGPATH_W) 'tests/tap/string.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/string.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Tpo tests/tap/$(DEPDIR)/tests_tap_libtap_a-string.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/string.c' object='tests/tap/tests_tap_libtap_a-string.obj' libtool=no @AMDEPBACKSLASH@
+tests/tap/libtap_a-string.obj: tests/tap/string.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tap/libtap_a-string.obj -MD -MP -MF tests/tap/$(DEPDIR)/libtap_a-string.Tpo -c -o tests/tap/libtap_a-string.obj `if test -f 'tests/tap/string.c'; then $(CYGPATH_W) 'tests/tap/string.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/string.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/tap/$(DEPDIR)/libtap_a-string.Tpo tests/tap/$(DEPDIR)/libtap_a-string.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/tap/string.c' object='tests/tap/libtap_a-string.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/tests_tap_libtap_a-string.obj `if test -f 'tests/tap/string.c'; then $(CYGPATH_W) 'tests/tap/string.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/string.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_tap_libtap_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tap/libtap_a-string.obj `if test -f 'tests/tap/string.c'; then $(CYGPATH_W) 'tests/tap/string.c'; else $(CYGPATH_W) '$(srcdir)/tests/tap/string.c'; fi`
 
-cracklib/cracklib_libcracklib_la-fascist.lo: cracklib/fascist.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/cracklib_libcracklib_la-fascist.lo -MD -MP -MF cracklib/$(DEPDIR)/cracklib_libcracklib_la-fascist.Tpo -c -o cracklib/cracklib_libcracklib_la-fascist.lo `test -f 'cracklib/fascist.c' || echo '$(srcdir)/'`cracklib/fascist.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/cracklib_libcracklib_la-fascist.Tpo cracklib/$(DEPDIR)/cracklib_libcracklib_la-fascist.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/fascist.c' object='cracklib/cracklib_libcracklib_la-fascist.lo' libtool=yes @AMDEPBACKSLASH@
+cracklib/libcracklib_la-fascist.lo: cracklib/fascist.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/libcracklib_la-fascist.lo -MD -MP -MF cracklib/$(DEPDIR)/libcracklib_la-fascist.Tpo -c -o cracklib/libcracklib_la-fascist.lo `test -f 'cracklib/fascist.c' || echo '$(srcdir)/'`cracklib/fascist.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/libcracklib_la-fascist.Tpo cracklib/$(DEPDIR)/libcracklib_la-fascist.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/fascist.c' object='cracklib/libcracklib_la-fascist.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/cracklib_libcracklib_la-fascist.lo `test -f 'cracklib/fascist.c' || echo '$(srcdir)/'`cracklib/fascist.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/libcracklib_la-fascist.lo `test -f 'cracklib/fascist.c' || echo '$(srcdir)/'`cracklib/fascist.c
 
-cracklib/cracklib_libcracklib_la-packlib.lo: cracklib/packlib.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/cracklib_libcracklib_la-packlib.lo -MD -MP -MF cracklib/$(DEPDIR)/cracklib_libcracklib_la-packlib.Tpo -c -o cracklib/cracklib_libcracklib_la-packlib.lo `test -f 'cracklib/packlib.c' || echo '$(srcdir)/'`cracklib/packlib.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/cracklib_libcracklib_la-packlib.Tpo cracklib/$(DEPDIR)/cracklib_libcracklib_la-packlib.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/packlib.c' object='cracklib/cracklib_libcracklib_la-packlib.lo' libtool=yes @AMDEPBACKSLASH@
+cracklib/libcracklib_la-packlib.lo: cracklib/packlib.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/libcracklib_la-packlib.lo -MD -MP -MF cracklib/$(DEPDIR)/libcracklib_la-packlib.Tpo -c -o cracklib/libcracklib_la-packlib.lo `test -f 'cracklib/packlib.c' || echo '$(srcdir)/'`cracklib/packlib.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/libcracklib_la-packlib.Tpo cracklib/$(DEPDIR)/libcracklib_la-packlib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/packlib.c' object='cracklib/libcracklib_la-packlib.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/cracklib_libcracklib_la-packlib.lo `test -f 'cracklib/packlib.c' || echo '$(srcdir)/'`cracklib/packlib.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/libcracklib_la-packlib.lo `test -f 'cracklib/packlib.c' || echo '$(srcdir)/'`cracklib/packlib.c
 
-cracklib/cracklib_libcracklib_la-rules.lo: cracklib/rules.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/cracklib_libcracklib_la-rules.lo -MD -MP -MF cracklib/$(DEPDIR)/cracklib_libcracklib_la-rules.Tpo -c -o cracklib/cracklib_libcracklib_la-rules.lo `test -f 'cracklib/rules.c' || echo '$(srcdir)/'`cracklib/rules.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/cracklib_libcracklib_la-rules.Tpo cracklib/$(DEPDIR)/cracklib_libcracklib_la-rules.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/rules.c' object='cracklib/cracklib_libcracklib_la-rules.lo' libtool=yes @AMDEPBACKSLASH@
+cracklib/libcracklib_la-rules.lo: cracklib/rules.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/libcracklib_la-rules.lo -MD -MP -MF cracklib/$(DEPDIR)/libcracklib_la-rules.Tpo -c -o cracklib/libcracklib_la-rules.lo `test -f 'cracklib/rules.c' || echo '$(srcdir)/'`cracklib/rules.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/libcracklib_la-rules.Tpo cracklib/$(DEPDIR)/libcracklib_la-rules.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/rules.c' object='cracklib/libcracklib_la-rules.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/cracklib_libcracklib_la-rules.lo `test -f 'cracklib/rules.c' || echo '$(srcdir)/'`cracklib/rules.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/libcracklib_la-rules.lo `test -f 'cracklib/rules.c' || echo '$(srcdir)/'`cracklib/rules.c
 
-cracklib/cracklib_libcracklib_la-stringlib.lo: cracklib/stringlib.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/cracklib_libcracklib_la-stringlib.lo -MD -MP -MF cracklib/$(DEPDIR)/cracklib_libcracklib_la-stringlib.Tpo -c -o cracklib/cracklib_libcracklib_la-stringlib.lo `test -f 'cracklib/stringlib.c' || echo '$(srcdir)/'`cracklib/stringlib.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/cracklib_libcracklib_la-stringlib.Tpo cracklib/$(DEPDIR)/cracklib_libcracklib_la-stringlib.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/stringlib.c' object='cracklib/cracklib_libcracklib_la-stringlib.lo' libtool=yes @AMDEPBACKSLASH@
+cracklib/libcracklib_la-stringlib.lo: cracklib/stringlib.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cracklib/libcracklib_la-stringlib.lo -MD -MP -MF cracklib/$(DEPDIR)/libcracklib_la-stringlib.Tpo -c -o cracklib/libcracklib_la-stringlib.lo `test -f 'cracklib/stringlib.c' || echo '$(srcdir)/'`cracklib/stringlib.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) cracklib/$(DEPDIR)/libcracklib_la-stringlib.Tpo cracklib/$(DEPDIR)/libcracklib_la-stringlib.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='cracklib/stringlib.c' object='cracklib/libcracklib_la-stringlib.lo' libtool=yes @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/cracklib_libcracklib_la-stringlib.lo `test -f 'cracklib/stringlib.c' || echo '$(srcdir)/'`cracklib/stringlib.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(cracklib_libcracklib_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cracklib/libcracklib_la-stringlib.lo `test -f 'cracklib/stringlib.c' || echo '$(srcdir)/'`cracklib/stringlib.c
 
-tests/plugin/tests_plugin_heimdal_t-heimdal-t.o: tests/plugin/heimdal-t.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/tests_plugin_heimdal_t-heimdal-t.o -MD -MP -MF tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Tpo -c -o tests/plugin/tests_plugin_heimdal_t-heimdal-t.o `test -f 'tests/plugin/heimdal-t.c' || echo '$(srcdir)/'`tests/plugin/heimdal-t.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Tpo tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/heimdal-t.c' object='tests/plugin/tests_plugin_heimdal_t-heimdal-t.o' libtool=no @AMDEPBACKSLASH@
+tests/plugin/heimdal_t-heimdal-t.o: tests/plugin/heimdal-t.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/heimdal_t-heimdal-t.o -MD -MP -MF tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Tpo -c -o tests/plugin/heimdal_t-heimdal-t.o `test -f 'tests/plugin/heimdal-t.c' || echo '$(srcdir)/'`tests/plugin/heimdal-t.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Tpo tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/heimdal-t.c' object='tests/plugin/heimdal_t-heimdal-t.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/tests_plugin_heimdal_t-heimdal-t.o `test -f 'tests/plugin/heimdal-t.c' || echo '$(srcdir)/'`tests/plugin/heimdal-t.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/heimdal_t-heimdal-t.o `test -f 'tests/plugin/heimdal-t.c' || echo '$(srcdir)/'`tests/plugin/heimdal-t.c
 
-tests/plugin/tests_plugin_heimdal_t-heimdal-t.obj: tests/plugin/heimdal-t.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/tests_plugin_heimdal_t-heimdal-t.obj -MD -MP -MF tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Tpo -c -o tests/plugin/tests_plugin_heimdal_t-heimdal-t.obj `if test -f 'tests/plugin/heimdal-t.c'; then $(CYGPATH_W) 'tests/plugin/heimdal-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/heimdal-t.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Tpo tests/plugin/$(DEPDIR)/tests_plugin_heimdal_t-heimdal-t.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/heimdal-t.c' object='tests/plugin/tests_plugin_heimdal_t-heimdal-t.obj' libtool=no @AMDEPBACKSLASH@
+tests/plugin/heimdal_t-heimdal-t.obj: tests/plugin/heimdal-t.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/heimdal_t-heimdal-t.obj -MD -MP -MF tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Tpo -c -o tests/plugin/heimdal_t-heimdal-t.obj `if test -f 'tests/plugin/heimdal-t.c'; then $(CYGPATH_W) 'tests/plugin/heimdal-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/heimdal-t.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Tpo tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/heimdal-t.c' object='tests/plugin/heimdal_t-heimdal-t.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/tests_plugin_heimdal_t-heimdal-t.obj `if test -f 'tests/plugin/heimdal-t.c'; then $(CYGPATH_W) 'tests/plugin/heimdal-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/heimdal-t.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_heimdal_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/heimdal_t-heimdal-t.obj `if test -f 'tests/plugin/heimdal-t.c'; then $(CYGPATH_W) 'tests/plugin/heimdal-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/heimdal-t.c'; fi`
 
-tests/plugin/tests_plugin_mit_t-mit-t.o: tests/plugin/mit-t.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/tests_plugin_mit_t-mit-t.o -MD -MP -MF tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Tpo -c -o tests/plugin/tests_plugin_mit_t-mit-t.o `test -f 'tests/plugin/mit-t.c' || echo '$(srcdir)/'`tests/plugin/mit-t.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Tpo tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/mit-t.c' object='tests/plugin/tests_plugin_mit_t-mit-t.o' libtool=no @AMDEPBACKSLASH@
+tests/plugin/mit_t-mit-t.o: tests/plugin/mit-t.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/mit_t-mit-t.o -MD -MP -MF tests/plugin/$(DEPDIR)/mit_t-mit-t.Tpo -c -o tests/plugin/mit_t-mit-t.o `test -f 'tests/plugin/mit-t.c' || echo '$(srcdir)/'`tests/plugin/mit-t.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/mit_t-mit-t.Tpo tests/plugin/$(DEPDIR)/mit_t-mit-t.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/mit-t.c' object='tests/plugin/mit_t-mit-t.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/tests_plugin_mit_t-mit-t.o `test -f 'tests/plugin/mit-t.c' || echo '$(srcdir)/'`tests/plugin/mit-t.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/mit_t-mit-t.o `test -f 'tests/plugin/mit-t.c' || echo '$(srcdir)/'`tests/plugin/mit-t.c
 
-tests/plugin/tests_plugin_mit_t-mit-t.obj: tests/plugin/mit-t.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/tests_plugin_mit_t-mit-t.obj -MD -MP -MF tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Tpo -c -o tests/plugin/tests_plugin_mit_t-mit-t.obj `if test -f 'tests/plugin/mit-t.c'; then $(CYGPATH_W) 'tests/plugin/mit-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/mit-t.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Tpo tests/plugin/$(DEPDIR)/tests_plugin_mit_t-mit-t.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/mit-t.c' object='tests/plugin/tests_plugin_mit_t-mit-t.obj' libtool=no @AMDEPBACKSLASH@
+tests/plugin/mit_t-mit-t.obj: tests/plugin/mit-t.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/plugin/mit_t-mit-t.obj -MD -MP -MF tests/plugin/$(DEPDIR)/mit_t-mit-t.Tpo -c -o tests/plugin/mit_t-mit-t.obj `if test -f 'tests/plugin/mit-t.c'; then $(CYGPATH_W) 'tests/plugin/mit-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/mit-t.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/plugin/$(DEPDIR)/mit_t-mit-t.Tpo tests/plugin/$(DEPDIR)/mit_t-mit-t.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/plugin/mit-t.c' object='tests/plugin/mit_t-mit-t.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/tests_plugin_mit_t-mit-t.obj `if test -f 'tests/plugin/mit-t.c'; then $(CYGPATH_W) 'tests/plugin/mit-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/mit-t.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_plugin_mit_t_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/plugin/mit_t-mit-t.obj `if test -f 'tests/plugin/mit-t.c'; then $(CYGPATH_W) 'tests/plugin/mit-t.c'; else $(CYGPATH_W) '$(srcdir)/tests/plugin/mit-t.c'; fi`
 
-tests/tests_runtests-runtests.o: tests/runtests.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_runtests-runtests.o -MD -MP -MF tests/$(DEPDIR)/tests_runtests-runtests.Tpo -c -o tests/tests_runtests-runtests.o `test -f 'tests/runtests.c' || echo '$(srcdir)/'`tests/runtests.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_runtests-runtests.Tpo tests/$(DEPDIR)/tests_runtests-runtests.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/runtests.c' object='tests/tests_runtests-runtests.o' libtool=no @AMDEPBACKSLASH@
+tests/runtests-runtests.o: tests/runtests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/runtests-runtests.o -MD -MP -MF tests/$(DEPDIR)/runtests-runtests.Tpo -c -o tests/runtests-runtests.o `test -f 'tests/runtests.c' || echo '$(srcdir)/'`tests/runtests.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/$(DEPDIR)/runtests-runtests.Tpo tests/$(DEPDIR)/runtests-runtests.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/runtests.c' object='tests/runtests-runtests.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tests_runtests-runtests.o `test -f 'tests/runtests.c' || echo '$(srcdir)/'`tests/runtests.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/runtests-runtests.o `test -f 'tests/runtests.c' || echo '$(srcdir)/'`tests/runtests.c
 
-tests/tests_runtests-runtests.obj: tests/runtests.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/tests_runtests-runtests.obj -MD -MP -MF tests/$(DEPDIR)/tests_runtests-runtests.Tpo -c -o tests/tests_runtests-runtests.obj `if test -f 'tests/runtests.c'; then $(CYGPATH_W) 'tests/runtests.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtests.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/$(DEPDIR)/tests_runtests-runtests.Tpo tests/$(DEPDIR)/tests_runtests-runtests.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/runtests.c' object='tests/tests_runtests-runtests.obj' libtool=no @AMDEPBACKSLASH@
+tests/runtests-runtests.obj: tests/runtests.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tests/runtests-runtests.obj -MD -MP -MF tests/$(DEPDIR)/runtests-runtests.Tpo -c -o tests/runtests-runtests.obj `if test -f 'tests/runtests.c'; then $(CYGPATH_W) 'tests/runtests.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtests.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tests/$(DEPDIR)/runtests-runtests.Tpo tests/$(DEPDIR)/runtests-runtests.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tests/runtests.c' object='tests/runtests-runtests.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/tests_runtests-runtests.obj `if test -f 'tests/runtests.c'; then $(CYGPATH_W) 'tests/runtests.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtests.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tests_runtests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tests/runtests-runtests.obj `if test -f 'tests/runtests.c'; then $(CYGPATH_W) 'tests/runtests.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtests.c'; fi`
 
 plugin/tools_heimdal_strength-cdb.o: plugin/cdb.c
 @am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -MT plugin/tools_heimdal_strength-cdb.o -MD -MP -MF plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Tpo -c -o plugin/tools_heimdal_strength-cdb.o `test -f 'plugin/cdb.c' || echo '$(srcdir)/'`plugin/cdb.c
@@ -1527,19 +1606,19 @@ plugin/tools_heimdal_strength-vector.obj: plugin/vector.c
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -c -o plugin/tools_heimdal_strength-vector.obj `if test -f 'plugin/vector.c'; then $(CYGPATH_W) 'plugin/vector.c'; else $(CYGPATH_W) '$(srcdir)/plugin/vector.c'; fi`
 
-tools/tools_heimdal_strength-heimdal-strength.o: tools/heimdal-strength.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -MT tools/tools_heimdal_strength-heimdal-strength.o -MD -MP -MF tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Tpo -c -o tools/tools_heimdal_strength-heimdal-strength.o `test -f 'tools/heimdal-strength.c' || echo '$(srcdir)/'`tools/heimdal-strength.c
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Tpo tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tools/heimdal-strength.c' object='tools/tools_heimdal_strength-heimdal-strength.o' libtool=no @AMDEPBACKSLASH@
+tools/heimdal_strength-heimdal-strength.o: tools/heimdal-strength.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -MT tools/heimdal_strength-heimdal-strength.o -MD -MP -MF tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Tpo -c -o tools/heimdal_strength-heimdal-strength.o `test -f 'tools/heimdal-strength.c' || echo '$(srcdir)/'`tools/heimdal-strength.c
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Tpo tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tools/heimdal-strength.c' object='tools/heimdal_strength-heimdal-strength.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -c -o tools/tools_heimdal_strength-heimdal-strength.o `test -f 'tools/heimdal-strength.c' || echo '$(srcdir)/'`tools/heimdal-strength.c
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -c -o tools/heimdal_strength-heimdal-strength.o `test -f 'tools/heimdal-strength.c' || echo '$(srcdir)/'`tools/heimdal-strength.c
 
-tools/tools_heimdal_strength-heimdal-strength.obj: tools/heimdal-strength.c
-@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -MT tools/tools_heimdal_strength-heimdal-strength.obj -MD -MP -MF tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Tpo -c -o tools/tools_heimdal_strength-heimdal-strength.obj `if test -f 'tools/heimdal-strength.c'; then $(CYGPATH_W) 'tools/heimdal-strength.c'; else $(CYGPATH_W) '$(srcdir)/tools/heimdal-strength.c'; fi`
-@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Tpo tools/$(DEPDIR)/tools_heimdal_strength-heimdal-strength.Po
-@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tools/heimdal-strength.c' object='tools/tools_heimdal_strength-heimdal-strength.obj' libtool=no @AMDEPBACKSLASH@
+tools/heimdal_strength-heimdal-strength.obj: tools/heimdal-strength.c
+@am__fastdepCC_TRUE@   $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -MT tools/heimdal_strength-heimdal-strength.obj -MD -MP -MF tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Tpo -c -o tools/heimdal_strength-heimdal-strength.obj `if test -f 'tools/heimdal-strength.c'; then $(CYGPATH_W) 'tools/heimdal-strength.c'; else $(CYGPATH_W) '$(srcdir)/tools/heimdal-strength.c'; fi`
+@am__fastdepCC_TRUE@   $(AM_V_at)$(am__mv) tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Tpo tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@      $(AM_V_CC)source='tools/heimdal-strength.c' object='tools/heimdal_strength-heimdal-strength.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCC_FALSE@      DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -c -o tools/tools_heimdal_strength-heimdal-strength.obj `if test -f 'tools/heimdal-strength.c'; then $(CYGPATH_W) 'tools/heimdal-strength.c'; else $(CYGPATH_W) '$(srcdir)/tools/heimdal-strength.c'; fi`
+@am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_heimdal_strength_CFLAGS) $(CFLAGS) -c -o tools/heimdal_strength-heimdal-strength.obj `if test -f 'tools/heimdal-strength.c'; then $(CYGPATH_W) 'tools/heimdal-strength.c'; else $(CYGPATH_W) '$(srcdir)/tools/heimdal-strength.c'; fi`
 
 mostlyclean-libtool:
        -rm -f *.lo
@@ -1703,7 +1782,10 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
        -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
-distdir: $(DISTFILES)
+distdir: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
        @case `sed 15q $(srcdir)/NEWS` in \
        *"$(VERSION)"*) : ;; \
        *) \
@@ -1749,7 +1831,7 @@ distdir: $(DISTFILES)
          ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
        || chmod -R a+r "$(distdir)"
 dist-gzip: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+       tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
        $(am__post_remove_distdir)
 
 dist-bzip2: distdir
@@ -1763,6 +1845,10 @@ dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
        $(am__post_remove_distdir)
 
+dist-zstd: distdir
+       tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+       $(am__post_remove_distdir)
+
 dist-tarZ: distdir
        @echo WARNING: "Support for distribution archives compressed with" \
                       "legacy program 'compress' is deprecated." >&2
@@ -1774,7 +1860,7 @@ dist-shar: distdir
        @echo WARNING: "Support for shar distribution archives is" \
                       "deprecated." >&2
        @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+       shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
 dist-zip: distdir
@@ -1792,7 +1878,7 @@ dist dist-all:
 distcheck: dist
        case '$(DIST_ARCHIVES)' in \
        *.tar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
        *.tar.bz2*) \
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lz*) \
@@ -1802,9 +1888,11 @@ distcheck: dist
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+         eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
+       *.tar.zst*) \
+         zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
        esac
        chmod -R a-w $(distdir)
        chmod u+w $(distdir)
@@ -1872,13 +1960,13 @@ distcleancheck: distclean
               $(distcleancheck_listfiles) ; \
               exit 1; } >&2
 check-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LIBRARIES)
        $(MAKE) $(AM_MAKEFLAGS) check-local
 check: check-am
-all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) \
+all-am: Makefile $(PROGRAMS) $(LIBRARIES) $(LTLIBRARIES) $(SCRIPTS) \
                $(MANS) config.h
 installdirs:
-       for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: install-am
@@ -1901,8 +1989,20 @@ install-strip:
            "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
        fi
 mostlyclean-generic:
-       -test -z "$(LIBOBJS)" || rm -f $(LIBOBJS)
-       -test -z "$(LTLIBOBJS)" || rm -f $(LTLIBOBJS)
+       -rm -f portable/asprintf.$(OBJEXT)
+       -rm -f portable/asprintf.lo
+       -rm -f portable/krb5-extra.$(OBJEXT)
+       -rm -f portable/krb5-extra.lo
+       -rm -f portable/krb5-profile.$(OBJEXT)
+       -rm -f portable/krb5-profile.lo
+       -rm -f portable/mkstemp.$(OBJEXT)
+       -rm -f portable/mkstemp.lo
+       -rm -f portable/reallocarray.$(OBJEXT)
+       -rm -f portable/reallocarray.lo
+       -rm -f portable/snprintf.$(OBJEXT)
+       -rm -f portable/snprintf.lo
+       -rm -f portable/strndup.$(OBJEXT)
+       -rm -f portable/strndup.lo
 
 clean-generic:
        -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
@@ -1944,7 +2044,63 @@ clean-am: clean-binPROGRAMS clean-checkLIBRARIES clean-checkPROGRAMS \
 
 distclean: distclean-am
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
-       -rm -rf cracklib/$(DEPDIR) plugin/$(DEPDIR) portable/$(DEPDIR) tests/$(DEPDIR) tests/plugin/$(DEPDIR) tests/portable/$(DEPDIR) tests/tap/$(DEPDIR) tests/util/$(DEPDIR) tools/$(DEPDIR) util/$(DEPDIR)
+               -rm -f cracklib/$(DEPDIR)/libcracklib_la-fascist.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-packlib.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-rules.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-stringlib.Plo
+       -rm -f cracklib/$(DEPDIR)/packer.Po
+       -rm -f plugin/$(DEPDIR)/cdb.Plo
+       -rm -f plugin/$(DEPDIR)/classes.Plo
+       -rm -f plugin/$(DEPDIR)/config.Plo
+       -rm -f plugin/$(DEPDIR)/cracklib.Plo
+       -rm -f plugin/$(DEPDIR)/error.Plo
+       -rm -f plugin/$(DEPDIR)/general.Plo
+       -rm -f plugin/$(DEPDIR)/heimdal.Plo
+       -rm -f plugin/$(DEPDIR)/mit.Plo
+       -rm -f plugin/$(DEPDIR)/principal.Plo
+       -rm -f plugin/$(DEPDIR)/sqlite.Plo
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-classes.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-config.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-cracklib.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-error.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-general.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-principal.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-sqlite.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-vector.Po
+       -rm -f plugin/$(DEPDIR)/vector.Plo
+       -rm -f portable/$(DEPDIR)/asprintf.Plo
+       -rm -f portable/$(DEPDIR)/dummy.Plo
+       -rm -f portable/$(DEPDIR)/krb5-extra.Plo
+       -rm -f portable/$(DEPDIR)/krb5-profile.Plo
+       -rm -f portable/$(DEPDIR)/mkstemp.Plo
+       -rm -f portable/$(DEPDIR)/reallocarray.Plo
+       -rm -f portable/$(DEPDIR)/snprintf.Plo
+       -rm -f portable/$(DEPDIR)/strndup.Plo
+       -rm -f tests/$(DEPDIR)/runtests-runtests.Po
+       -rm -f tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po
+       -rm -f tests/plugin/$(DEPDIR)/mit_t-mit-t.Po
+       -rm -f tests/portable/$(DEPDIR)/asprintf-t.Po
+       -rm -f tests/portable/$(DEPDIR)/asprintf.Po
+       -rm -f tests/portable/$(DEPDIR)/mkstemp-t.Po
+       -rm -f tests/portable/$(DEPDIR)/mkstemp.Po
+       -rm -f tests/portable/$(DEPDIR)/reallocarray-t.Po
+       -rm -f tests/portable/$(DEPDIR)/reallocarray.Po
+       -rm -f tests/portable/$(DEPDIR)/snprintf-t.Po
+       -rm -f tests/portable/$(DEPDIR)/snprintf.Po
+       -rm -f tests/portable/$(DEPDIR)/strndup-t.Po
+       -rm -f tests/portable/$(DEPDIR)/strndup.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-basic.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-kerberos.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-process.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-string.Po
+       -rm -f tests/util/$(DEPDIR)/messages-krb5-t.Po
+       -rm -f tests/util/$(DEPDIR)/messages-t.Po
+       -rm -f tests/util/$(DEPDIR)/xmalloc.Po
+       -rm -f tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po
+       -rm -f util/$(DEPDIR)/messages-krb5.Po
+       -rm -f util/$(DEPDIR)/messages.Po
+       -rm -f util/$(DEPDIR)/xmalloc.Po
        -rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
        distclean-hdr distclean-libtool distclean-tags
@@ -1992,7 +2148,63 @@ installcheck-am:
 maintainer-clean: maintainer-clean-am
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
        -rm -rf $(top_srcdir)/autom4te.cache
-       -rm -rf cracklib/$(DEPDIR) plugin/$(DEPDIR) portable/$(DEPDIR) tests/$(DEPDIR) tests/plugin/$(DEPDIR) tests/portable/$(DEPDIR) tests/tap/$(DEPDIR) tests/util/$(DEPDIR) tools/$(DEPDIR) util/$(DEPDIR)
+               -rm -f cracklib/$(DEPDIR)/libcracklib_la-fascist.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-packlib.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-rules.Plo
+       -rm -f cracklib/$(DEPDIR)/libcracklib_la-stringlib.Plo
+       -rm -f cracklib/$(DEPDIR)/packer.Po
+       -rm -f plugin/$(DEPDIR)/cdb.Plo
+       -rm -f plugin/$(DEPDIR)/classes.Plo
+       -rm -f plugin/$(DEPDIR)/config.Plo
+       -rm -f plugin/$(DEPDIR)/cracklib.Plo
+       -rm -f plugin/$(DEPDIR)/error.Plo
+       -rm -f plugin/$(DEPDIR)/general.Plo
+       -rm -f plugin/$(DEPDIR)/heimdal.Plo
+       -rm -f plugin/$(DEPDIR)/mit.Plo
+       -rm -f plugin/$(DEPDIR)/principal.Plo
+       -rm -f plugin/$(DEPDIR)/sqlite.Plo
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-cdb.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-classes.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-config.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-cracklib.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-error.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-general.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-principal.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-sqlite.Po
+       -rm -f plugin/$(DEPDIR)/tools_heimdal_strength-vector.Po
+       -rm -f plugin/$(DEPDIR)/vector.Plo
+       -rm -f portable/$(DEPDIR)/asprintf.Plo
+       -rm -f portable/$(DEPDIR)/dummy.Plo
+       -rm -f portable/$(DEPDIR)/krb5-extra.Plo
+       -rm -f portable/$(DEPDIR)/krb5-profile.Plo
+       -rm -f portable/$(DEPDIR)/mkstemp.Plo
+       -rm -f portable/$(DEPDIR)/reallocarray.Plo
+       -rm -f portable/$(DEPDIR)/snprintf.Plo
+       -rm -f portable/$(DEPDIR)/strndup.Plo
+       -rm -f tests/$(DEPDIR)/runtests-runtests.Po
+       -rm -f tests/plugin/$(DEPDIR)/heimdal_t-heimdal-t.Po
+       -rm -f tests/plugin/$(DEPDIR)/mit_t-mit-t.Po
+       -rm -f tests/portable/$(DEPDIR)/asprintf-t.Po
+       -rm -f tests/portable/$(DEPDIR)/asprintf.Po
+       -rm -f tests/portable/$(DEPDIR)/mkstemp-t.Po
+       -rm -f tests/portable/$(DEPDIR)/mkstemp.Po
+       -rm -f tests/portable/$(DEPDIR)/reallocarray-t.Po
+       -rm -f tests/portable/$(DEPDIR)/reallocarray.Po
+       -rm -f tests/portable/$(DEPDIR)/snprintf-t.Po
+       -rm -f tests/portable/$(DEPDIR)/snprintf.Po
+       -rm -f tests/portable/$(DEPDIR)/strndup-t.Po
+       -rm -f tests/portable/$(DEPDIR)/strndup.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-basic.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-kerberos.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-process.Po
+       -rm -f tests/tap/$(DEPDIR)/libtap_a-string.Po
+       -rm -f tests/util/$(DEPDIR)/messages-krb5-t.Po
+       -rm -f tests/util/$(DEPDIR)/messages-t.Po
+       -rm -f tests/util/$(DEPDIR)/xmalloc.Po
+       -rm -f tools/$(DEPDIR)/heimdal_strength-heimdal-strength.Po
+       -rm -f util/$(DEPDIR)/messages-krb5.Po
+       -rm -f util/$(DEPDIR)/messages.Po
+       -rm -f util/$(DEPDIR)/xmalloc.Po
        -rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic \
        maintainer-clean-local
@@ -2017,29 +2229,29 @@ uninstall-man: uninstall-man1 uninstall-man5
 
 .MAKE: all check-am install-am install-strip
 
-.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am \
-       check-local clean clean-binPROGRAMS clean-checkLIBRARIES \
-       clean-checkPROGRAMS clean-cscope clean-generic clean-libtool \
-       clean-moduleLTLIBRARIES clean-noinstLIBRARIES \
-       clean-noinstLTLIBRARIES cscope cscopelist-am ctags ctags-am \
-       dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
-       dist-tarZ dist-xz dist-zip distcheck distclean \
-       distclean-compile distclean-generic distclean-hdr \
-       distclean-libtool distclean-tags distcleancheck distdir \
-       distuninstallcheck dvi dvi-am html html-am info info-am \
-       install install-am install-binPROGRAMS install-data \
-       install-data-am install-dist_binSCRIPTS install-dvi \
-       install-dvi-am install-exec install-exec-am install-html \
-       install-html-am install-info install-info-am install-man \
-       install-man1 install-man5 install-moduleLTLIBRARIES \
-       install-pdf install-pdf-am install-ps install-ps-am \
-       install-strip installcheck installcheck-am installdirs \
-       maintainer-clean maintainer-clean-generic \
-       maintainer-clean-local mostlyclean mostlyclean-compile \
-       mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-       tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
-       uninstall-dist_binSCRIPTS uninstall-man uninstall-man1 \
-       uninstall-man5 uninstall-moduleLTLIBRARIES
+.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles am--refresh check \
+       check-am check-local clean clean-binPROGRAMS \
+       clean-checkLIBRARIES clean-checkPROGRAMS clean-cscope \
+       clean-generic clean-libtool clean-moduleLTLIBRARIES \
+       clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscope \
+       cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+       dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
+       dist-zstd distcheck distclean distclean-compile \
+       distclean-generic distclean-hdr distclean-libtool \
+       distclean-tags distcleancheck distdir distuninstallcheck dvi \
+       dvi-am html html-am info info-am install install-am \
+       install-binPROGRAMS install-data install-data-am \
+       install-dist_binSCRIPTS install-dvi install-dvi-am \
+       install-exec install-exec-am install-html install-html-am \
+       install-info install-info-am install-man install-man1 \
+       install-man5 install-moduleLTLIBRARIES install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic maintainer-clean-local mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
+       uninstall-binPROGRAMS uninstall-dist_binSCRIPTS uninstall-man \
+       uninstall-man1 uninstall-man5 uninstall-moduleLTLIBRARIES
 
 .PRECIOUS: Makefile
 
@@ -2075,20 +2287,28 @@ warnings:
 check-local: $(check_PROGRAMS) tests/data/dictionary.pwd
        cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS
 
-# Used by maintainers to run the main test suite under valgrind.  Suppress
-# the xmalloc and pod-spelling tests because the former won't work properly
-# under valgrind (due to increased memory usage) and the latter is pointless
-# to run under valgrind.  Don't try to trace several of the tests that are
-# written in Perl or shell and test Perl programs.
+# Used by maintainers to check the source code with cppcheck.
+check-cppcheck:
+       cd $(abs_top_srcdir) &&                                         \
+           find . -name .git -prune -o -name '*.[ch]' -print           \
+           | cppcheck -q --force --error-exitcode=2 --file-list=-      \
+               --suppressions-list=tests/data/cppcheck.supp            \
+               --enable=warning,performance,portability,style
+
+# Used by maintainers to run the main test suite under valgrind.
 check-valgrind: $(check_PROGRAMS) tests/data/dictionary.pwd
-       rm -rf $(abs_top_builddir)/tmp-valgrind
-       mkdir $(abs_top_builddir)/tmp-valgrind
-       env RRA_MAINTAINER_TESTS= valgrind --leak-check=full            \
-           --show-reachable=yes --trace-children=yes                   \
-           --log-file=$(abs_top_builddir)/tmp-valgrind/log.%p          \
-           --suppressions=$(abs_top_srcdir)/tests/data/valgrind.supp   \
-           --trace-children-skip="/bin/sh,*/cat,*/diff,*/expr,*/grep,*/mkdir,*/rm,*/rmdir,*/sed,*/sleep,*/true,*/wc,*/docs/*-t,*/perl/*-t,*/data/make-krb5-conf,*/tools/heimdal-history-t,*/tools/wordlist*-t" \
-           tests/runtests -l '$(abs_top_srcdir)/tests/TESTS'
+       rm -rf $(abs_top_builddir)/tests/tmp
+       mkdir $(abs_top_builddir)/tests/tmp
+       mkdir $(abs_top_builddir)/tests/tmp/valgrind
+       C_TAP_VALGRIND="$(VALGRIND_COMMAND)" tests/runtests \
+           -l '$(abs_top_srcdir)/tests/TESTS'
+
+# Used by maintainers to reformat all source code using clang-format and
+# excluding some files.
+reformat:
+       find . -name '*.[ch]' \! -name snprintf.c \! -name krb5-profile.c \
+           \! -path './cracklib/*' -print                                \
+           | xargs clang-format-10 -style=file -i
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/NEWS b/NEWS
index 27ec12c20fa5fb8e24da8303bc322e55591cbb54..973f5a99926118914da77312a6e1619ae332f755 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,61 @@
                     User-Visible krb5-strength Changes
 
+krb5-strength 3.2 (2020-05-17)
+
+    Add new -c (--check-only) option to heimdal-history to check whether a
+    password would be accepted without updating the history or password
+    length databases.  Based on work by macrotex.
+
+    Increase hash iterations for heimdal-history by roughly a factor of
+    four to increase the time required for a password hash to about 0.1
+    seconds on modern hardware.  This will affect newly-stored history
+    entries but will not invalidate existing password history entries.
+
+    Support building without CrackLib support by passing
+    --without-cracklib to configure.  This makes the code a bit simpler
+    and lighter if you don't intend to ever use the CrackLib support.
+
+    krb5-strength-wordlist now requires Perl 5.010 or later.
+
+    Use explicit_bzero instead of memset, where available, to overwrite
+    copies of passwords before freeing memory.  This reduces the lifetime
+    of passwords in memory.
+
+    Skip tests that require the stronger rule configuration in the
+    embedded CrackLib when built against system CrackLib.  This avoids
+    test failures when built with system CrackLib.
+
+    Rework the check-valgrind target to use the new C TAP Harness valgrind
+    support and automatically check the valgrind log files for errors at
+    the end of the test suite.
+
+    Add SPDX-License-Identifier headers to all substantial source files
+    other than those in the bundled version of CrackLib.
+
+    Update to rra-c-util 8.2:
+
+    * Implement explicit_bzero with memset if it is not available.
+    * Reformat all C source using clang-format 10.
+    * Work around Test::Strict not skipping .git directories.
+    * Fix warnings with perltidy 20190601 and Perl::Critic 1.134.
+    * Improve check for obsolete strings.
+    * Use a more standard all-permissive license.
+    * Add SPDX-License-Identifier headers to all substantial source files.
+    * Skip more build system files when running the test suite.
+    * Fix warnings with Clang 10, GCC 10, and the Clang static analyzer.
+    * Exclude more valgrind false positives with Kerberos libraries.
+    * Improve support for AIX's bundled Kerberos.
+
+    Update to C TAP Harness 4.7:
+
+    * Fix warnings with GCC 10.
+    * Reformat all C source using clang-format 10.
+    * Fixed malloc error checking in bstrndup.
+    * Add support for valgrind testing via test list options.
+    * Report test failures as left and right, not wanted and seen.
+    * Fix is_string comparisons involving NULL pointers and "(null)".
+    * Add SPDX-License-Identifier headers to all substantial source files.
+
 krb5-strength 3.1 (2016-12-25)
 
     A new configuration option, cracklib_maxlen, can be set to skip
diff --git a/README b/README
index 2f7bf9d2930d1b633935ab0a71c2c87deaeee3c7..9327c463bf0a61c2b6cfeae969135519a37b2778 100644 (file)
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
-                            krb5-strength 3.1
+                            krb5-strength 3.2
                (Kerberos password strength checking plugin)
                Maintained by Russ Allbery <eagle@eyrie.org>
 
-  Copyright 2016 Russ Allbery <eagle@eyrie.org>.  Copyright 2006-2007,
-  2009-2010, 2012-2014 The Board of Trustees of the Leland Stanford Junior
-  University.  Copyright 1993 Alec Muffett.  This software is distributed
-  under a BSD-style license.  Please see the section LICENSE below for
-  more information.
+  Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>.  Copyright
+  2006-2007, 2009-2010, 2012-2014 The Board of Trustees of the Leland
+  Stanford Junior University.  Copyright 1993 Alec Muffett.  This software
+  is distributed under a BSD-style license.  Please see the section
+  LICENSE below for more information.
 
 BLURB
 
@@ -82,7 +82,7 @@ REQUIREMENTS
   For Heimdal, you may use either the external password quality check
   tool, installed as heimdal-strength, or the plugin as you choose.  It
   has been tested with Heimdal 1.2.1 and later, but has not recently been
-  tested with versions prior to 1.5.
+  tested with versions prior to 7.0.
 
   For MIT Kerberos, version 1.9 or higher is required for the password
   quality plugin interface.  MIT Kerberos does not support an external
@@ -115,7 +115,7 @@ REQUIREMENTS
   For building a CDB or SQLite dictionary, use the provided
   krb5-strength-wordlist program.  For CDB dictionries, the cdb utility
   must be on your PATH.  For SQLite, the DBI and DBD::SQLite Perl modules
-  are required.  krb5-strength-wordlist requires Perl 5.006 or later.
+  are required.  krb5-strength-wordlist requires Perl 5.010 or later.
 
   For a word list to use as source for the dictionary, you can use
   /usr/share/dict/words if it's available on your system, but it would be
@@ -135,27 +135,6 @@ REQUIREMENTS
 
   and their dependencies.
 
-  To run the test suite, you will need Perl 5.010 or later and the
-  dependencies of the heimdal-history program.  The following additional
-  Perl modules will also be used by the test suite if present:
-
-  * Perl6::Slurp
-  * Test::MinimumVersion
-  * Test::Perl::Critic
-  * Test::Pod
-  * Test::Spelling
-  * Test::Strict
-
-  All are available on CPAN.  Some tests will be skipped if the modules
-  are not available.
-
-  To enable tests that don't detect functionality problems but are used to
-  sanity-check the release, set the environment variable RELEASE_TESTING
-  to a true value.  To enable tests that may be sensitive to the local
-  environment or that produce a lot of false positives without uncovering
-  many problems, set the environment variable AUTHOR_TESTING to a true
-  value.
-
   To bootstrap from a Git checkout, or if you change the Automake files
   and need to regenerate Makefile.in, you will need Automake 1.11 or
   later.  For bootstrap or if you change configure.ac or any of the m4
@@ -188,7 +167,9 @@ BUILDING AND INSTALLATION
   with the system version of CrackLib, pass --with-cracklib to configure.
   You can optionally add a directory, giving the root directory where
   CrackLib was installed, or separately set the include and library path
-  with --with-cracklib-include and --with-cracklib-lib.
+  with --with-cracklib-include and --with-cracklib-lib.  You can also
+  build without any CrackLib support by passing --without-cracklib to
+  configure.
 
   krb5-strength will automatically build with TinyCDB if it is found.  To
   specify the installation path of TinyCDB, use --with-tinycdb.  You can
@@ -233,7 +214,8 @@ BUILDING AND INSTALLATION
 
   Pass --enable-silent-rules to configure for a quieter build (similar to
   the Linux kernel).  Use make warnings instead of make to build with full
-  GCC compiler warnings (requires a relatively current version of GCC).
+  compiler warnings (requires either GCC or Clang and may require a
+  relatively current version of the compiler).
 
   You can pass the --enable-reduced-depends flag to configure to try to
   minimize the shared library dependencies encoded in the binaries.  This
@@ -264,6 +246,27 @@ TESTING
   Do this instead of running the test program directly since it will
   ensure that necessary environment variables are set up.
 
+  To run the test suite, you will need Perl 5.010 or later and the
+  dependencies of the heimdal-history program.  The following additional
+  Perl modules will also be used by the test suite if present:
+
+  * Perl6::Slurp
+  * Test::MinimumVersion
+  * Test::Perl::Critic
+  * Test::Pod
+  * Test::Spelling
+  * Test::Strict
+
+  All are available on CPAN.  Some tests will be skipped if the modules
+  are not available.
+
+  To enable tests that don't detect functionality problems but are used to
+  sanity-check the release, set the environment variable RELEASE_TESTING
+  to a true value.  To enable tests that may be sensitive to the local
+  environment or that produce a lot of false positives without uncovering
+  many problems, set the environment variable AUTHOR_TESTING to a true
+  value.
+
 SUPPORT
 
   The krb5-strength web page at:
@@ -294,7 +297,7 @@ SOURCE REPOSITORY
 
   or view the repository via the web at:
 
-      https://git.eyrie.org/?p=devel/krb5-strength.git
+      https://git.eyrie.org/?p=kerberos/krb5-strength.git
 
   The eyrie.org repository is the canonical one, maintained by the author,
   but using GitHub is probably more convenient for most purposes.  Pull
@@ -305,7 +308,7 @@ LICENSE
   The krb5-strength package as a whole is covered by the following
   copyright statement and license:
 
-    Copyright 2016 Russ Allbery <eagle@eyrie.org>
+    Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
     Copyright 2006-2007, 2009-2010, 2012-2014
         The Board of Trustees of the Leland Stanford Junior University
     Copyright 1993 Alec Muffett
@@ -345,5 +348,10 @@ LICENSE
   notices.  All required notices, and detailed information about the
   licensing of each file, are recorded in the LICENSE file.
 
+  Files covered by a license with an assigned SPDX License Identifier
+  include SPDX-License-Identifier tags to enable automated processing of
+  license information.  See https://spdx.org/licenses/ for more
+  information.
+
   For any copyright range specified by files in this package as YYYY-ZZZZ,
   the range specifies every single year in that closed interval.
index 67f2e686338239ef203cb32ebc27ffca38bae29b..9d84710df6097cd5e7b8693e2a22e4f7a8a81298 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,6 +1,11 @@
-# krb5-strength 3.1
+# krb5-strength 3.2
 
-Copyright 2016 Russ Allbery <eagle@eyrie.org>.  Copyright 2006-2007,
+[![Build
+status](https://github.com/rra/krb5-strength/workflows/build/badge.svg)](https://github.com/rra/krb5-strength/actions)
+[![Debian
+package](https://img.shields.io/debian/v/krb5-strength)](https://tracker.debian.org/pkg/krb5-strength)
+
+Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>.  Copyright 2006-2007,
 2009-2010, 2012-2014 The Board of Trustees of the Leland Stanford Junior
 University.  Copyright 1993 Alec Muffett.  This software is distributed
 under a BSD-style license.  Please see the section [License](#license)
@@ -80,7 +85,7 @@ history implementation.
 For Heimdal, you may use either the external password quality check tool,
 installed as heimdal-strength, or the plugin as you choose.  It has been
 tested with Heimdal 1.2.1 and later, but has not recently been tested with
-versions prior to 1.5.
+versions prior to 7.0.
 
 For MIT Kerberos, version 1.9 or higher is required for the password
 quality plugin interface.  MIT Kerberos does not support an external
@@ -113,7 +118,7 @@ distribution); the database format is compatible.
 For building a CDB or SQLite dictionary, use the provided
 `krb5-strength-wordlist` program.  For CDB dictionries, the `cdb` utility
 must be on your `PATH`.  For SQLite, the DBI and DBD::SQLite Perl modules
-are required.  `krb5-strength-wordlist` requires Perl 5.006 or later.
+are required.  `krb5-strength-wordlist` requires Perl 5.010 or later.
 
 For a word list to use as source for the dictionary, you can use
 `/usr/share/dict/words` if it's available on your system, but it would be
@@ -133,27 +138,6 @@ later plus the following CPAN modules:
 
 and their dependencies.
 
-To run the test suite, you will need Perl 5.010 or later and the
-dependencies of the `heimdal-history` program.  The following additional
-Perl modules will also be used by the test suite if present:
-
-* Perl6::Slurp
-* Test::MinimumVersion
-* Test::Perl::Critic
-* Test::Pod
-* Test::Spelling
-* Test::Strict
-
-All are available on CPAN.  Some tests will be skipped if the modules are
-not available.
-
-To enable tests that don't detect functionality problems but are used to
-sanity-check the release, set the environment variable `RELEASE_TESTING`
-to a true value.  To enable tests that may be sensitive to the local
-environment or that produce a lot of false positives without uncovering
-many problems, set the environment variable `AUTHOR_TESTING` to a true
-value.
-
 To bootstrap from a Git checkout, or if you change the Automake files and
 need to regenerate Makefile.in, you will need Automake 1.11 or later.  For
 bootstrap or if you change configure.ac or any of the m4 files it includes
@@ -182,13 +166,15 @@ By default, the Heimdal external password check function is installed as
 `/usr/local/bin/heimdal-strength`, and the plugin is installed as
 `/usr/local/lib/krb5/plugins/pwqual/strength.so`.  You can change these
 paths with the `--prefix`, `--libdir`, and `--bindir` options to
-configure.
+`configure`.
 
 By default, the embedded version of CrackLib will be used.  To build with
-the system version of CrackLib, pass `--with-cracklib` to configure.  You
-can optionally add a directory, giving the root directory where CrackLib
-was installed, or separately set the include and library path with
-`--with-cracklib-include` and `--with-cracklib-lib`.
+the system version of CrackLib, pass `--with-cracklib` to `configure`.
+You can optionally add a directory, giving the root directory where
+CrackLib was installed, or separately set the include and library path
+with `--with-cracklib-include` and `--with-cracklib-lib`.  You can also
+build without any CrackLib support by passing `--without-cracklib` to
+`configure`.
 
 krb5-strength will automatically build with TinyCDB if it is found.  To
 specify the installation path of TinyCDB, use `--with-tinycdb`.  You can
@@ -239,7 +225,8 @@ path:
 
 Pass `--enable-silent-rules` to configure for a quieter build (similar to
 the Linux kernel).  Use `make warnings` instead of `make` to build with
-full GCC compiler warnings (requires a relatively current version of GCC).
+full GCC compiler warnings (requires either GCC or Clang and may require a
+relatively current version of the compiler).
 
 You can pass the `--enable-reduced-depends` flag to configure to try to
 minimize the shared library dependencies encoded in the binaries.  This
@@ -274,6 +261,27 @@ If a test fails, you can run a single test with verbose output via:
 Do this instead of running the test program directly since it will ensure
 that necessary environment variables are set up.
 
+To run the test suite, you will need Perl 5.010 or later and the
+dependencies of the `heimdal-history` program.  The following additional
+Perl modules will also be used by the test suite if present:
+
+* Perl6::Slurp
+* Test::MinimumVersion
+* Test::Perl::Critic
+* Test::Pod
+* Test::Spelling
+* Test::Strict
+
+All are available on CPAN.  Some tests will be skipped if the modules are
+not available.
+
+To enable tests that don't detect functionality problems but are used to
+sanity-check the release, set the environment variable `RELEASE_TESTING`
+to a true value.  To enable tests that may be sensitive to the local
+environment or that produce a lot of false positives without uncovering
+many problems, set the environment variable `AUTHOR_TESTING` to a true
+value.
+
 ## Support
 
 The [krb5-strength web
@@ -296,7 +304,7 @@ repository at:
 https://git.eyrie.org/git/kerberos/krb5-strength.git
 
 or [view the repository on the
-web](https://git.eyrie.org/?p=devel/krb5-strength.git).
+web](https://git.eyrie.org/?p=kerberos/krb5-strength.git).
 
 The eyrie.org repository is the canonical one, maintained by the author,
 but using GitHub is probably more convenient for most purposes.  Pull
@@ -307,7 +315,7 @@ requests are gratefully reviewed and normally accepted.
 The krb5-strength package as a whole is covered by the following copyright
 statement and license:
 
-> Copyright 2016
+> Copyright 2016, 2020
 >     Russ Allbery <eagle@eyrie.org>
 >
 > Copyright 2006-2007, 2009-2010, 2012-2014
@@ -350,5 +358,9 @@ license but which may require preservation of additional notices.  All
 required notices, and detailed information about the licensing of each
 file, are recorded in the LICENSE file.
 
+Files covered by a license with an assigned SPDX License Identifier
+include SPDX-License-Identifier tags to enable automated processing of
+license information.  See https://spdx.org/licenses/ for more information.
+
 For any copyright range specified by files in this package as YYYY-ZZZZ,
 the range specifies every single year in that closed interval.
index a6a1755223c960bcd013f1390f38bda1ae1b353c..0ebf1c7c183b181967744ebfad4eafca87c39c7c 100644 (file)
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -134,9 +134,9 @@ AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
               | (ullmax / ull) | (ullmax % ull));]])
 ])
 
-dnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
-dnl serial 11 (pkg-config-0.29)
-dnl
+# pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
+# serial 12 (pkg-config-0.29.2)
+
 dnl Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>.
 dnl Copyright Â© 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 dnl
@@ -177,7 +177,7 @@ dnl
 dnl See the "Since" comment for each macro you use to see what version
 dnl of the macros you require.
 m4_defun([PKG_PREREQ],
-[m4_define([PKG_MACROS_VERSION], [0.29])
+[m4_define([PKG_MACROS_VERSION], [0.29.2])
 m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
     [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
 ])dnl PKG_PREREQ
@@ -278,7 +278,7 @@ AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
 AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
 
 pkg_failed=no
-AC_MSG_CHECKING([for $1])
+AC_MSG_CHECKING([for $2])
 
 _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
 _PKG_CONFIG([$1][_LIBS], [libs], [$2])
@@ -288,11 +288,11 @@ and $1[]_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details.])
 
 if test $pkg_failed = yes; then
-       AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
         _PKG_SHORT_ERRORS_SUPPORTED
         if test $_pkg_short_errors_supported = yes; then
                $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
-        else 
+        else
                $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
@@ -309,7 +309,7 @@ installed software in a non-standard prefix.
 _PKG_TEXT])[]dnl
         ])
 elif test $pkg_failed = untried; then
-       AC_MSG_RESULT([no])
+        AC_MSG_RESULT([no])
        m4_default([$4], [AC_MSG_FAILURE(
 [The pkg-config script could not be found or is too old.  Make sure it
 is in your PATH or set the PKG_CONFIG environment variable to the full
@@ -410,7 +410,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
 AS_VAR_IF([$1], [""], [$5], [$4])dnl
 ])dnl PKG_CHECK_VAR
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -422,10 +422,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.15'
+[am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.16.2], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -441,12 +441,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.16.2])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+# Copyright (C) 2011-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -508,7 +508,7 @@ AC_SUBST([AR])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -560,7 +560,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -591,7 +591,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -782,13 +782,12 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
@@ -796,49 +795,43 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  AS_CASE([$CONFIG_FILES],
+          [*\'*], [eval set x "$CONFIG_FILES"],
+          [*], [set x $CONFIG_FILES])
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`AS_DIRNAME("$mf")`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`AS_DIRNAME(["$file"])`
-      AS_MKDIR_P([$dirpart/$fdir])
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`AS_DIRNAME(["$am_mf"])`
+    am_filepart=`AS_BASENAME(["$am_mf"])`
+    AM_RUN_LOG([cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles]) || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE="gmake" (or whatever is
+    necessary).  You can also try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).])
+  fi
+  AS_UNSET([am_dirpart])
+  AS_UNSET([am_filepart])
+  AS_UNSET([am_mf])
+  AS_UNSET([am_rc])
+  rm -f conftest-deps.mk
 }
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
@@ -847,18 +840,17 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
 # -----------------------------
 # This macro should only be invoked once -- use via AC_REQUIRE.
 #
-# This code is only required when automatic dependency tracking
-# is enabled.  FIXME.  This creates each '.P' file that we will
-# need in order to bootstrap the dependency handling code.
+# This code is only required when automatic dependency tracking is enabled.
+# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
+# order to bootstrap the dependency handling code.
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 [AC_CONFIG_COMMANDS([depfiles],
      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
-     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
+     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -945,8 +937,8 @@ AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
 # We need awk for the "check" target (and possibly the TAP driver).  The
 # system "awk" is bad on some platforms.
@@ -1013,7 +1005,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -1055,7 +1047,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1076,7 +1068,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1098,7 +1090,7 @@ AC_SUBST([am__leading_dot])])
 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
 # From Jim Meyering
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1133,7 +1125,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
 # Check to see how 'make' treats includes.                 -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1141,49 +1133,42 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 
 # AM_MAKE_INCLUDE()
 # -----------------
-# Check to see how make treats includes.
+# Check whether make has an 'include' directive that can support all
+# the idioms we need for our automatic dependency tracking code.
 AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
+[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
+cat > confinc.mk << 'END'
 am__doit:
-       @echo this is the am__doit target
+       @echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
-     ;;
-   esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
+  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
+      ['0:this is the am__doit target'],
+      [AS_CASE([$s],
+          [BSD], [am__include='.include' am__quote='"'],
+          [am__include='include' am__quote=''])])
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+AC_MSG_RESULT([${_am_result}])
+AC_SUBST([am__include])])
+AC_SUBST([am__quote])])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1222,7 +1207,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1251,7 +1236,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1298,7 +1283,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1317,7 +1302,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1398,7 +1383,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1458,7 +1443,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1486,7 +1471,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1505,7 +1490,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2020 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
index 46c154cb1c6b592e5dbf9cb7aa053855fa6e62d4..21cd6fb560bfa49724497d9ddcd8be4fdf807a2f 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -4,10 +4,10 @@
 #
 # Written by Russ Allbery <eagle@eyrie.org>
 # Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2007, 2010, 20132014
+# Copyright 2007, 2010, 2013-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 set -e
 
index 463b9ec0206e04fb772dc4bc68a731e468e34703..1e9388e2ae3aee28242b809b701bd9bc8bdc97e6 100755 (executable)
@@ -2,9 +2,9 @@
 # Wrapper for Microsoft lib.exe
 
 me=ar-lib
-scriptversion=2012-03-01.08; # UTC
+scriptversion=2019-07-04.01; # UTC
 
-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2020 Free Software Foundation, Inc.
 # Written by Peter Rosin <peda@lysator.liu.se>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -18,7 +18,7 @@ scriptversion=2012-03-01.08; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -65,7 +65,7 @@ func_file_conv ()
        mingw)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin)
+       cygwin | msys)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine)
@@ -224,10 +224,11 @@ elif test -n "$extract"; then
       esac
     done
   else
-    $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
-    do
-      $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
-    done
+    $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
+      | while read member
+        do
+          $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+        done
   fi
 
 elif test -n "$quick$replace"; then
index a85b723c7e67d46316e85e7422bd5088e9136042..23fcba011321a3a2b3b94a8abb13201dbdd1faa5 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -53,7 +53,7 @@ func_file_conv ()
          MINGW*)
            file_conv=mingw
            ;;
-         CYGWIN*)
+         CYGWIN* | MSYS*)
            file_conv=cygwin
            ;;
          *)
@@ -67,7 +67,7 @@ func_file_conv ()
        mingw/*)
          file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
          ;;
-       cygwin/*)
+       cygwin/* | msys/*)
          file=`cygpath -m "$file" || echo "$file"`
          ;;
        wine/*)
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -339,9 +340,9 @@ exit $ret
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 2e9ad7fe8189d20ca777d62a38609942e7732c25..f50dcdb6de2af0a2e33f44704da3ec1286e5f291 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2016-10-02'
+timestamp='2018-02-24'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-10-02'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -27,7 +27,7 @@ timestamp='2016-10-02'
 # Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
 #
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 #
 # Please send patches to <config-patches@gnu.org>.
 
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
 
 Output the configuration name of the system \`$me' is run on.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -50,7 +50,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -107,9 +107,9 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
 dummy=$tmp/dummy ;
 tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
 case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,)    echo "int x;" > $dummy.c ;
+ ,,)    echo "int x;" > "$dummy.c" ;
        for c in cc gcc c89 c99 ; do
-         if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+         if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
             CC_FOR_BUILD="$c"; break ;
          fi ;
        done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
 Linux|GNU|GNU/*)
        # If the system lacks a compiler, then just pick glibc.
        # We could probably try harder.
        LIBC=gnu
 
-       eval $set_cc_for_build
-       cat <<-EOF > $dummy.c
+       eval "$set_cc_for_build"
+       cat <<-EOF > "$dummy.c"
        #include <features.h>
        #if defined(__UCLIBC__)
        LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
        LIBC=gnu
        #endif
        EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+       # If ldd exists, use it to detect musl libc.
+       if command -v ldd >/dev/null && \
+               ldd --version 2>&1 | grep -q ^musl
+       then
+           LIBC=musl
+       fi
        ;;
 esac
 
 # Note: order is significant - the case branches are not exclusive.
 
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
     *:NetBSD:*:*)
        # NetBSD (nbsd) targets should (where applicable) match one or
        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -169,30 +176,30 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # portion of the name.  We always set it to "unknown".
        sysctl="sysctl -n hw.machine_arch"
        UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
-           /sbin/$sysctl 2>/dev/null || \
-           /usr/sbin/$sysctl 2>/dev/null || \
+           "/sbin/$sysctl" 2>/dev/null || \
+           "/usr/sbin/$sysctl" 2>/dev/null || \
            echo unknown)`
-       case "${UNAME_MACHINE_ARCH}" in
+       case "$UNAME_MACHINE_ARCH" in
            armeb) machine=armeb-unknown ;;
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
            sh5el) machine=sh5le-unknown ;;
            earmv*)
-               arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
-               endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
-               machine=${arch}${endian}-unknown
+               arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+               endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+               machine="${arch}${endian}"-unknown
                ;;
-           *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+           *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
        esac
        # The Operating System including object format, if it has switched
        # to ELF recently (or will in the future) and ABI.
-       case "${UNAME_MACHINE_ARCH}" in
+       case "$UNAME_MACHINE_ARCH" in
            earm*)
                os=netbsdelf
                ;;
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
-               eval $set_cc_for_build
+               eval "$set_cc_for_build"
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
                        | grep -q __ELF__
                then
@@ -208,10 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                ;;
        esac
        # Determine ABI tags.
-       case "${UNAME_MACHINE_ARCH}" in
+       case "$UNAME_MACHINE_ARCH" in
            earm*)
                expr='s/^earmv[0-9]/-eabi/;s/eb$//'
-               abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+               abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
                ;;
        esac
        # The OS release
@@ -219,46 +226,55 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # thus, need a distinct triplet. However, they do not need
        # kernel version information, so it can be replaced with a
        # suitable tag, in the style of linux-gnu.
-       case "${UNAME_VERSION}" in
+       case "$UNAME_VERSION" in
            Debian*)
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+               release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
        # contains redundant information, the shorter form:
        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
-       echo "${machine}-${os}${release}${abi}"
+       echo "$machine-${os}${release}${abi}"
        exit ;;
     *:Bitrig:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+       echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
        exit ;;
     *:OpenBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
        exit ;;
     *:LibertyBSD:*:*)
        UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
-       echo ${UNAME_MACHINE_ARCH}-unknown-libertybsd${UNAME_RELEASE}
+       echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+       exit ;;
+    *:MidnightBSD:*:*)
+       echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
        exit ;;
     *:ekkoBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
        exit ;;
     *:SolidBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
        exit ;;
     macppc:MirBSD:*:*)
-       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
        exit ;;
     *:MirBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
        exit ;;
     *:Sortix:*:*)
-       echo ${UNAME_MACHINE}-unknown-sortix
+       echo "$UNAME_MACHINE"-unknown-sortix
        exit ;;
+    *:Redox:*:*)
+       echo "$UNAME_MACHINE"-unknown-redox
+       exit ;;
+    mips:OSF1:*.*)
+        echo mips-dec-osf1
+        exit ;;
     alpha:OSF1:*:*)
        case $UNAME_RELEASE in
        *4.0)
@@ -310,28 +326,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # A Tn.n version is a released field test version.
        # A Xn.n version is an unreleased experimental baselevel.
        # 1.2 uses "1.2" for uname -r.
-       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+       echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
        # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
        exitcode=$?
        trap '' 0
        exit $exitcode ;;
-    Alpha\ *:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # Should we change UNAME_MACHINE based on the output of uname instead
-       # of the specific Alpha model?
-       echo alpha-pc-interix
-       exit ;;
-    21064:Windows_NT:50:3)
-       echo alpha-dec-winnt3.5
-       exit ;;
     Amiga*:UNIX_System_V:4.0:*)
        echo m68k-unknown-sysv4
        exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-amigaos
+       echo "$UNAME_MACHINE"-unknown-amigaos
        exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
-       echo ${UNAME_MACHINE}-unknown-morphos
+       echo "$UNAME_MACHINE"-unknown-morphos
        exit ;;
     *:OS/390:*:*)
        echo i370-ibm-openedition
@@ -343,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo powerpc-ibm-os400
        exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-       echo arm-acorn-riscix${UNAME_RELEASE}
+       echo arm-acorn-riscix"$UNAME_RELEASE"
        exit ;;
     arm*:riscos:*:*|arm*:RISCOS:*:*)
        echo arm-unknown-riscos
@@ -370,19 +377,19 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
     s390x:SunOS:*:*)
-       echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
        exit ;;
     sun4H:SunOS:5.*:*)
-       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
        exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
-       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
        exit ;;
     i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
-       echo i386-pc-auroraux${UNAME_RELEASE}
+       echo i386-pc-auroraux"$UNAME_RELEASE"
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       eval $set_cc_for_build
+       eval "$set_cc_for_build"
        SUN_ARCH=i386
        # If there is a compiler, see if it is configured for 64-bit objects.
        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
@@ -395,13 +402,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                SUN_ARCH=x86_64
            fi
        fi
-       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
        # it's likely to be more like Solaris than SunOS4.
-       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
        exit ;;
     sun4*:SunOS:*:*)
        case "`/usr/bin/arch -k`" in
@@ -410,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                ;;
        esac
        # Japanese Language versions have a version number like `4.1.3-JL'.
-       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
        exit ;;
     sun3*:SunOS:*:*)
-       echo m68k-sun-sunos${UNAME_RELEASE}
+       echo m68k-sun-sunos"$UNAME_RELEASE"
        exit ;;
     sun*:*:4.2BSD:*)
        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
-       test "x${UNAME_RELEASE}" = x && UNAME_RELEASE=3
+       test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
        case "`/bin/arch`" in
            sun3)
-               echo m68k-sun-sunos${UNAME_RELEASE}
+               echo m68k-sun-sunos"$UNAME_RELEASE"
                ;;
            sun4)
-               echo sparc-sun-sunos${UNAME_RELEASE}
+               echo sparc-sun-sunos"$UNAME_RELEASE"
                ;;
        esac
        exit ;;
     aushp:SunOS:*:*)
-       echo sparc-auspex-sunos${UNAME_RELEASE}
+       echo sparc-auspex-sunos"$UNAME_RELEASE"
        exit ;;
     # The situation for MiNT is a little confusing.  The machine name
     # can be virtually everything (everything which is not
@@ -439,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # MiNT.  But MiNT is downward compatible to TOS, so this should
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint"$UNAME_RELEASE"
        exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint"$UNAME_RELEASE"
        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
-       echo m68k-atari-mint${UNAME_RELEASE}
+       echo m68k-atari-mint"$UNAME_RELEASE"
        exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
-       echo m68k-milan-mint${UNAME_RELEASE}
+       echo m68k-milan-mint"$UNAME_RELEASE"
        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
-       echo m68k-hades-mint${UNAME_RELEASE}
+       echo m68k-hades-mint"$UNAME_RELEASE"
        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
-       echo m68k-unknown-mint${UNAME_RELEASE}
+       echo m68k-unknown-mint"$UNAME_RELEASE"
        exit ;;
     m68k:machten:*:*)
-       echo m68k-apple-machten${UNAME_RELEASE}
+       echo m68k-apple-machten"$UNAME_RELEASE"
        exit ;;
     powerpc:machten:*:*)
-       echo powerpc-apple-machten${UNAME_RELEASE}
+       echo powerpc-apple-machten"$UNAME_RELEASE"
        exit ;;
     RISC*:Mach:*:*)
        echo mips-dec-mach_bsd4.3
        exit ;;
     RISC*:ULTRIX:*:*)
-       echo mips-dec-ultrix${UNAME_RELEASE}
+       echo mips-dec-ultrix"$UNAME_RELEASE"
        exit ;;
     VAX*:ULTRIX*:*:*)
-       echo vax-dec-ultrix${UNAME_RELEASE}
+       echo vax-dec-ultrix"$UNAME_RELEASE"
        exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
-       echo clipper-intergraph-clix${UNAME_RELEASE}
+       echo clipper-intergraph-clix"$UNAME_RELEASE"
        exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
+       eval "$set_cc_for_build"
+       sed 's/^        //' << EOF > "$dummy.c"
 #ifdef __cplusplus
 #include <stdio.h>  /* for printf() prototype */
        int main (int argc, char *argv[]) {
@@ -485,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
 #endif
        #if defined (host_mips) && defined (MIPSEB)
        #if defined (SYSTYPE_SYSV)
-         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+         printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
        #endif
        #if defined (SYSTYPE_SVR4)
-         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+         printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
        #endif
        #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
-         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+         printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
        #endif
        #endif
          exit (-1);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c &&
-         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
-         SYSTEM_NAME=`$dummy $dummyarg` &&
+       $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+         dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
            { echo "$SYSTEM_NAME"; exit; }
-       echo mips-mips-riscos${UNAME_RELEASE}
+       echo mips-mips-riscos"$UNAME_RELEASE"
        exit ;;
     Motorola:PowerMAX_OS:*:*)
        echo powerpc-motorola-powermax
@@ -527,17 +534,17 @@ EOF
     AViiON:dgux:*:*)
        # DG/UX returns AViiON for all architectures
        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+       if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
        then
-           if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
-              [ ${TARGET_BINARY_INTERFACE}x = x ]
+           if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+              [ "$TARGET_BINARY_INTERFACE"x = x ]
            then
-               echo m88k-dg-dgux${UNAME_RELEASE}
+               echo m88k-dg-dgux"$UNAME_RELEASE"
            else
-               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+               echo m88k-dg-dguxbcs"$UNAME_RELEASE"
            fi
        else
-           echo i586-dg-dgux${UNAME_RELEASE}
+           echo i586-dg-dgux"$UNAME_RELEASE"
        fi
        exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
@@ -554,7 +561,7 @@ EOF
        echo m68k-tektronix-bsd
        exit ;;
     *:IRIX*:*:*)
-       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
        exit ;;
     ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
@@ -566,14 +573,14 @@ EOF
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
        else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
        fi
-       echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+       echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
        exit ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-               eval $set_cc_for_build
-               sed 's/^                //' << EOF >$dummy.c
+               eval "$set_cc_for_build"
+               sed 's/^                //' << EOF > "$dummy.c"
                #include <sys/systemcfg.h>
 
                main()
@@ -584,7 +591,7 @@ EOF
                        exit(0);
                        }
 EOF
-               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
                then
                        echo "$SYSTEM_NAME"
                else
@@ -598,7 +605,7 @@ EOF
        exit ;;
     *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
-       if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+       if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
        else
                IBM_ARCH=powerpc
@@ -607,18 +614,18 @@ EOF
                IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
                           awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
        else
-               IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+               IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
        fi
-       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
        exit ;;
     *:AIX:*:*)
        echo rs6000-ibm-aix
        exit ;;
-    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
        echo romp-ibm-bsd4.4
        exit ;;
     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
-       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       echo romp-ibm-bsd"$UNAME_RELEASE"   # 4.3 with uname added to
        exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
        echo rs6000-bull-bosx
@@ -633,28 +640,28 @@ EOF
        echo m68k-hp-bsd4.4
        exit ;;
     9000/[34678]??:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       case "${UNAME_MACHINE}" in
-           9000/31? )            HP_ARCH=m68000 ;;
-           9000/[34]?? )         HP_ARCH=m68k ;;
+       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+       case "$UNAME_MACHINE" in
+           9000/31?)            HP_ARCH=m68000 ;;
+           9000/[34]??)         HP_ARCH=m68k ;;
            9000/[678][0-9][0-9])
                if [ -x /usr/bin/getconf ]; then
                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
-                   case "${sc_cpu_version}" in
+                   case "$sc_cpu_version" in
                      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
                      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
                      532)                      # CPU_PA_RISC2_0
-                       case "${sc_kernel_bits}" in
+                       case "$sc_kernel_bits" in
                          32) HP_ARCH=hppa2.0n ;;
                          64) HP_ARCH=hppa2.0w ;;
                          '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
                        esac ;;
                    esac
                fi
-               if [ "${HP_ARCH}" = "" ]; then
-                   eval $set_cc_for_build
-                   sed 's/^            //' << EOF >$dummy.c
+               if [ "$HP_ARCH" = "" ]; then
+                   eval "$set_cc_for_build"
+                   sed 's/^            //' << EOF > "$dummy.c"
 
                #define _HPUX_SOURCE
                #include <stdlib.h>
@@ -687,13 +694,13 @@ EOF
                    exit (0);
                }
 EOF
-                   (CCOPTS="" $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+                   (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
                    test -z "$HP_ARCH" && HP_ARCH=hppa
                fi ;;
        esac
-       if [ ${HP_ARCH} = hppa2.0w ]
+       if [ "$HP_ARCH" = hppa2.0w ]
        then
-           eval $set_cc_for_build
+           eval "$set_cc_for_build"
 
            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
            # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
@@ -712,15 +719,15 @@ EOF
                HP_ARCH=hppa64
            fi
        fi
-       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
        exit ;;
     ia64:HP-UX:*:*)
-       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-       echo ia64-hp-hpux${HPUX_REV}
+       HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+       echo ia64-hp-hpux"$HPUX_REV"
        exit ;;
     3050*:HI-UX:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
+       eval "$set_cc_for_build"
+       sed 's/^        //' << EOF > "$dummy.c"
        #include <unistd.h>
        int
        main ()
@@ -745,11 +752,11 @@ EOF
          exit (0);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+       $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
                { echo "$SYSTEM_NAME"; exit; }
        echo unknown-hitachi-hiuxwe2
        exit ;;
-    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
        echo hppa1.1-hp-bsd
        exit ;;
     9000/8??:4.3bsd:*:*)
@@ -758,7 +765,7 @@ EOF
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
        echo hppa1.0-hp-mpeix
        exit ;;
-    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
        echo hppa1.1-hp-osf
        exit ;;
     hp8??:OSF1:*:*)
@@ -766,9 +773,9 @@ EOF
        exit ;;
     i*86:OSF1:*:*)
        if [ -x /usr/sbin/sysversion ] ; then
-           echo ${UNAME_MACHINE}-unknown-osf1mk
+           echo "$UNAME_MACHINE"-unknown-osf1mk
        else
-           echo ${UNAME_MACHINE}-unknown-osf1
+           echo "$UNAME_MACHINE"-unknown-osf1
        fi
        exit ;;
     parisc*:Lites*:*:*)
@@ -793,127 +800,109 @@ EOF
        echo c4-convex-bsd
        exit ;;
     CRAY*Y-MP:*:*:*)
-       echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     CRAY*[A-Z]90:*:*:*)
-       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
              -e 's/\.[^.]*$/.X/'
        exit ;;
     CRAY*TS:*:*:*)
-       echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     CRAY*T3E:*:*:*)
-       echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     CRAY*SV1:*:*:*)
-       echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     *:UNICOS/mp:*:*)
-       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
        exit ;;
     F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
        FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+       FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     5000:UNIX_System_V:4.*:*)
        FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
-       FUJITSU_REL=`echo ${UNAME_RELEASE} | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+       FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
        exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
-       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
        exit ;;
     sparc*:BSD/OS:*:*)
-       echo sparc-unknown-bsdi${UNAME_RELEASE}
+       echo sparc-unknown-bsdi"$UNAME_RELEASE"
        exit ;;
     *:BSD/OS:*:*)
-       echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
        exit ;;
     *:FreeBSD:*:*)
        UNAME_PROCESSOR=`/usr/bin/uname -p`
-       case ${UNAME_PROCESSOR} in
+       case "$UNAME_PROCESSOR" in
            amd64)
-               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
-           *)
-               echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+               UNAME_PROCESSOR=x86_64 ;;
+           i386)
+               UNAME_PROCESSOR=i586 ;;
        esac
+       echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
        exit ;;
     i*:CYGWIN*:*)
-       echo ${UNAME_MACHINE}-pc-cygwin
+       echo "$UNAME_MACHINE"-pc-cygwin
        exit ;;
     *:MINGW64*:*)
-       echo ${UNAME_MACHINE}-pc-mingw64
+       echo "$UNAME_MACHINE"-pc-mingw64
        exit ;;
     *:MINGW*:*)
-       echo ${UNAME_MACHINE}-pc-mingw32
+       echo "$UNAME_MACHINE"-pc-mingw32
        exit ;;
     *:MSYS*:*)
-       echo ${UNAME_MACHINE}-pc-msys
-       exit ;;
-    i*:windows32*:*)
-       # uname -m includes "-pc" on this system.
-       echo ${UNAME_MACHINE}-mingw32
+       echo "$UNAME_MACHINE"-pc-msys
        exit ;;
     i*:PW*:*)
-       echo ${UNAME_MACHINE}-pc-pw32
+       echo "$UNAME_MACHINE"-pc-pw32
        exit ;;
     *:Interix*:*)
-       case ${UNAME_MACHINE} in
+       case "$UNAME_MACHINE" in
            x86)
-               echo i586-pc-interix${UNAME_RELEASE}
+               echo i586-pc-interix"$UNAME_RELEASE"
                exit ;;
            authenticamd | genuineintel | EM64T)
-               echo x86_64-unknown-interix${UNAME_RELEASE}
+               echo x86_64-unknown-interix"$UNAME_RELEASE"
                exit ;;
            IA64)
-               echo ia64-unknown-interix${UNAME_RELEASE}
+               echo ia64-unknown-interix"$UNAME_RELEASE"
                exit ;;
        esac ;;
-    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
-       echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
-    8664:Windows_NT:*)
-       echo x86_64-pc-mks
-       exit ;;
-    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
-       # How do we know it's Interix rather than the generic POSIX subsystem?
-       # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
-       # UNAME_MACHINE based on the output of uname instead of i386?
-       echo i586-pc-interix
-       exit ;;
     i*:UWIN*:*)
-       echo ${UNAME_MACHINE}-pc-uwin
+       echo "$UNAME_MACHINE"-pc-uwin
        exit ;;
     amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
        echo x86_64-unknown-cygwin
        exit ;;
-    p*:CYGWIN*:*)
-       echo powerpcle-unknown-cygwin
-       exit ;;
     prep*:SunOS:5.*:*)
-       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
        exit ;;
     *:GNU:*:*)
        # the GNU system
-       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
        exit ;;
     *:GNU/*:*:*)
        # other systems with GNU libc and userland
-       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+       echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
        exit ;;
     i*86:Minix:*:*)
-       echo ${UNAME_MACHINE}-pc-minix
+       echo "$UNAME_MACHINE"-pc-minix
        exit ;;
     aarch64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     aarch64_be:Linux:*:*)
        UNAME_MACHINE=aarch64_be
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -927,63 +916,63 @@ EOF
        esac
        objdump --private-headers /bin/sh | grep -q ld.so.1
        if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     arc:Linux:*:* | arceb:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     arm*:Linux:*:*)
-       eval $set_cc_for_build
+       eval "$set_cc_for_build"
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
            | grep -q __ARM_EABI__
        then
-           echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+           echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        else
            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
                | grep -q __ARM_PCS_VFP
            then
-               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
            else
-               echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+               echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
            fi
        fi
        exit ;;
     avr32*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     cris:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
        exit ;;
     crisv32:Linux:*:*)
-       echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+       echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
        exit ;;
     e2k:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     frv:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     hexagon:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     i*86:Linux:*:*)
-       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+       echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
        exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     k1om:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     m32r*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     m68*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     mips:Linux:*:* | mips64:Linux:*:*)
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
+       eval "$set_cc_for_build"
+       sed 's/^        //' << EOF > "$dummy.c"
        #undef CPU
        #undef ${UNAME_MACHINE}
        #undef ${UNAME_MACHINE}el
@@ -997,70 +986,74 @@ EOF
        #endif
        #endif
 EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
-       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+       eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+       test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
        ;;
     mips64el:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     openrisc*:Linux:*:*)
-       echo or1k-unknown-linux-${LIBC}
+       echo or1k-unknown-linux-"$LIBC"
        exit ;;
     or32:Linux:*:* | or1k*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     padre:Linux:*:*)
-       echo sparc-unknown-linux-${LIBC}
+       echo sparc-unknown-linux-"$LIBC"
        exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
-       echo hppa64-unknown-linux-${LIBC}
+       echo hppa64-unknown-linux-"$LIBC"
        exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
-         PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
-         PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
-         *)    echo hppa-unknown-linux-${LIBC} ;;
+         PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+         PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+         *)    echo hppa-unknown-linux-"$LIBC" ;;
        esac
        exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-unknown-linux-${LIBC}
+       echo powerpc64-unknown-linux-"$LIBC"
        exit ;;
     ppc:Linux:*:*)
-       echo powerpc-unknown-linux-${LIBC}
+       echo powerpc-unknown-linux-"$LIBC"
        exit ;;
     ppc64le:Linux:*:*)
-       echo powerpc64le-unknown-linux-${LIBC}
+       echo powerpc64le-unknown-linux-"$LIBC"
        exit ;;
     ppcle:Linux:*:*)
-       echo powerpcle-unknown-linux-${LIBC}
+       echo powerpcle-unknown-linux-"$LIBC"
        exit ;;
     riscv32:Linux:*:* | riscv64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+       echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
        exit ;;
     sh64*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     sh*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     tile*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     vax:Linux:*:*)
-       echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+       echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
        exit ;;
     x86_64:Linux:*:*)
-       echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+       if objdump -f /bin/sh | grep -q elf32-x86-64; then
+           echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32
+       else
+           echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
+       fi
        exit ;;
     xtensa*:Linux:*:*)
-       echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+       echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
        exit ;;
     i*86:DYNIX/ptx:4*:*)
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1074,34 +1067,34 @@ EOF
        # I am not positive that other SVR4 systems won't match this,
        # I just have to hope.  -- rms.
        # Use sysv4.2uw... so that sysv4* matches it.
-       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
        exit ;;
     i*86:OS/2:*:*)
        # If we were able to find `uname', then EMX Unix compatibility
        # is probably installed.
-       echo ${UNAME_MACHINE}-pc-os2-emx
+       echo "$UNAME_MACHINE"-pc-os2-emx
        exit ;;
     i*86:XTS-300:*:STOP)
-       echo ${UNAME_MACHINE}-unknown-stop
+       echo "$UNAME_MACHINE"-unknown-stop
        exit ;;
     i*86:atheos:*:*)
-       echo ${UNAME_MACHINE}-unknown-atheos
+       echo "$UNAME_MACHINE"-unknown-atheos
        exit ;;
     i*86:syllable:*:*)
-       echo ${UNAME_MACHINE}-pc-syllable
+       echo "$UNAME_MACHINE"-pc-syllable
        exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
-       echo i386-unknown-lynxos${UNAME_RELEASE}
+       echo i386-unknown-lynxos"$UNAME_RELEASE"
        exit ;;
     i*86:*DOS:*:*)
-       echo ${UNAME_MACHINE}-pc-msdosdjgpp
+       echo "$UNAME_MACHINE"-pc-msdosdjgpp
        exit ;;
-    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
-       UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+    i*86:*:4.*:*)
+       UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-               echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+               echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
        else
-               echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+               echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
        fi
        exit ;;
     i*86:*:5:[678]*)
@@ -1111,12 +1104,12 @@ EOF
            *Pentium)        UNAME_MACHINE=i586 ;;
            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
        esac
-       echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+       echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
        exit ;;
     i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+               echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
        elif /bin/uname -X 2>/dev/null >/dev/null ; then
                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1126,9 +1119,9 @@ EOF
                        && UNAME_MACHINE=i686
                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
                        && UNAME_MACHINE=i686
-               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+               echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
        else
-               echo ${UNAME_MACHINE}-pc-sysv32
+               echo "$UNAME_MACHINE"-pc-sysv32
        fi
        exit ;;
     pc:*:*:*)
@@ -1148,9 +1141,9 @@ EOF
        exit ;;
     i860:*:4.*:*) # i860-SVR4
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+         echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
        else # Add other i860-SVR4 vendors below as they are discovered.
-         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+         echo i860-unknown-sysv"$UNAME_RELEASE"  # Unknown i860-SVR4
        fi
        exit ;;
     mini*:CTIX:SYS*5:*)
@@ -1170,9 +1163,9 @@ EOF
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+         && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+         && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
          && { echo i486-ncr-sysv4; exit; } ;;
@@ -1181,28 +1174,28 @@ EOF
        test -r /etc/.relid \
            && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+           && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+           && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
-           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+           && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
-       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       echo m68k-unknown-lynxos"$UNAME_RELEASE"
        exit ;;
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
        exit ;;
     TSUNAMI:LynxOS:2.*:*)
-       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       echo sparc-unknown-lynxos"$UNAME_RELEASE"
        exit ;;
     rs6000:LynxOS:2.*:*)
-       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       echo rs6000-unknown-lynxos"$UNAME_RELEASE"
        exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
-       echo powerpc-unknown-lynxos${UNAME_RELEASE}
+       echo powerpc-unknown-lynxos"$UNAME_RELEASE"
        exit ;;
     SM[BE]S:UNIX_SV:*:*)
-       echo mips-dde-sysv${UNAME_RELEASE}
+       echo mips-dde-sysv"$UNAME_RELEASE"
        exit ;;
     RM*:ReliantUNIX-*:*:*)
        echo mips-sni-sysv4
@@ -1213,7 +1206,7 @@ EOF
     *:SINIX-*:*:*)
        if uname -p 2>/dev/null >/dev/null ; then
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
-               echo ${UNAME_MACHINE}-sni-sysv4
+               echo "$UNAME_MACHINE"-sni-sysv4
        else
                echo ns32k-sni-sysv
        fi
@@ -1233,23 +1226,23 @@ EOF
        exit ;;
     i*86:VOS:*:*)
        # From Paul.Green@stratus.com.
-       echo ${UNAME_MACHINE}-stratus-vos
+       echo "$UNAME_MACHINE"-stratus-vos
        exit ;;
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
        echo hppa1.1-stratus-vos
        exit ;;
     mc68*:A/UX:*:*)
-       echo m68k-apple-aux${UNAME_RELEASE}
+       echo m68k-apple-aux"$UNAME_RELEASE"
        exit ;;
     news*:NEWS-OS:6*:*)
        echo mips-sony-newsos6
        exit ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
        if [ -d /usr/nec ]; then
-               echo mips-nec-sysv${UNAME_RELEASE}
+               echo mips-nec-sysv"$UNAME_RELEASE"
        else
-               echo mips-unknown-sysv${UNAME_RELEASE}
+               echo mips-unknown-sysv"$UNAME_RELEASE"
        fi
        exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
@@ -1268,49 +1261,56 @@ EOF
        echo x86_64-unknown-haiku
        exit ;;
     SX-4:SUPER-UX:*:*)
-       echo sx4-nec-superux${UNAME_RELEASE}
+       echo sx4-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-5:SUPER-UX:*:*)
-       echo sx5-nec-superux${UNAME_RELEASE}
+       echo sx5-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-6:SUPER-UX:*:*)
-       echo sx6-nec-superux${UNAME_RELEASE}
+       echo sx6-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-7:SUPER-UX:*:*)
-       echo sx7-nec-superux${UNAME_RELEASE}
+       echo sx7-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-8:SUPER-UX:*:*)
-       echo sx8-nec-superux${UNAME_RELEASE}
+       echo sx8-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-8R:SUPER-UX:*:*)
-       echo sx8r-nec-superux${UNAME_RELEASE}
+       echo sx8r-nec-superux"$UNAME_RELEASE"
        exit ;;
     SX-ACE:SUPER-UX:*:*)
-       echo sxace-nec-superux${UNAME_RELEASE}
+       echo sxace-nec-superux"$UNAME_RELEASE"
        exit ;;
     Power*:Rhapsody:*:*)
-       echo powerpc-apple-rhapsody${UNAME_RELEASE}
+       echo powerpc-apple-rhapsody"$UNAME_RELEASE"
        exit ;;
     *:Rhapsody:*:*)
-       echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
        exit ;;
     *:Darwin:*:*)
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-       eval $set_cc_for_build
+       eval "$set_cc_for_build"
        if test "$UNAME_PROCESSOR" = unknown ; then
            UNAME_PROCESSOR=powerpc
        fi
-       if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+       if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
            if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
                if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-                   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-                   grep IS_64BIT_ARCH >/dev/null
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_64BIT_ARCH >/dev/null
                then
                    case $UNAME_PROCESSOR in
                        i386) UNAME_PROCESSOR=x86_64 ;;
                        powerpc) UNAME_PROCESSOR=powerpc64 ;;
                    esac
                fi
+               # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+               if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+                      (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+                      grep IS_PPC >/dev/null
+               then
+                   UNAME_PROCESSOR=powerpc
+               fi
            fi
        elif test "$UNAME_PROCESSOR" = i386 ; then
            # Avoid executing cc on OS X 10.9, as it ships with a stub
@@ -1321,7 +1321,7 @@ EOF
            # that Apple uses in portable devices.
            UNAME_PROCESSOR=x86_64
        fi
-       echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+       echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
        exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
@@ -1329,19 +1329,25 @@ EOF
                UNAME_PROCESSOR=i386
                UNAME_MACHINE=pc
        fi
-       echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+       echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
        exit ;;
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit ;;
-    NEO-?:NONSTOP_KERNEL:*:*)
-       echo neo-tandem-nsk${UNAME_RELEASE}
+    NEO-*:NONSTOP_KERNEL:*:*)
+       echo neo-tandem-nsk"$UNAME_RELEASE"
        exit ;;
     NSE-*:NONSTOP_KERNEL:*:*)
-       echo nse-tandem-nsk${UNAME_RELEASE}
+       echo nse-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+       echo nsr-tandem-nsk"$UNAME_RELEASE"
+       exit ;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+       echo nsv-tandem-nsk"$UNAME_RELEASE"
        exit ;;
-    NSR-?:NONSTOP_KERNEL:*:*)
-       echo nsr-tandem-nsk${UNAME_RELEASE}
+    NSX-*:NONSTOP_KERNEL:*:*)
+       echo nsx-tandem-nsk"$UNAME_RELEASE"
        exit ;;
     *:NonStop-UX:*:*)
        echo mips-compaq-nonstopux
@@ -1350,7 +1356,7 @@ EOF
        echo bs2000-siemens-sysv
        exit ;;
     DS/*:UNIX_System_V:*:*)
-       echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+       echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
        exit ;;
     *:Plan9:*:*)
        # "uname -m" is not consistent, so use $cputype instead. 386
@@ -1361,7 +1367,7 @@ EOF
        else
            UNAME_MACHINE="$cputype"
        fi
-       echo ${UNAME_MACHINE}-unknown-plan9
+       echo "$UNAME_MACHINE"-unknown-plan9
        exit ;;
     *:TOPS-10:*:*)
        echo pdp10-unknown-tops10
@@ -1382,14 +1388,14 @@ EOF
        echo pdp10-unknown-its
        exit ;;
     SEI:*:*:SEIUX)
-       echo mips-sei-seiux${UNAME_RELEASE}
+       echo mips-sei-seiux"$UNAME_RELEASE"
        exit ;;
     *:DragonFly:*:*)
-       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
        exit ;;
     *:*VMS:*:*)
        UNAME_MACHINE=`(uname -p) 2>/dev/null`
-       case "${UNAME_MACHINE}" in
+       case "$UNAME_MACHINE" in
            A*) echo alpha-dec-vms ; exit ;;
            I*) echo ia64-dec-vms ; exit ;;
            V*) echo vax-dec-vms ; exit ;;
@@ -1398,32 +1404,44 @@ EOF
        echo i386-pc-xenix
        exit ;;
     i*86:skyos:*:*)
-       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE} | sed -e 's/ .*$//'`
+       echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
        exit ;;
     i*86:rdos:*:*)
-       echo ${UNAME_MACHINE}-pc-rdos
+       echo "$UNAME_MACHINE"-pc-rdos
        exit ;;
     i*86:AROS:*:*)
-       echo ${UNAME_MACHINE}-pc-aros
+       echo "$UNAME_MACHINE"-pc-aros
        exit ;;
     x86_64:VMkernel:*:*)
-       echo ${UNAME_MACHINE}-unknown-esx
+       echo "$UNAME_MACHINE"-unknown-esx
        exit ;;
     amd64:Isilon\ OneFS:*:*)
        echo x86_64-unknown-onefs
        exit ;;
 esac
 
+echo "$0: unable to guess system type" >&2
+
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+    mips:Linux | mips64:Linux)
+       # If we got here on MIPS GNU/Linux, output extra information.
+       cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+       ;;
+esac
+
 cat >&2 <<EOF
-$0: unable to guess system type
 
 This script (version $timestamp), has failed to recognize the
-operating system you are using. If your script is old, overwrite
-config.guess and config.sub with the latest versions from:
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
 
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
 and
-  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+  https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 If $0 has already been updated, send the following data and any
 information you think might be pertinent to config-patches@gnu.org to
@@ -1446,16 +1464,16 @@ hostinfo               = `(hostinfo) 2>/dev/null`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
 
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM  = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
 EOF
 
 exit 1
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
index dd2ca93c6fbe3ea67ea9e67beb1d389045677943..1d8e98bcee23a0421e4fafe9a6c9ac75180cff25 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 # Configuration validation subroutine script.
-#   Copyright 1992-2016 Free Software Foundation, Inc.
+#   Copyright 1992-2018 Free Software Foundation, Inc.
 
-timestamp='2016-11-04'
+timestamp='2018-02-22'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2016-11-04'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -33,7 +33,7 @@ timestamp='2016-11-04'
 # Otherwise, we print the canonical config type on stdout and succeed.
 
 # You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
 
 # This file is supposed to be the same for all GNU packages
 # and recognize all the CPU types, system types and aliases
@@ -57,7 +57,7 @@ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
 
 Canonicalize a configuration name.
 
-Operation modes:
+Options:
   -h, --help         print this help, then exit
   -t, --time-stamp   print date of last modification, then exit
   -v, --version      print version number, then exit
@@ -67,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright 1992-2016 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -94,7 +94,7 @@ while test $# -gt 0 ; do
 
     *local*)
        # First pass through any local machine types.
-       echo $1
+       echo "$1"
        exit ;;
 
     * )
@@ -112,7 +112,7 @@ esac
 
 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
 # Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
   linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
@@ -120,16 +120,16 @@ case $maybe_os in
   kopensolaris*-gnu* | cloudabi*-eabi* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
   android-linux)
     os=-linux-android
-    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
     ;;
   *)
-    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-    if [ $basic_machine != $1 ]
-    then os=`echo $1 | sed 's/.*-/-/'`
+    basic_machine=`echo "$1" | sed 's/-[^-]*$//'`
+    if [ "$basic_machine" != "$1" ]
+    then os=`echo "$1" | sed 's/.*-/-/'`
     else os=; fi
     ;;
 esac
@@ -178,44 +178,44 @@ case $os in
                ;;
        -sco6)
                os=-sco5v6
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco5)
                os=-sco3.2v5
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco4)
                os=-sco3.2v4
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco3.2.[4-9]*)
                os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco3.2v[4-9]*)
                # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco5v6*)
                # Don't forget version if it is 3.2v4 or newer.
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -sco*)
                os=-sco3.2v2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -udk*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -isc)
                os=-isc2.2
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -clix*)
                basic_machine=clipper-intergraph
                ;;
        -isc*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
                ;;
        -lynx*178)
                os=-lynxos178
@@ -227,10 +227,7 @@ case $os in
                os=-lynxos
                ;;
        -ptx*)
-               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-               ;;
-       -windowsnt*)
-               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
                ;;
        -psos*)
                os=-psos
@@ -263,7 +260,7 @@ case $basic_machine in
        | fido | fr30 | frv | ft32 \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | hexagon \
-       | i370 | i860 | i960 | ia64 \
+       | i370 | i860 | i960 | ia16 | ia64 \
        | ip2k | iq2000 \
        | k1om \
        | le32 | le64 \
@@ -299,7 +296,7 @@ case $basic_machine in
        | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
        | open8 | or1k | or1knd | or32 \
-       | pdp10 | pdp11 | pj | pjl \
+       | pdp10 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pru \
        | pyramid \
@@ -315,7 +312,7 @@ case $basic_machine in
        | ubicom32 \
        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
        | visium \
-       | we32k \
+       | wasm32 \
        | x86 | xc16x | xstormy16 | xtensa \
        | z8k | z80)
                basic_machine=$basic_machine-unknown
@@ -336,7 +333,7 @@ case $basic_machine in
                basic_machine=$basic_machine-unknown
                os=-none
                ;;
-       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+       m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
                ;;
        ms1)
                basic_machine=mt-unknown
@@ -365,7 +362,7 @@ case $basic_machine in
          ;;
        # Object if more than one company name word.
        *-*-*)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
                exit 1
                ;;
        # Recognize the basic CPU types with company name.
@@ -388,7 +385,7 @@ case $basic_machine in
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | hexagon-* \
-       | i*86-* | i860-* | i960-* | ia64-* \
+       | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
        | ip2k-* | iq2000-* \
        | k1om-* \
        | le32-* | le64-* \
@@ -446,6 +443,7 @@ case $basic_machine in
        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
        | vax-* \
        | visium-* \
+       | wasm32-* \
        | we32k-* \
        | x86-* | x86_64-* | xc16x-* | xps100-* \
        | xstormy16-* | xtensa*-* \
@@ -459,7 +457,7 @@ case $basic_machine in
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
        386bsd)
-               basic_machine=i386-unknown
+               basic_machine=i386-pc
                os=-bsd
                ;;
        3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
@@ -493,7 +491,7 @@ case $basic_machine in
                basic_machine=x86_64-pc
                ;;
        amd64-*)
-               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        amdahl)
                basic_machine=580-amdahl
@@ -538,7 +536,7 @@ case $basic_machine in
                os=-linux
                ;;
        blackfin-*)
-               basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                os=-linux
                ;;
        bluegene*)
@@ -546,13 +544,13 @@ case $basic_machine in
                os=-cnk
                ;;
        c54x-*)
-               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        c55x-*)
-               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        c6x-*)
-               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        c90)
                basic_machine=c90-cray
@@ -641,7 +639,7 @@ case $basic_machine in
                basic_machine=rs6000-bull
                os=-bosx
                ;;
-       dpx2* | dpx2*-bull)
+       dpx2*)
                basic_machine=m68k-bull
                os=-sysv3
                ;;
@@ -650,7 +648,7 @@ case $basic_machine in
                os=$os"spe"
                ;;
        e500v[12]-*)
-               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                os=$os"spe"
                ;;
        ebmon29k)
@@ -742,9 +740,6 @@ case $basic_machine in
        hp9k8[0-9][0-9] | hp8[0-9][0-9])
                basic_machine=hppa1.0-hp
                ;;
-       hppa-next)
-               os=-nextstep3
-               ;;
        hppaosf)
                basic_machine=hppa1.1-hp
                os=-osf
@@ -757,26 +752,26 @@ case $basic_machine in
                basic_machine=i370-ibm
                ;;
        i*86v32)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
                os=-sysv32
                ;;
        i*86v4*)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
                os=-sysv4
                ;;
        i*86v)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
                os=-sysv
                ;;
        i*86sol2)
-               basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+               basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
                os=-solaris2
                ;;
        i386mach)
                basic_machine=i386-mach
                os=-mach
                ;;
-       i386-vsta | vsta)
+       vsta)
                basic_machine=i386-unknown
                os=-vsta
                ;;
@@ -795,19 +790,16 @@ case $basic_machine in
                os=-sysv
                ;;
        leon-*|leon[3-9]-*)
-               basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+               basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
                ;;
        m68knommu)
                basic_machine=m68k-unknown
                os=-linux
                ;;
        m68knommu-*)
-               basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                os=-linux
                ;;
-       m88k-omron*)
-               basic_machine=m88k-omron
-               ;;
        magnum | m3230)
                basic_machine=mips-mips
                os=-sysv
@@ -839,10 +831,10 @@ case $basic_machine in
                os=-mint
                ;;
        mips3*-*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
                ;;
        mips3*)
-               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
                ;;
        monitor)
                basic_machine=m68k-rom68k
@@ -861,7 +853,7 @@ case $basic_machine in
                os=-msdos
                ;;
        ms1-*)
-               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
                ;;
        msys)
                basic_machine=i686-pc
@@ -903,7 +895,7 @@ case $basic_machine in
                basic_machine=v70-nec
                os=-sysv
                ;;
-       next | m*-next )
+       next | m*-next)
                basic_machine=m68k-next
                case $os in
                    -nextstep* )
@@ -948,6 +940,12 @@ case $basic_machine in
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
+       nsv-tandem)
+               basic_machine=nsv-tandem
+               ;;
+       nsx-tandem)
+               basic_machine=nsx-tandem
+               ;;
        op50n-* | op60c-*)
                basic_machine=hppa1.1-oki
                os=-proelf
@@ -980,7 +978,7 @@ case $basic_machine in
                os=-linux
                ;;
        parisc-*)
-               basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                os=-linux
                ;;
        pbd)
@@ -996,7 +994,7 @@ case $basic_machine in
                basic_machine=i386-pc
                ;;
        pc98-*)
-               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        pentium | p5 | k5 | k6 | nexgen | viac3)
                basic_machine=i586-pc
@@ -1011,16 +1009,16 @@ case $basic_machine in
                basic_machine=i786-pc
                ;;
        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
-               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        pentiumpro-* | p6-* | 6x86-* | athlon-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
-               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        pentium4-*)
-               basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        pn)
                basic_machine=pn-gould
@@ -1030,23 +1028,23 @@ case $basic_machine in
        ppc | ppcbe)    basic_machine=powerpc-unknown
                ;;
        ppc-* | ppcbe-*)
-               basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        ppcle | powerpclittle)
                basic_machine=powerpcle-unknown
                ;;
        ppcle-* | powerpclittle-*)
-               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        ppc64)  basic_machine=powerpc64-unknown
                ;;
-       ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+       ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        ppc64le | powerpc64little)
                basic_machine=powerpc64le-unknown
                ;;
        ppc64le-* | powerpc64little-*)
-               basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        ps2)
                basic_machine=i386-ibm
@@ -1100,17 +1098,10 @@ case $basic_machine in
        sequent)
                basic_machine=i386-sequent
                ;;
-       sh)
-               basic_machine=sh-hitachi
-               os=-hms
-               ;;
        sh5el)
                basic_machine=sh5le-unknown
                ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparclite-wrs | simso-wrs)
+       simso-wrs)
                basic_machine=sparclite-wrs
                os=-vxworks
                ;;
@@ -1129,7 +1120,7 @@ case $basic_machine in
                os=-sysv4
                ;;
        strongarm-* | thumb-*)
-               basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+               basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
                ;;
        sun2)
                basic_machine=m68000-sun
@@ -1251,6 +1242,9 @@ case $basic_machine in
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
+       x64)
+               basic_machine=x86_64-pc
+               ;;
        xbox)
                basic_machine=i686-pc
                os=-mingw32
@@ -1259,20 +1253,12 @@ case $basic_machine in
                basic_machine=xps100-honeywell
                ;;
        xscale-* | xscalee[bl]-*)
-               basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+               basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
                ;;
        ymp)
                basic_machine=ymp-cray
                os=-unicos
                ;;
-       z8k-*-coff)
-               basic_machine=z8k-unknown
-               os=-sim
-               ;;
-       z80-*-coff)
-               basic_machine=z80-unknown
-               os=-sim
-               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1301,10 +1287,6 @@ case $basic_machine in
        vax)
                basic_machine=vax-dec
                ;;
-       pdp10)
-               # there are many clones, so DEC is not a safe bet
-               basic_machine=pdp10-unknown
-               ;;
        pdp11)
                basic_machine=pdp11-dec
                ;;
@@ -1314,9 +1296,6 @@ case $basic_machine in
        sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
-       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
-               basic_machine=sparc-sun
-               ;;
        cydra)
                basic_machine=cydra-cydrome
                ;;
@@ -1336,7 +1315,7 @@ case $basic_machine in
                # Make sure to match an already-canonicalized machine name.
                ;;
        *)
-               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
                exit 1
                ;;
 esac
@@ -1344,10 +1323,10 @@ esac
 # Here we canonicalize certain aliases for manufacturers.
 case $basic_machine in
        *-digital*)
-               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
                ;;
        *-commodore*)
-               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
                ;;
        *)
                ;;
@@ -1358,8 +1337,8 @@ esac
 if [ x"$os" != x"" ]
 then
 case $os in
-       # First match some system type aliases
-       # that might get confused with valid system types.
+       # First match some system type aliases that might get confused
+       # with valid system types.
        # -solaris* is a basic system type, with this one exception.
        -auroraux)
                os=-auroraux
@@ -1370,18 +1349,19 @@ case $os in
        -solaris)
                os=-solaris2
                ;;
-       -svr4*)
-               os=-sysv4
-               ;;
        -unixware*)
                os=-sysv4.2uw
                ;;
        -gnu/linux*)
                os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
                ;;
-       # First accept the basic system types.
+       # es1800 is here to avoid being matched by es* (a different OS)
+       -es1800*)
+               os=-ose
+               ;;
+       # Now accept the basic system types.
        # The portable systems comes first.
-       # Each alternative MUST END IN A *, to match a version number.
+       # Each alternative MUST end in a * to match a version number.
        # -sysv* is not here because it comes later, after sysvr4.
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
@@ -1391,25 +1371,26 @@ case $os in
              | -aos* | -aros* | -cloudabi* | -sortix* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
-             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
              | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* | -cegcc* \
+             | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
              | -linux-newlib* | -linux-musl* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
-             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+             | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
-             | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+             | -morphos* | -superux* | -rtmk* | -windiss* \
              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
-             | -onefs* | -tirtos* | -phoenix* | -fuchsia*)
+             | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
+             | -midnightbsd*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1426,12 +1407,12 @@ case $os in
        -nto*)
                os=`echo $os | sed -e 's|nto|nto-qnx|'`
                ;;
-       -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+       -sim | -xray | -os68k* | -v88r* \
+             | -windows* | -osx | -abug | -netware* | -os9* \
              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                ;;
        -mac*)
-               os=`echo $os | sed -e 's|mac|macos|'`
+               os=`echo "$os" | sed -e 's|mac|macos|'`
                ;;
        -linux-dietlibc)
                os=-linux-dietlibc
@@ -1440,10 +1421,10 @@ case $os in
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
        -sunos5*)
-               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
                ;;
        -sunos6*)
-               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
                ;;
        -opened*)
                os=-openedition
@@ -1454,12 +1435,6 @@ case $os in
        -wince*)
                os=-wince
                ;;
-       -osfrose*)
-               os=-osfrose
-               ;;
-       -osf*)
-               os=-osf
-               ;;
        -utek*)
                os=-bsd
                ;;
@@ -1484,7 +1459,7 @@ case $os in
        -nova*)
                os=-rtmk-nova
                ;;
-       -ns2 )
+       -ns2)
                os=-nextstep2
                ;;
        -nsk*)
@@ -1506,7 +1481,7 @@ case $os in
        -oss*)
                os=-sysv3
                ;;
-       -svr4)
+       -svr4*)
                os=-sysv4
                ;;
        -svr3)
@@ -1521,24 +1496,28 @@ case $os in
        -ose*)
                os=-ose
                ;;
-       -es1800*)
-               os=-ose
-               ;;
-       -xenix)
-               os=-xenix
-               ;;
        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
                os=-mint
                ;;
-       -aros*)
-               os=-aros
-               ;;
        -zvmoe)
                os=-zvmoe
                ;;
        -dicos*)
                os=-dicos
                ;;
+       -pikeos*)
+               # Until real need of OS specific support for
+               # particular features comes up, bare metal
+               # configurations are quite functional.
+               case $basic_machine in
+                   arm*)
+                       os=-eabi
+                       ;;
+                   *)
+                       os=-elf
+                       ;;
+               esac
+               ;;
        -nacl*)
                ;;
        -ios)
@@ -1548,7 +1527,7 @@ case $os in
        *)
                # Get rid of the `-' at the beginning of $os.
                os=`echo $os | sed 's/[^-]*-//'`
-               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
                exit 1
                ;;
 esac
@@ -1638,12 +1617,12 @@ case $basic_machine in
        sparc-* | *-sun)
                os=-sunos4.1.1
                ;;
+       pru-*)
+               os=-elf
+               ;;
        *-be)
                os=-beos
                ;;
-       *-haiku)
-               os=-haiku
-               ;;
        *-ibm)
                os=-aix
                ;;
@@ -1683,7 +1662,7 @@ case $basic_machine in
        m88k-omron*)
                os=-luna
                ;;
-       *-next )
+       *-next)
                os=-nextstep
                ;;
        *-sequent)
@@ -1698,9 +1677,6 @@ case $basic_machine in
        i370-*)
                os=-mvs
                ;;
-       *-next)
-               os=-nextstep3
-               ;;
        *-gould)
                os=-sysv
                ;;
@@ -1810,15 +1786,15 @@ case $basic_machine in
                                vendor=stratus
                                ;;
                esac
-               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
                ;;
 esac
 
-echo $basic_machine$os
+echo "$basic_machine$os"
 exit
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'write-file-functions 'time-stamp)
 # time-stamp-start: "timestamp='"
 # time-stamp-format: "%:y-%02m-%02d"
 # time-stamp-end: "'"
index fc98710e2a1df7159cd72a01ffc011784748c3bc..6b391623c4bf023255fdbc8eceb7acf110e5fa79 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -783,9 +783,9 @@ exit 0
 # Local Variables:
 # mode: shell-script
 # sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index 59990a10492675f2e87d5e5df17b566d145d9aee..20d8b2eaea9c7e1a9a83cbae1b770ab021fe114c 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2014-09-12.12; # UTC
+scriptversion=2018-03-11.20; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -271,15 +271,18 @@ do
     fi
     dst=$dst_arg
 
-    # If destination is a directory, append the input filename; won't work
-    # if double slashes aren't ignored.
+    # If destination is a directory, append the input filename.
     if test -d "$dst"; then
       if test "$is_target_a_directory" = never; then
         echo "$0: $dst_arg: Is a directory" >&2
         exit 1
       fi
       dstdir=$dst
-      dst=$dstdir/`basename "$src"`
+      dstbase=`basename "$src"`
+      case $dst in
+       */) dst=$dst$dstbase;;
+       *)  dst=$dst/$dstbase;;
+      esac
       dstdir_status=0
     else
       dstdir=`dirname "$dst"`
@@ -288,6 +291,11 @@ do
     fi
   fi
 
+  case $dstdir in
+    */) dstdirslash=$dstdir;;
+    *)  dstdirslash=$dstdir/;;
+  esac
+
   obsolete_mkdir_used=false
 
   if test $dstdir_status != 0; then
@@ -324,14 +332,16 @@ do
             # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
             ;;
           *)
-            # $RANDOM is not portable (e.g. dash);  use it when possible to
-            # lower collision chance
+            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
+            # here however when possible just to lower collision chance.
             tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
             trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
 
-            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
-            # create the $tmpdir first (and fail if unsuccessful) to make sure
-            # that nobody tries to guess the $tmpdir name.
+            # Because "mkdir -p" follows existing symlinks and we likely work
+            # directly in world-writeable /tmp, make sure that the '$tmpdir'
+            # directory is successfully created first before we actually test
+            # 'mkdir -p' feature.
             if (umask $mkdir_umask &&
                 $mkdirprog $mkdir_mode "$tmpdir" &&
                 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
@@ -434,14 +444,25 @@ do
   else
 
     # Make a couple of temp file names in the proper directory.
-    dsttmp=$dstdir/_inst.$$_
-    rmtmp=$dstdir/_rm.$$_
+    dsttmp=${dstdirslash}_inst.$$_
+    rmtmp=${dstdirslash}_rm.$$_
 
     # Trap to clean up those temp files at exit.
     trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
 
     # Copy the file name to the temp name.
-    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+    (umask $cp_umask &&
+     { test -z "$stripcmd" || {
+        # Create $dsttmp read-write so that cp doesn't create it read-only,
+        # which would cause strip to fail.
+        if test -z "$doit"; then
+          : >"$dsttmp" # No need to fork-exec 'touch'.
+        else
+          $doit touch "$dsttmp"
+        fi
+       }
+     } &&
+     $doit_exec $cpprog "$src" "$dsttmp") &&
 
     # and set any options; do chmod last to preserve setuid bits.
     #
@@ -500,9 +521,9 @@ do
 done
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
index a736cf994256132aefd49c1f11118ad7ba31d924..0cb7f90d3bd7a7fc62accae5bdce9a5ce73c6103 100644 (file)
@@ -31,7 +31,7 @@
 
 PROGRAM=libtool
 PACKAGE=libtool
-VERSION="2.4.6 Debian-2.4.6-2"
+VERSION="2.4.6 Debian-2.4.6-14"
 package_revision=2.4.6
 
 
@@ -387,7 +387,7 @@ EXIT_SKIP=77          # $? = 77 is used to indicate a skipped test to automake.
 # putting '$debug_cmd' at the start of all your functions, you can get
 # bash to show function call trace with:
 #
-#    debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
+#    debug_cmd='echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
 debug_cmd=${debug_cmd-":"}
 exit_cmd=:
 
@@ -1370,7 +1370,7 @@ func_lt_ver ()
 #! /bin/sh
 
 # Set a version string for this script.
-scriptversion=2014-01-07.03; # UTC
+scriptversion=2015-10-07.11; # UTC
 
 # A portable, pluggable option parser for Bourne shell.
 # Written by Gary V. Vaughan, 2010
@@ -1530,6 +1530,8 @@ func_run_hooks ()
 {
     $debug_cmd
 
+    _G_rc_run_hooks=false
+
     case " $hookable_fns " in
       *" $1 "*) ;;
       *) func_fatal_error "'$1' does not support hook funcions.n" ;;
@@ -1538,16 +1540,16 @@ func_run_hooks ()
     eval _G_hook_fns=\$$1_hooks; shift
 
     for _G_hook in $_G_hook_fns; do
-      eval $_G_hook '"$@"'
-
-      # store returned options list back into positional
-      # parameters for next 'cmd' execution.
-      eval _G_hook_result=\$${_G_hook}_result
-      eval set dummy "$_G_hook_result"; shift
+      if eval $_G_hook '"$@"'; then
+        # store returned options list back into positional
+        # parameters for next 'cmd' execution.
+        eval _G_hook_result=\$${_G_hook}_result
+        eval set dummy "$_G_hook_result"; shift
+        _G_rc_run_hooks=:
+      fi
     done
 
-    func_quote_for_eval ${1+"$@"}
-    func_run_hooks_result=$func_quote_for_eval_result
+    $_G_rc_run_hooks && func_run_hooks_result=$_G_hook_result
 }
 
 
@@ -1557,10 +1559,16 @@ func_run_hooks ()
 ## --------------- ##
 
 # In order to add your own option parsing hooks, you must accept the
-# full positional parameter list in your hook function, remove any
-# options that you action, and then pass back the remaining unprocessed
+# full positional parameter list in your hook function, you may remove/edit
+# any options that you action, and then pass back the remaining unprocessed
 # options in '<hooked_function_name>_result', escaped suitably for
-# 'eval'.  Like this:
+# 'eval'.  In this case you also must return $EXIT_SUCCESS to let the
+# hook's caller know that it should pay attention to
+# '<hooked_function_name>_result'.  Returning $EXIT_FAILURE signalizes that
+# arguments are left untouched by the hook and therefore caller will ignore the
+# result variable.
+#
+# Like this:
 #
 #    my_options_prep ()
 #    {
@@ -1570,9 +1578,11 @@ func_run_hooks ()
 #        usage_message=$usage_message'
 #      -s, --silent       don'\''t print informational messages
 #    '
-#
-#        func_quote_for_eval ${1+"$@"}
-#        my_options_prep_result=$func_quote_for_eval_result
+#        # No change in '$@' (ignored completely by this hook).  There is
+#        # no need to do the equivalent (but slower) action:
+#        # func_quote_for_eval ${1+"$@"}
+#        # my_options_prep_result=$func_quote_for_eval_result
+#        false
 #    }
 #    func_add_hook func_options_prep my_options_prep
 #
@@ -1581,25 +1591,37 @@ func_run_hooks ()
 #    {
 #        $debug_cmd
 #
+#        args_changed=false
+#
 #        # Note that for efficiency, we parse as many options as we can
 #        # recognise in a loop before passing the remainder back to the
 #        # caller on the first unrecognised argument we encounter.
 #        while test $# -gt 0; do
 #          opt=$1; shift
 #          case $opt in
-#            --silent|-s) opt_silent=: ;;
+#            --silent|-s) opt_silent=:
+#                         args_changed=:
+#                         ;;
 #            # Separate non-argument short options:
 #            -s*)         func_split_short_opt "$_G_opt"
 #                         set dummy "$func_split_short_opt_name" \
 #                             "-$func_split_short_opt_arg" ${1+"$@"}
 #                         shift
+#                         args_changed=:
 #                         ;;
-#            *)            set dummy "$_G_opt" "$*"; shift; break ;;
+#            *)           # Make sure the first unrecognised option "$_G_opt"
+#                         # is added back to "$@", we could need that later
+#                         # if $args_changed is true.
+#                         set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
 #          esac
 #        done
 #
-#        func_quote_for_eval ${1+"$@"}
-#        my_silent_option_result=$func_quote_for_eval_result
+#        if $args_changed; then
+#          func_quote_for_eval ${1+"$@"}
+#          my_silent_option_result=$func_quote_for_eval_result
+#        fi
+#
+#        $args_changed
 #    }
 #    func_add_hook func_parse_options my_silent_option
 #
@@ -1611,16 +1633,32 @@ func_run_hooks ()
 #        $opt_silent && $opt_verbose && func_fatal_help "\
 #    '--silent' and '--verbose' options are mutually exclusive."
 #
-#        func_quote_for_eval ${1+"$@"}
-#        my_option_validation_result=$func_quote_for_eval_result
+#        false
 #    }
 #    func_add_hook func_validate_options my_option_validation
 #
-# You'll alse need to manually amend $usage_message to reflect the extra
+# You'll also need to manually amend $usage_message to reflect the extra
 # options you parse.  It's preferable to append if you can, so that
 # multiple option parsing hooks can be added safely.
 
 
+# func_options_finish [ARG]...
+# ----------------------------
+# Finishing the option parse loop (call 'func_options' hooks ATM).
+func_options_finish ()
+{
+    $debug_cmd
+
+    _G_func_options_finish_exit=false
+    if func_run_hooks func_options ${1+"$@"}; then
+      func_options_finish_result=$func_run_hooks_result
+      _G_func_options_finish_exit=:
+    fi
+
+    $_G_func_options_finish_exit
+}
+
+
 # func_options [ARG]...
 # ---------------------
 # All the functions called inside func_options are hookable. See the
@@ -1630,17 +1668,28 @@ func_options ()
 {
     $debug_cmd
 
-    func_options_prep ${1+"$@"}
-    eval func_parse_options \
-        ${func_options_prep_result+"$func_options_prep_result"}
-    eval func_validate_options \
-        ${func_parse_options_result+"$func_parse_options_result"}
+    _G_rc_options=false
 
-    eval func_run_hooks func_options \
-        ${func_validate_options_result+"$func_validate_options_result"}
+    for my_func in options_prep parse_options validate_options options_finish
+    do
+      if eval func_$my_func '${1+"$@"}'; then
+        eval _G_res_var='$'"func_${my_func}_result"
+        eval set dummy "$_G_res_var" ; shift
+        _G_rc_options=:
+      fi
+    done
+
+    # Save modified positional parameters for caller.  As a top-level
+    # options-parser function we always need to set the 'func_options_result'
+    # variable (regardless the $_G_rc_options value).
+    if $_G_rc_options; then
+      func_options_result=$_G_res_var
+    else
+      func_quote_for_eval ${1+"$@"}
+      func_options_result=$func_quote_for_eval_result
+    fi
 
-    # save modified positional parameters for caller
-    func_options_result=$func_run_hooks_result
+    $_G_rc_options
 }
 
 
@@ -1649,9 +1698,9 @@ func_options ()
 # All initialisations required before starting the option parse loop.
 # Note that when calling hook functions, we pass through the list of
 # positional parameters.  If a hook function modifies that list, and
-# needs to propogate that back to rest of this script, then the complete
+# needs to propagate that back to rest of this script, then the complete
 # modified list must be put in 'func_run_hooks_result' before
-# returning.
+# returning $EXIT_SUCCESS (otherwise $EXIT_FAILURE is returned).
 func_hookable func_options_prep
 func_options_prep ()
 {
@@ -1661,10 +1710,14 @@ func_options_prep ()
     opt_verbose=false
     opt_warning_types=
 
-    func_run_hooks func_options_prep ${1+"$@"}
+    _G_rc_options_prep=false
+    if func_run_hooks func_options_prep ${1+"$@"}; then
+      _G_rc_options_prep=:
+      # save modified positional parameters for caller
+      func_options_prep_result=$func_run_hooks_result
+    fi
 
-    # save modified positional parameters for caller
-    func_options_prep_result=$func_run_hooks_result
+    $_G_rc_options_prep
 }
 
 
@@ -1678,18 +1731,20 @@ func_parse_options ()
 
     func_parse_options_result=
 
+    _G_rc_parse_options=false
     # this just eases exit handling
     while test $# -gt 0; do
       # Defer to hook functions for initial option parsing, so they
       # get priority in the event of reusing an option name.
-      func_run_hooks func_parse_options ${1+"$@"}
-
-      # Adjust func_parse_options positional parameters to match
-      eval set dummy "$func_run_hooks_result"; shift
+      if func_run_hooks func_parse_options ${1+"$@"}; then
+        eval set dummy "$func_run_hooks_result"; shift
+        _G_rc_parse_options=:
+      fi
 
       # Break out of the loop if we already parsed every option.
       test $# -gt 0 || break
 
+      _G_match_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -1704,7 +1759,10 @@ func_parse_options ()
                      ;;
 
         --warnings|--warning|-W)
-                      test $# = 0 && func_missing_arg $_G_opt && break
+                      if test $# = 0 && func_missing_arg $_G_opt; then
+                        _G_rc_parse_options=:
+                        break
+                      fi
                       case " $warning_categories $1" in
                         *" $1 "*)
                           # trailing space prevents matching last $1 above
@@ -1757,15 +1815,25 @@ func_parse_options ()
                       shift
                       ;;
 
-        --)           break ;;
+        --)           _G_rc_parse_options=: ; break ;;
         -*)           func_fatal_help "unrecognised option: '$_G_opt'" ;;
-        *)            set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
+        *)            set dummy "$_G_opt" ${1+"$@"}; shift
+                      _G_match_parse_options=false
+                      break
+                      ;;
       esac
+
+      $_G_match_parse_options && _G_rc_parse_options=:
     done
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    func_parse_options_result=$func_quote_for_eval_result
+
+    if $_G_rc_parse_options; then
+      # save modified positional parameters for caller
+      func_quote_for_eval ${1+"$@"}
+      func_parse_options_result=$func_quote_for_eval_result
+    fi
+
+    $_G_rc_parse_options
 }
 
 
@@ -1778,16 +1846,21 @@ func_validate_options ()
 {
     $debug_cmd
 
+    _G_rc_validate_options=false
+
     # Display all warnings if -W was not given.
     test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
 
-    func_run_hooks func_validate_options ${1+"$@"}
+    if func_run_hooks func_validate_options ${1+"$@"}; then
+      # save modified positional parameters for caller
+      func_validate_options_result=$func_run_hooks_result
+      _G_rc_validate_options=:
+    fi
 
     # Bail if the options were screwed!
     $exit_cmd $EXIT_FAILURE
 
-    # save modified positional parameters for caller
-    func_validate_options_result=$func_run_hooks_result
+    $_G_rc_validate_options
 }
 
 
@@ -2068,7 +2141,7 @@ include the following information:
        compiler:       $LTCC
        compiler flags: $LTCFLAGS
        linker:         $LD (gnu? $with_gnu_ld)
-       version:        $progname $scriptversion Debian-2.4.6-2
+       version:        $progname $scriptversion Debian-2.4.6-14
        automake:       `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
        autoconf:       `($AUTOCONF --version) 2>/dev/null |$SED 1q`
 
@@ -2270,6 +2343,8 @@ libtool_options_prep ()
     nonopt=
     preserve_args=
 
+    _G_rc_lt_options_prep=:
+
     # Shorthand for --mode=foo, only valid as the first argument
     case $1 in
     clean|clea|cle|cl)
@@ -2293,11 +2368,18 @@ libtool_options_prep ()
     uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
       shift; set dummy --mode uninstall ${1+"$@"}; shift
       ;;
+    *)
+      _G_rc_lt_options_prep=false
+      ;;
     esac
 
-    # Pass back the list of options.
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
+    if $_G_rc_lt_options_prep; then
+      # Pass back the list of options.
+      func_quote_for_eval ${1+"$@"}
+      libtool_options_prep_result=$func_quote_for_eval_result
+    fi
+
+    $_G_rc_lt_options_prep
 }
 func_add_hook func_options_prep libtool_options_prep
 
@@ -2309,9 +2391,12 @@ libtool_parse_options ()
 {
     $debug_cmd
 
+    _G_rc_lt_parse_options=false
+
     # Perform our own loop to consume as many options as possible in
     # each iteration.
     while test $# -gt 0; do
+      _G_match_lt_parse_options=:
       _G_opt=$1
       shift
       case $_G_opt in
@@ -2386,15 +2471,22 @@ libtool_parse_options ()
                         func_append preserve_args " $_G_opt"
                         ;;
 
-       # An option not handled by this hook function:
-        *)             set dummy "$_G_opt" ${1+"$@"};  shift; break  ;;
+        # An option not handled by this hook function:
+        *)              set dummy "$_G_opt" ${1+"$@"} ; shift
+                        _G_match_lt_parse_options=false
+                        break
+                        ;;
       esac
+      $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
     done
 
+    if $_G_rc_lt_parse_options; then
+      # save modified positional parameters for caller
+      func_quote_for_eval ${1+"$@"}
+      libtool_parse_options_result=$func_quote_for_eval_result
+    fi
 
-    # save modified positional parameters for caller
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
+    $_G_rc_lt_parse_options
 }
 func_add_hook func_parse_options libtool_parse_options
 
@@ -7275,10 +7367,13 @@ func_mode_link ()
       # -specs=*             GCC specs files
       # -stdlib=*            select c++ std lib with clang
       # -fsanitize=*         Clang/GCC memory and address sanitizer
+      # -fuse-ld=*           Linker select flags for GCC
+      # -static-*            direct GCC to link specific libraries statically
+      # -fcilkplus           Cilk Plus language extension features for C/C++
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
       -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
       -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
-      -specs=*|-fsanitize=*)
+      -specs=*|-fsanitize=*|-fuse-ld=*|-static-*|-fcilkplus)
         func_quote_for_eval "$arg"
        arg=$func_quote_for_eval_result
         func_append compile_command " $arg"
index f62bbae306c7e1bc28896aab8fe7bfb700a9a33e..8d0eaad250fc1ea8f3728338c1b016596cedfc60 100755 (executable)
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2018-03-07.03; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2020 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
@@ -207,9 +207,9 @@ give_advice "$1" | sed -e '1s/^/WARNING: /' \
 exit $st
 
 # Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/ci/README b/ci/README
new file mode 100644 (file)
index 0000000..8b2dde6
--- /dev/null
+++ b/ci/README
@@ -0,0 +1,2 @@
+The files in this directory are used for CI testing.  ci/install installs
+the prerequisite packages, and ci/test runs the tests.
diff --git a/ci/install b/ci/install
new file mode 100755 (executable)
index 0000000..163b4aa
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Install packages for integration tests.
+#
+# This script is normally run via sudo in a test container or VM, such as via
+# GitHub Actions.
+#
+# Perl::Tidy, Perl::Critic, and Test::Perl::Critic are installed separately to
+# get the latest version, since they sometimes change formatting and style
+# rules compared to the version in Ubuntu.  Test::MinimumVersion has to be
+# included since it installs Perl::Critic.
+#
+# Allow the installation of Perl::Critic and Test::Perl::Critic to fail, since
+# sometimes the versions on CPAN won't install.  (We'll just skip the test if
+# it won't install.)
+#
+# Copyright 2015-2020 Russ Allbery <eagle@eyrie.org>
+#
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+# Install packages.
+apt-get update -qq
+apt-get install aspell cpanminus cppcheck heimdal-multidev libcdb-dev   \
+        libdb-file-lock-perl libcrypt-pbkdf2-perl libdbd-sqlite3-perl   \
+        libdbi-perl libgetopt-long-descriptive-perl libipc-run-perl     \
+        libjson-perl libkrb5-dev libperl6-slurp-perl libreadonly-perl   \
+        libsqlite3-dev libtest-pod-perl libtest-spelling-perl           \
+        libtest-strict-perl pkg-config perl sqlite tinycdb valgrind
+
+# Dependencies for Perl tests.
+cpanm Perl::Tidy
+cpanm Perl::Critic         || true
+cpanm Test::MinimumVersion || true
+cpanm Test::Perl::Critic   || true
diff --git a/ci/test b/ci/test
new file mode 100755 (executable)
index 0000000..64e8b6c
--- /dev/null
+++ b/ci/test
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# Run tests for continuous integration.
+#
+# This script is normally run in a test container or VM, such as via GitHub
+# Actions.
+#
+# Copyright 2015-2020 Russ Allbery <eagle@eyrie.org>
+#
+# SPDX-License-Identifier: MIT
+
+set -eux
+
+# Normally, COMPILER and KERBEROS are set based on the CI matrix, but provide
+# a default in case someone runs this test by hand.
+COMPILER="${COMPILER:-gcc}"
+KERBEROS="${KERBEROS:-mit}"
+
+# Build everything.
+./bootstrap
+if [ "$KERBEROS" = 'heimdal' ]; then
+    ./configure CC="$COMPILER" PATH_KRB5_CONFIG=/usr/bin/krb5-config.heimdal
+else
+    ./configure CC="$COMPILER"
+fi
+make warnings
+
+# Run the tests with valgrind for one of the compilers.  Arbitrarily
+# pick the GCC build.  (The assumption here is that other compilers won't
+# produce sufficiently different code as to create memory management
+# problems.)
+if [ "$COMPILER" = 'gcc' ]; then
+    make check-valgrind
+else
+    make check
+fi
+
+# Run some additional checks for one of the builds.  Arbitrarily pick the GCC
+# MIT build.
+if [ "$COMPILER" = 'gcc' ] && [ "$KERBEROS" = 'mit' ]; then
+    make check-cppcheck
+fi
index f1afa4763d58a9571c63d5147718b2beeda39da6..e123dab6b5a557dc64ed472ecba9d343cc4c9f9d 100644 (file)
@@ -12,6 +12,9 @@
 /* Define to 1 if you have the <cdb.h> header file. */
 #undef HAVE_CDB_H
 
+/* Define if CrackLib is available. */
+#undef HAVE_CRACKLIB
+
 /* Define to 1 if you have the <crack.h> header file. */
 #undef HAVE_CRACK_H
 
@@ -33,6 +36,9 @@
 /* Define to 1 if you have the <et/com_err.h> header file. */
 #undef HAVE_ET_COM_ERR_H
 
+/* Define to 1 if you have the `explicit_bzero' function. */
+#undef HAVE_EXPLICIT_BZERO
+
 /* Define if the compiler supports GNU-style variadic macros. */
 #undef HAVE_GNU_VAMACROS
 
@@ -42,6 +48,9 @@
 /* Define to 1 if you have the <inttypes.h> header file. */
 #undef HAVE_INTTYPES_H
 
+/* Define to 1 if you have the <k5profile.h> header file. */
+#undef HAVE_K5PROFILE_H
+
 /* Define to 1 if you have the <kadm5/kadm5_err.h> header file. */
 #undef HAVE_KADM5_KADM5_ERR_H
 
@@ -57,6 +66,9 @@
 /* Define to enable Kerberos features. */
 #undef HAVE_KRB5
 
+/* Define to 1 if you have the `krb5_appdefault_string' function. */
+#undef HAVE_KRB5_APPDEFAULT_STRING
+
 /* Define to 1 if you have the `krb5_free_default_realm' function. */
 #undef HAVE_KRB5_FREE_DEFAULT_REALM
 
    function. */
 #undef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS
 
+/* Define to 1 if you have the `krb5_get_profile' function. */
+#undef HAVE_KRB5_GET_PROFILE
+
 /* Define to 1 if you have the <krb5.h> header file. */
 #undef HAVE_KRB5_H
 
 /* Define to 1 if you have the `mkstemp' function. */
 #undef HAVE_MKSTEMP
 
+/* Define to 1 if you have the <profile.h> header file. */
+#undef HAVE_PROFILE_H
+
 /* Define to 1 if you have the `reallocarray' function. */
 #undef HAVE_REALLOCARRAY
 
 /* Define to 1 if you have the <syslog.h> header file. */
 #undef HAVE_SYSLOG_H
 
+/* Define if using the system CrackLib. */
+#undef HAVE_SYSTEM_CRACKLIB
+
 /* Define to 1 if you have the <sys/bittypes.h> header file. */
 #undef HAVE_SYS_BITTYPES_H
 
index 92c906f9941a49d0539b0d19a2af5f2492b43d62..1d3b6c33cfb7928fe803cb98558541e6ea242eec 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for krb5-strength 3.1.
+# Generated by GNU Autoconf 2.69 for krb5-strength 3.2.
 #
 # Report bugs to <eagle@eyrie.org>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='krb5-strength'
 PACKAGE_TARNAME='krb5-strength'
-PACKAGE_VERSION='3.1'
-PACKAGE_STRING='krb5-strength 3.1'
+PACKAGE_VERSION='3.2'
+PACKAGE_STRING='krb5-strength 3.2'
 PACKAGE_BUGREPORT='eagle@eyrie.org'
 PACKAGE_URL=''
 
@@ -659,6 +659,7 @@ CRACKLIB_CPPFLAGS
 CDB_LIBS
 CDB_LDFLAGS
 CDB_CPPFLAGS
+PATH_VALGRIND
 LT_SYS_LIBRARY_PATH
 OTOOL64
 OTOOL
@@ -698,7 +699,6 @@ am__nodep
 AMDEPBACKSLASH
 AMDEP_FALSE
 AMDEP_TRUE
-am__quote
 am__include
 DEPDIR
 OBJEXT
@@ -776,7 +776,8 @@ PACKAGE_VERSION
 PACKAGE_TARNAME
 PACKAGE_NAME
 PATH_SEPARATOR
-SHELL'
+SHELL
+am__quote'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
@@ -1372,7 +1373,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures krb5-strength 3.1 to adapt to many kinds of systems.
+\`configure' configures krb5-strength 3.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1443,7 +1444,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of krb5-strength 3.1:";;
+     short | recursive ) echo "Configuration of krb5-strength 3.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1487,7 +1488,7 @@ Optional Packages:
   --with-cracklib[=DIR]   Use system CrackLib instead of embedded copy
   --with-cracklib-include=DIR
                           Location of CrackLib headers
-  --with-cracklib-lib=DIR Location of cracklib libraries
+  --with-cracklib-lib=DIR Location of CrackLib libraries
   --with-krb5=DIR         Location of Kerberos headers and libraries
   --with-krb5-include=DIR Location of Kerberos headers
   --with-krb5-lib=DIR     Location of Kerberos libraries
@@ -1584,7 +1585,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-krb5-strength configure 3.1
+krb5-strength configure 3.2
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2290,7 +2291,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by krb5-strength $as_me 3.1, which was
+It was created by krb5-strength $as_me 3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2669,7 +2670,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
-am__api_version='1.15'
+am__api_version='1.16'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -3155,7 +3156,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='krb5-strength'
- VERSION='3.1'
+ VERSION='3.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3185,8 +3186,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
 # For better backward compatibility.  To be removed once Automake 1.9.x
 # dies out for good.  For more background, see:
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
-# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
 mkdir_p='$(MKDIR_P)'
 
 # We need awk for the "check" target (and possibly the TAP driver).  The
@@ -3237,7 +3238,7 @@ END
 Aborting the configuration process, to ensure you take notice of the issue.
 
 You can download and install GNU coreutils to get an 'rm' implementation
-that behaves properly: <http://www.gnu.org/software/coreutils/>.
+that behaves properly: <https://www.gnu.org/software/coreutils/>.
 
 If you want to complete the configuration process using your problematic
 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
@@ -4126,45 +4127,45 @@ DEPDIR="${am__leading_dot}deps"
 
 ac_config_commands="$ac_config_commands depfiles"
 
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5
+$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; }
+cat > confinc.mk << 'END'
 am__doit:
-       @echo this is the am__doit target
+       @echo this is the am__doit target >confinc.out
 .PHONY: am__doit
 END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from 'make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
-  am__include=include
-  am__quote=
-  _am_result=GNU
-  ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
-   echo '.include "confinc"' > confmf
-   case `$am_make -s -f confmf 2> /dev/null` in #(
-   *the\ am__doit\ target*)
-     am__include=.include
-     am__quote="\""
-     _am_result=BSD
+# BSD make does it like this.
+echo '.include "confinc.mk" # ignored' > confmf.BSD
+# Other make implementations (GNU, Solaris 10, AIX) do it like this.
+echo 'include confinc.mk # ignored' > confmf.GNU
+_am_result=no
+for s in GNU BSD; do
+  { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5
+   (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }
+  case $?:`cat confinc.out 2>/dev/null` in #(
+  '0:this is the am__doit target') :
+    case $s in #(
+  BSD) :
+    am__include='.include' am__quote='"' ;; #(
+  *) :
+    am__include='include' am__quote='' ;;
+esac ;; #(
+  *) :
      ;;
-   esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
+esac
+  if test "$am__include" != "#"; then
+    _am_result="yes ($s style)"
+    break
+  fi
+done
+rm -f confinc.* confmf.*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5
+$as_echo "${_am_result}" >&6; }
 
 # Check whether --enable-dependency-tracking was given.
 if test "${enable_dependency_tracking+set}" = set; then :
@@ -4841,17 +4842,17 @@ $as_echo "$rra_cv_compiler_c__Weverything" >&6; }
  if test x"$rra_cv_compiler_c__Weverything" = xyes; then :
   WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Weverything"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-padded" >&5
-$as_echo_n "checking if $CC supports -Wno-padded... " >&6; }
- if ${rra_cv_compiler_c__Wno_padded+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-cast-qual" >&5
+$as_echo_n "checking if $CC supports -Wno-cast-qual... " >&6; }
+ if ${rra_cv_compiler_c__Wno_cast_qual+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wno-padded in #(
+     case -Wno-cast-qual in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wno-padded" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-cast-qual" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wno-padded" ;; #(
+    CFLAGS="$CFLAGS -Wno-cast-qual" ;; #(
   *) :
      ;;
 esac
@@ -4867,33 +4868,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wno_padded=yes
+  rra_cv_compiler_c__Wno_cast_qual=yes
 else
-  rra_cv_compiler_c__Wno_padded=no
+  rra_cv_compiler_c__Wno_cast_qual=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_padded" >&5
-$as_echo "$rra_cv_compiler_c__Wno_padded" >&6; }
- if test x"$rra_cv_compiler_c__Wno_padded" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-padded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_cast_qual" >&5
+$as_echo "$rra_cv_compiler_c__Wno_cast_qual" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_cast_qual" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-cast-qual"
 fi
-else
-  WARNINGS_CFLAGS="-g -O2 -D_FORTIFY_SOURCE=2 -Werror"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fstrict-overflow" >&5
-$as_echo_n "checking if $CC supports -fstrict-overflow... " >&6; }
- if ${rra_cv_compiler_c__fstrict_overflow+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-disabled-macro-expansion" >&5
+$as_echo_n "checking if $CC supports -Wno-disabled-macro-expansion... " >&6; }
+ if ${rra_cv_compiler_c__Wno_disabled_macro_expansion+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -fstrict-overflow in #(
+     case -Wno-disabled-macro-expansion in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-fstrict-overflow" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-disabled-macro-expansion" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -fstrict-overflow" ;; #(
+    CFLAGS="$CFLAGS -Wno-disabled-macro-expansion" ;; #(
   *) :
      ;;
 esac
@@ -4909,30 +4907,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__fstrict_overflow=yes
+  rra_cv_compiler_c__Wno_disabled_macro_expansion=yes
 else
-  rra_cv_compiler_c__fstrict_overflow=no
+  rra_cv_compiler_c__Wno_disabled_macro_expansion=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__fstrict_overflow" >&5
-$as_echo "$rra_cv_compiler_c__fstrict_overflow" >&6; }
- if test x"$rra_cv_compiler_c__fstrict_overflow" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -fstrict-overflow"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_disabled_macro_expansion" >&5
+$as_echo "$rra_cv_compiler_c__Wno_disabled_macro_expansion" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_disabled_macro_expansion" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-disabled-macro-expansion"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fstrict-aliasing" >&5
-$as_echo_n "checking if $CC supports -fstrict-aliasing... " >&6; }
- if ${rra_cv_compiler_c__fstrict_aliasing+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-padded" >&5
+$as_echo_n "checking if $CC supports -Wno-padded... " >&6; }
+ if ${rra_cv_compiler_c__Wno_padded+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -fstrict-aliasing in #(
+     case -Wno-padded in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-fstrict-aliasing" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-padded" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -fstrict-aliasing" ;; #(
+    CFLAGS="$CFLAGS -Wno-padded" ;; #(
   *) :
      ;;
 esac
@@ -4948,30 +4946,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__fstrict_aliasing=yes
+  rra_cv_compiler_c__Wno_padded=yes
 else
-  rra_cv_compiler_c__fstrict_aliasing=no
+  rra_cv_compiler_c__Wno_padded=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__fstrict_aliasing" >&5
-$as_echo "$rra_cv_compiler_c__fstrict_aliasing" >&6; }
- if test x"$rra_cv_compiler_c__fstrict_aliasing" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -fstrict-aliasing"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_padded" >&5
+$as_echo "$rra_cv_compiler_c__Wno_padded" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_padded" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-padded"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wcomments" >&5
-$as_echo_n "checking if $CC supports -Wcomments... " >&6; }
- if ${rra_cv_compiler_c__Wcomments+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-sign-conversion" >&5
+$as_echo_n "checking if $CC supports -Wno-sign-conversion... " >&6; }
+ if ${rra_cv_compiler_c__Wno_sign_conversion+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wcomments in #(
+     case -Wno-sign-conversion in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wcomments" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-sign-conversion" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wcomments" ;; #(
+    CFLAGS="$CFLAGS -Wno-sign-conversion" ;; #(
   *) :
      ;;
 esac
@@ -4987,30 +4985,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wcomments=yes
+  rra_cv_compiler_c__Wno_sign_conversion=yes
 else
-  rra_cv_compiler_c__Wcomments=no
+  rra_cv_compiler_c__Wno_sign_conversion=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wcomments" >&5
-$as_echo "$rra_cv_compiler_c__Wcomments" >&6; }
- if test x"$rra_cv_compiler_c__Wcomments" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wcomments"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_sign_conversion" >&5
+$as_echo "$rra_cv_compiler_c__Wno_sign_conversion" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_sign_conversion" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-sign-conversion"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wendif-labels" >&5
-$as_echo_n "checking if $CC supports -Wendif-labels... " >&6; }
- if ${rra_cv_compiler_c__Wendif_labels+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-reserved-id-macro" >&5
+$as_echo_n "checking if $CC supports -Wno-reserved-id-macro... " >&6; }
+ if ${rra_cv_compiler_c__Wno_reserved_id_macro+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wendif-labels in #(
+     case -Wno-reserved-id-macro in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wendif-labels" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-reserved-id-macro" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wendif-labels" ;; #(
+    CFLAGS="$CFLAGS -Wno-reserved-id-macro" ;; #(
   *) :
      ;;
 esac
@@ -5026,30 +5024,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wendif_labels=yes
+  rra_cv_compiler_c__Wno_reserved_id_macro=yes
 else
-  rra_cv_compiler_c__Wendif_labels=no
+  rra_cv_compiler_c__Wno_reserved_id_macro=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wendif_labels" >&5
-$as_echo "$rra_cv_compiler_c__Wendif_labels" >&6; }
- if test x"$rra_cv_compiler_c__Wendif_labels" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wendif-labels"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_reserved_id_macro" >&5
+$as_echo "$rra_cv_compiler_c__Wno_reserved_id_macro" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_reserved_id_macro" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-reserved-id-macro"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
-$as_echo_n "checking if $CC supports -Wall... " >&6; }
- if ${rra_cv_compiler_c__Wall+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-tautological-pointer-compare" >&5
+$as_echo_n "checking if $CC supports -Wno-tautological-pointer-compare... " >&6; }
+ if ${rra_cv_compiler_c__Wno_tautological_pointer_compare+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wall in #(
+     case -Wno-tautological-pointer-compare in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wall" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-tautological-pointer-compare" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wall" ;; #(
+    CFLAGS="$CFLAGS -Wno-tautological-pointer-compare" ;; #(
   *) :
      ;;
 esac
@@ -5065,30 +5063,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wall=yes
+  rra_cv_compiler_c__Wno_tautological_pointer_compare=yes
 else
-  rra_cv_compiler_c__Wall=no
+  rra_cv_compiler_c__Wno_tautological_pointer_compare=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wall" >&5
-$as_echo "$rra_cv_compiler_c__Wall" >&6; }
- if test x"$rra_cv_compiler_c__Wall" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wall"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_tautological_pointer_compare" >&5
+$as_echo "$rra_cv_compiler_c__Wno_tautological_pointer_compare" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_tautological_pointer_compare" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-tautological-pointer-compare"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wextra" >&5
-$as_echo_n "checking if $CC supports -Wextra... " >&6; }
- if ${rra_cv_compiler_c__Wextra+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-undef" >&5
+$as_echo_n "checking if $CC supports -Wno-undef... " >&6; }
+ if ${rra_cv_compiler_c__Wno_undef+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wextra in #(
+     case -Wno-undef in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wextra" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-undef" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wextra" ;; #(
+    CFLAGS="$CFLAGS -Wno-undef" ;; #(
   *) :
      ;;
 esac
@@ -5104,30 +5102,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wextra=yes
+  rra_cv_compiler_c__Wno_undef=yes
 else
-  rra_cv_compiler_c__Wextra=no
+  rra_cv_compiler_c__Wno_undef=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wextra" >&5
-$as_echo "$rra_cv_compiler_c__Wextra" >&6; }
- if test x"$rra_cv_compiler_c__Wextra" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wextra"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_undef" >&5
+$as_echo "$rra_cv_compiler_c__Wno_undef" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_undef" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-undef"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
-$as_echo_n "checking if $CC supports -Wformat=2... " >&6; }
- if ${rra_cv_compiler_c__Wformat_2+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-unreachable-code" >&5
+$as_echo_n "checking if $CC supports -Wno-unreachable-code... " >&6; }
+ if ${rra_cv_compiler_c__Wno_unreachable_code+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wformat=2 in #(
+     case -Wno-unreachable-code in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wformat=2" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-unreachable-code" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wformat=2" ;; #(
+    CFLAGS="$CFLAGS -Wno-unreachable-code" ;; #(
   *) :
      ;;
 esac
@@ -5143,30 +5141,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wformat_2=yes
+  rra_cv_compiler_c__Wno_unreachable_code=yes
 else
-  rra_cv_compiler_c__Wformat_2=no
+  rra_cv_compiler_c__Wno_unreachable_code=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_2" >&5
-$as_echo "$rra_cv_compiler_c__Wformat_2" >&6; }
- if test x"$rra_cv_compiler_c__Wformat_2" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat=2"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_unreachable_code" >&5
+$as_echo "$rra_cv_compiler_c__Wno_unreachable_code" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_unreachable_code" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-unreachable-code"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-signedness" >&5
-$as_echo_n "checking if $CC supports -Wformat-signedness... " >&6; }
- if ${rra_cv_compiler_c__Wformat_signedness+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-unreachable-code-return" >&5
+$as_echo_n "checking if $CC supports -Wno-unreachable-code-return... " >&6; }
+ if ${rra_cv_compiler_c__Wno_unreachable_code_return+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wformat-signedness in #(
+     case -Wno-unreachable-code-return in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wformat-signedness" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-unreachable-code-return" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wformat-signedness" ;; #(
+    CFLAGS="$CFLAGS -Wno-unreachable-code-return" ;; #(
   *) :
      ;;
 esac
@@ -5182,30 +5180,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wformat_signedness=yes
+  rra_cv_compiler_c__Wno_unreachable_code_return=yes
 else
-  rra_cv_compiler_c__Wformat_signedness=no
+  rra_cv_compiler_c__Wno_unreachable_code_return=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_signedness" >&5
-$as_echo "$rra_cv_compiler_c__Wformat_signedness" >&6; }
- if test x"$rra_cv_compiler_c__Wformat_signedness" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat-signedness"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_unreachable_code_return" >&5
+$as_echo "$rra_cv_compiler_c__Wno_unreachable_code_return" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_unreachable_code_return" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-unreachable-code-return"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnull-dereference" >&5
-$as_echo_n "checking if $CC supports -Wnull-dereference... " >&6; }
- if ${rra_cv_compiler_c__Wnull_dereference+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-unused-macros" >&5
+$as_echo_n "checking if $CC supports -Wno-unused-macros... " >&6; }
+ if ${rra_cv_compiler_c__Wno_unused_macros+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wnull-dereference in #(
+     case -Wno-unused-macros in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wnull-dereference" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-unused-macros" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wnull-dereference" ;; #(
+    CFLAGS="$CFLAGS -Wno-unused-macros" ;; #(
   *) :
      ;;
 esac
@@ -5221,30 +5219,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wnull_dereference=yes
+  rra_cv_compiler_c__Wno_unused_macros=yes
 else
-  rra_cv_compiler_c__Wnull_dereference=no
+  rra_cv_compiler_c__Wno_unused_macros=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wnull_dereference" >&5
-$as_echo "$rra_cv_compiler_c__Wnull_dereference" >&6; }
- if test x"$rra_cv_compiler_c__Wnull_dereference" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wnull-dereference"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_unused_macros" >&5
+$as_echo "$rra_cv_compiler_c__Wno_unused_macros" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_unused_macros" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-unused-macros"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
-$as_echo_n "checking if $CC supports -Winit-self... " >&6; }
- if ${rra_cv_compiler_c__Winit_self+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-used-but-marked-unused" >&5
+$as_echo_n "checking if $CC supports -Wno-used-but-marked-unused... " >&6; }
+ if ${rra_cv_compiler_c__Wno_used_but_marked_unused+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Winit-self in #(
+     case -Wno-used-but-marked-unused in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Winit-self" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-used-but-marked-unused" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Winit-self" ;; #(
+    CFLAGS="$CFLAGS -Wno-used-but-marked-unused" ;; #(
   *) :
      ;;
 esac
@@ -5260,30 +5258,33 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Winit_self=yes
+  rra_cv_compiler_c__Wno_used_but_marked_unused=yes
 else
-  rra_cv_compiler_c__Winit_self=no
+  rra_cv_compiler_c__Wno_used_but_marked_unused=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Winit_self" >&5
-$as_echo "$rra_cv_compiler_c__Winit_self" >&6; }
- if test x"$rra_cv_compiler_c__Winit_self" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Winit-self"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_used_but_marked_unused" >&5
+$as_echo "$rra_cv_compiler_c__Wno_used_but_marked_unused" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_used_but_marked_unused" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-used-but-marked-unused"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wswitch-enum" >&5
-$as_echo_n "checking if $CC supports -Wswitch-enum... " >&6; }
- if ${rra_cv_compiler_c__Wswitch_enum+:} false; then :
+else
+  WARNINGS_CFLAGS="-g -O2 -D_FORTIFY_SOURCE=2 -Werror"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fstrict-overflow" >&5
+$as_echo_n "checking if $CC supports -fstrict-overflow... " >&6; }
+ if ${rra_cv_compiler_c__fstrict_overflow+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wswitch-enum in #(
+     case -fstrict-overflow in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wswitch-enum" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-fstrict-overflow" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wswitch-enum" ;; #(
+    CFLAGS="$CFLAGS -fstrict-overflow" ;; #(
   *) :
      ;;
 esac
@@ -5299,30 +5300,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wswitch_enum=yes
+  rra_cv_compiler_c__fstrict_overflow=yes
 else
-  rra_cv_compiler_c__Wswitch_enum=no
+  rra_cv_compiler_c__fstrict_overflow=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wswitch_enum" >&5
-$as_echo "$rra_cv_compiler_c__Wswitch_enum" >&6; }
- if test x"$rra_cv_compiler_c__Wswitch_enum" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wswitch-enum"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__fstrict_overflow" >&5
+$as_echo "$rra_cv_compiler_c__fstrict_overflow" >&6; }
+ if test x"$rra_cv_compiler_c__fstrict_overflow" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -fstrict-overflow"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
-$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
- if ${rra_cv_compiler_c__Wuninitialized+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fstrict-aliasing" >&5
+$as_echo_n "checking if $CC supports -fstrict-aliasing... " >&6; }
+ if ${rra_cv_compiler_c__fstrict_aliasing+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wuninitialized in #(
+     case -fstrict-aliasing in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wuninitialized" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-fstrict-aliasing" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wuninitialized" ;; #(
+    CFLAGS="$CFLAGS -fstrict-aliasing" ;; #(
   *) :
      ;;
 esac
@@ -5338,30 +5339,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wuninitialized=yes
+  rra_cv_compiler_c__fstrict_aliasing=yes
 else
-  rra_cv_compiler_c__Wuninitialized=no
+  rra_cv_compiler_c__fstrict_aliasing=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wuninitialized" >&5
-$as_echo "$rra_cv_compiler_c__Wuninitialized" >&6; }
- if test x"$rra_cv_compiler_c__Wuninitialized" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wuninitialized"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__fstrict_aliasing" >&5
+$as_echo "$rra_cv_compiler_c__fstrict_aliasing" >&6; }
+ if test x"$rra_cv_compiler_c__fstrict_aliasing" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -fstrict-aliasing"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-overflow=5" >&5
-$as_echo_n "checking if $CC supports -Wstrict-overflow=5... " >&6; }
- if ${rra_cv_compiler_c__Wstrict_overflow_5+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
+$as_echo_n "checking if $CC supports -Wall... " >&6; }
+ if ${rra_cv_compiler_c__Wall+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wstrict-overflow=5 in #(
+     case -Wall in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wstrict-overflow=5" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wall" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wstrict-overflow=5" ;; #(
+    CFLAGS="$CFLAGS -Wall" ;; #(
   *) :
      ;;
 esac
@@ -5377,30 +5378,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wstrict_overflow_5=yes
+  rra_cv_compiler_c__Wall=yes
 else
-  rra_cv_compiler_c__Wstrict_overflow_5=no
+  rra_cv_compiler_c__Wall=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wstrict_overflow_5" >&5
-$as_echo "$rra_cv_compiler_c__Wstrict_overflow_5" >&6; }
- if test x"$rra_cv_compiler_c__Wstrict_overflow_5" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wstrict-overflow=5"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wall" >&5
+$as_echo "$rra_cv_compiler_c__Wall" >&6; }
+ if test x"$rra_cv_compiler_c__Wall" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wall"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
-$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; }
- if ${rra_cv_compiler_c__Wmissing_format_attribute+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wextra" >&5
+$as_echo_n "checking if $CC supports -Wextra... " >&6; }
+ if ${rra_cv_compiler_c__Wextra+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wmissing-format-attribute in #(
+     case -Wextra in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wmissing-format-attribute" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wextra" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wmissing-format-attribute" ;; #(
+    CFLAGS="$CFLAGS -Wextra" ;; #(
   *) :
      ;;
 esac
@@ -5416,30 +5417,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wmissing_format_attribute=yes
+  rra_cv_compiler_c__Wextra=yes
 else
-  rra_cv_compiler_c__Wmissing_format_attribute=no
+  rra_cv_compiler_c__Wextra=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wmissing_format_attribute" >&5
-$as_echo "$rra_cv_compiler_c__Wmissing_format_attribute" >&6; }
- if test x"$rra_cv_compiler_c__Wmissing_format_attribute" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wmissing-format-attribute"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wextra" >&5
+$as_echo "$rra_cv_compiler_c__Wextra" >&6; }
+ if test x"$rra_cv_compiler_c__Wextra" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wextra"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wduplicated-cond" >&5
-$as_echo_n "checking if $CC supports -Wduplicated-cond... " >&6; }
- if ${rra_cv_compiler_c__Wduplicated_cond+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5
+$as_echo_n "checking if $CC supports -Wformat=2... " >&6; }
+ if ${rra_cv_compiler_c__Wformat_2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wduplicated-cond in #(
+     case -Wformat=2 in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wduplicated-cond" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wformat=2" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wduplicated-cond" ;; #(
+    CFLAGS="$CFLAGS -Wformat=2" ;; #(
   *) :
      ;;
 esac
@@ -5455,30 +5456,459 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wduplicated_cond=yes
+  rra_cv_compiler_c__Wformat_2=yes
 else
-  rra_cv_compiler_c__Wduplicated_cond=no
+  rra_cv_compiler_c__Wformat_2=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wduplicated_cond" >&5
-$as_echo "$rra_cv_compiler_c__Wduplicated_cond" >&6; }
- if test x"$rra_cv_compiler_c__Wduplicated_cond" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wduplicated-cond"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_2" >&5
+$as_echo "$rra_cv_compiler_c__Wformat_2" >&6; }
+ if test x"$rra_cv_compiler_c__Wformat_2" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat=2"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrampolines" >&5
-$as_echo_n "checking if $CC supports -Wtrampolines... " >&6; }
- if ${rra_cv_compiler_c__Wtrampolines+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-overflow=2" >&5
+$as_echo_n "checking if $CC supports -Wformat-overflow=2... " >&6; }
+ if ${rra_cv_compiler_c__Wformat_overflow_2+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wtrampolines in #(
+     case -Wformat-overflow=2 in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wtrampolines" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wformat-overflow=2" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wtrampolines" ;; #(
+    CFLAGS="$CFLAGS -Wformat-overflow=2" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wformat_overflow_2=yes
+else
+  rra_cv_compiler_c__Wformat_overflow_2=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_overflow_2" >&5
+$as_echo "$rra_cv_compiler_c__Wformat_overflow_2" >&6; }
+ if test x"$rra_cv_compiler_c__Wformat_overflow_2" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat-overflow=2"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-signedness" >&5
+$as_echo_n "checking if $CC supports -Wformat-signedness... " >&6; }
+ if ${rra_cv_compiler_c__Wformat_signedness+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wformat-signedness in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wformat-signedness" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wformat-signedness" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wformat_signedness=yes
+else
+  rra_cv_compiler_c__Wformat_signedness=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_signedness" >&5
+$as_echo "$rra_cv_compiler_c__Wformat_signedness" >&6; }
+ if test x"$rra_cv_compiler_c__Wformat_signedness" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat-signedness"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-truncation=2" >&5
+$as_echo_n "checking if $CC supports -Wformat-truncation=2... " >&6; }
+ if ${rra_cv_compiler_c__Wformat_truncation_2+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wformat-truncation=2 in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wformat-truncation=2" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wformat-truncation=2" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wformat_truncation_2=yes
+else
+  rra_cv_compiler_c__Wformat_truncation_2=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wformat_truncation_2" >&5
+$as_echo "$rra_cv_compiler_c__Wformat_truncation_2" >&6; }
+ if test x"$rra_cv_compiler_c__Wformat_truncation_2" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wformat-truncation=2"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnull-dereference" >&5
+$as_echo_n "checking if $CC supports -Wnull-dereference... " >&6; }
+ if ${rra_cv_compiler_c__Wnull_dereference+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wnull-dereference in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wnull-dereference" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wnull-dereference" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wnull_dereference=yes
+else
+  rra_cv_compiler_c__Wnull_dereference=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wnull_dereference" >&5
+$as_echo "$rra_cv_compiler_c__Wnull_dereference" >&6; }
+ if test x"$rra_cv_compiler_c__Wnull_dereference" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wnull-dereference"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5
+$as_echo_n "checking if $CC supports -Winit-self... " >&6; }
+ if ${rra_cv_compiler_c__Winit_self+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Winit-self in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Winit-self" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Winit-self" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Winit_self=yes
+else
+  rra_cv_compiler_c__Winit_self=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Winit_self" >&5
+$as_echo "$rra_cv_compiler_c__Winit_self" >&6; }
+ if test x"$rra_cv_compiler_c__Winit_self" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Winit-self"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wswitch-enum" >&5
+$as_echo_n "checking if $CC supports -Wswitch-enum... " >&6; }
+ if ${rra_cv_compiler_c__Wswitch_enum+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wswitch-enum in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wswitch-enum" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wswitch-enum" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wswitch_enum=yes
+else
+  rra_cv_compiler_c__Wswitch_enum=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wswitch_enum" >&5
+$as_echo "$rra_cv_compiler_c__Wswitch_enum" >&6; }
+ if test x"$rra_cv_compiler_c__Wswitch_enum" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wswitch-enum"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-overflow=5" >&5
+$as_echo_n "checking if $CC supports -Wstrict-overflow=5... " >&6; }
+ if ${rra_cv_compiler_c__Wstrict_overflow_5+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wstrict-overflow=5 in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wstrict-overflow=5" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wstrict-overflow=5" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wstrict_overflow_5=yes
+else
+  rra_cv_compiler_c__Wstrict_overflow_5=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wstrict_overflow_5" >&5
+$as_echo "$rra_cv_compiler_c__Wstrict_overflow_5" >&6; }
+ if test x"$rra_cv_compiler_c__Wstrict_overflow_5" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wstrict-overflow=5"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5
+$as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; }
+ if ${rra_cv_compiler_c__Wmissing_format_attribute+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wmissing-format-attribute in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wmissing-format-attribute" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wmissing-format-attribute" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wmissing_format_attribute=yes
+else
+  rra_cv_compiler_c__Wmissing_format_attribute=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wmissing_format_attribute" >&5
+$as_echo "$rra_cv_compiler_c__Wmissing_format_attribute" >&6; }
+ if test x"$rra_cv_compiler_c__Wmissing_format_attribute" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wmissing-format-attribute"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Walloc-zero" >&5
+$as_echo_n "checking if $CC supports -Walloc-zero... " >&6; }
+ if ${rra_cv_compiler_c__Walloc_zero+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Walloc-zero in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Walloc-zero" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Walloc-zero" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Walloc_zero=yes
+else
+  rra_cv_compiler_c__Walloc_zero=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Walloc_zero" >&5
+$as_echo "$rra_cv_compiler_c__Walloc_zero" >&6; }
+ if test x"$rra_cv_compiler_c__Walloc_zero" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Walloc-zero"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wduplicated-branches" >&5
+$as_echo_n "checking if $CC supports -Wduplicated-branches... " >&6; }
+ if ${rra_cv_compiler_c__Wduplicated_branches+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wduplicated-branches in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wduplicated-branches" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wduplicated-branches" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wduplicated_branches=yes
+else
+  rra_cv_compiler_c__Wduplicated_branches=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wduplicated_branches" >&5
+$as_echo "$rra_cv_compiler_c__Wduplicated_branches" >&6; }
+ if test x"$rra_cv_compiler_c__Wduplicated_branches" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wduplicated-branches"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wduplicated-cond" >&5
+$as_echo_n "checking if $CC supports -Wduplicated-cond... " >&6; }
+ if ${rra_cv_compiler_c__Wduplicated_cond+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wduplicated-cond in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wduplicated-cond" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wduplicated-cond" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wduplicated_cond=yes
+else
+  rra_cv_compiler_c__Wduplicated_cond=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wduplicated_cond" >&5
+$as_echo "$rra_cv_compiler_c__Wduplicated_cond" >&6; }
+ if test x"$rra_cv_compiler_c__Wduplicated_cond" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wduplicated-cond"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrampolines" >&5
+$as_echo_n "checking if $CC supports -Wtrampolines... " >&6; }
+ if ${rra_cv_compiler_c__Wtrampolines+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wtrampolines in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wtrampolines" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wtrampolines" ;; #(
   *) :
      ;;
 esac
@@ -5780,17 +6210,17 @@ $as_echo "$rra_cv_compiler_c__Wwrite_strings" >&6; }
  if test x"$rra_cv_compiler_c__Wwrite_strings" = xyes; then :
   WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wwrite-strings"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdate-time" >&5
-$as_echo_n "checking if $CC supports -Wdate-time... " >&6; }
- if ${rra_cv_compiler_c__Wdate_time+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wconversion" >&5
+$as_echo_n "checking if $CC supports -Wconversion... " >&6; }
+ if ${rra_cv_compiler_c__Wconversion+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wdate-time in #(
+     case -Wconversion in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wdate-time" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wconversion" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wdate-time" ;; #(
+    CFLAGS="$CFLAGS -Wconversion" ;; #(
   *) :
      ;;
 esac
@@ -5806,30 +6236,30 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wdate_time=yes
+  rra_cv_compiler_c__Wconversion=yes
 else
-  rra_cv_compiler_c__Wdate_time=no
+  rra_cv_compiler_c__Wconversion=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wdate_time" >&5
-$as_echo "$rra_cv_compiler_c__Wdate_time" >&6; }
- if test x"$rra_cv_compiler_c__Wdate_time" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wdate-time"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wconversion" >&5
+$as_echo "$rra_cv_compiler_c__Wconversion" >&6; }
+ if test x"$rra_cv_compiler_c__Wconversion" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wconversion"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wjump-misses-init" >&5
-$as_echo_n "checking if $CC supports -Wjump-misses-init... " >&6; }
- if ${rra_cv_compiler_c__Wjump_misses_init+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wno-sign-conversion" >&5
+$as_echo_n "checking if $CC supports -Wno-sign-conversion... " >&6; }
+ if ${rra_cv_compiler_c__Wno_sign_conversion+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wjump-misses-init in #(
+     case -Wno-sign-conversion in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wjump-misses-init" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wno-sign-conversion" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wjump-misses-init" ;; #(
+    CFLAGS="$CFLAGS -Wno-sign-conversion" ;; #(
   *) :
      ;;
 esac
@@ -5845,30 +6275,69 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wjump_misses_init=yes
+  rra_cv_compiler_c__Wno_sign_conversion=yes
 else
-  rra_cv_compiler_c__Wjump_misses_init=no
+  rra_cv_compiler_c__Wno_sign_conversion=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wjump_misses_init" >&5
-$as_echo "$rra_cv_compiler_c__Wjump_misses_init" >&6; }
- if test x"$rra_cv_compiler_c__Wjump_misses_init" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wjump-misses-init"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wno_sign_conversion" >&5
+$as_echo "$rra_cv_compiler_c__Wno_sign_conversion" >&6; }
+ if test x"$rra_cv_compiler_c__Wno_sign_conversion" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wno-sign-conversion"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdate-time" >&5
+$as_echo_n "checking if $CC supports -Wdate-time... " >&6; }
+ if ${rra_cv_compiler_c__Wdate_time+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wdate-time in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wdate-time" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wdate-time" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wdate_time=yes
+else
+  rra_cv_compiler_c__Wdate_time=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wdate_time" >&5
+$as_echo "$rra_cv_compiler_c__Wdate_time" >&6; }
+ if test x"$rra_cv_compiler_c__Wdate_time" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wdate-time"
 fi
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wfloat-conversion" >&5
-$as_echo_n "checking if $CC supports -Wfloat-conversion... " >&6; }
- if ${rra_cv_compiler_c__Wfloat_conversion+:} false; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wjump-misses-init" >&5
+$as_echo_n "checking if $CC supports -Wjump-misses-init... " >&6; }
+ if ${rra_cv_compiler_c__Wjump_misses_init+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   save_CFLAGS=$CFLAGS
-     case -Wfloat-conversion in #(
+     case -Wjump-misses-init in #(
   -Wno-*) :
-    CFLAGS="$CFLAGS `echo "-Wfloat-conversion" | sed 's/-Wno-/-W/'`" ;; #(
+    CFLAGS="$CFLAGS `echo "-Wjump-misses-init" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wfloat-conversion" ;; #(
+    CFLAGS="$CFLAGS -Wjump-misses-init" ;; #(
   *) :
      ;;
 esac
@@ -5884,18 +6353,18 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wfloat_conversion=yes
+  rra_cv_compiler_c__Wjump_misses_init=yes
 else
-  rra_cv_compiler_c__Wfloat_conversion=no
+  rra_cv_compiler_c__Wjump_misses_init=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wfloat_conversion" >&5
-$as_echo "$rra_cv_compiler_c__Wfloat_conversion" >&6; }
- if test x"$rra_cv_compiler_c__Wfloat_conversion" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wfloat-conversion"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wjump_misses_init" >&5
+$as_echo "$rra_cv_compiler_c__Wjump_misses_init" >&6; }
+ if test x"$rra_cv_compiler_c__Wjump_misses_init" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wjump-misses-init"
 fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5
 $as_echo_n "checking if $CC supports -Wlogical-op... " >&6; }
@@ -6052,6 +6521,45 @@ fi
 $as_echo "$rra_cv_compiler_c__Wmissing_prototypes" >&6; }
  if test x"$rra_cv_compiler_c__Wmissing_prototypes" = xyes; then :
   WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wmissing-prototypes"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5
+$as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; }
+ if ${rra_cv_compiler_c__Wmissing_declarations+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wmissing-declarations in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wmissing-declarations" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wmissing-declarations" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wmissing_declarations=yes
+else
+  rra_cv_compiler_c__Wmissing_declarations=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wmissing_declarations" >&5
+$as_echo "$rra_cv_compiler_c__Wmissing_declarations" >&6; }
+ if test x"$rra_cv_compiler_c__Wmissing_declarations" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wmissing-declarations"
 fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnormalized=nfc" >&5
 $as_echo_n "checking if $CC supports -Wnormalized=nfc... " >&6; }
@@ -6141,7 +6649,46 @@ else
   -Wno-*) :
     CFLAGS="$CFLAGS `echo "-Wredundant-decls" | sed 's/-Wno-/-W/'`" ;; #(
   *) :
-    CFLAGS="$CFLAGS -Wredundant-decls" ;; #(
+    CFLAGS="$CFLAGS -Wredundant-decls" ;; #(
+  *) :
+     ;;
+esac
+     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+int foo = 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  rra_cv_compiler_c__Wredundant_decls=yes
+else
+  rra_cv_compiler_c__Wredundant_decls=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+     CFLAGS=$save_CFLAGS
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wredundant_decls" >&5
+$as_echo "$rra_cv_compiler_c__Wredundant_decls" >&6; }
+ if test x"$rra_cv_compiler_c__Wredundant_decls" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wredundant-decls"
+fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wrestrict" >&5
+$as_echo_n "checking if $CC supports -Wrestrict... " >&6; }
+ if ${rra_cv_compiler_c__Wrestrict+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  save_CFLAGS=$CFLAGS
+     case -Wrestrict in #(
+  -Wno-*) :
+    CFLAGS="$CFLAGS `echo "-Wrestrict" | sed 's/-Wno-/-W/'`" ;; #(
+  *) :
+    CFLAGS="$CFLAGS -Wrestrict" ;; #(
   *) :
      ;;
 esac
@@ -6157,18 +6704,18 @@ int foo = 0;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-  rra_cv_compiler_c__Wredundant_decls=yes
+  rra_cv_compiler_c__Wrestrict=yes
 else
-  rra_cv_compiler_c__Wredundant_decls=no
+  rra_cv_compiler_c__Wrestrict=no
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
      CFLAGS=$save_CFLAGS
 fi
 
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wredundant_decls" >&5
-$as_echo "$rra_cv_compiler_c__Wredundant_decls" >&6; }
- if test x"$rra_cv_compiler_c__Wredundant_decls" = xyes; then :
-  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wredundant-decls"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_compiler_c__Wrestrict" >&5
+$as_echo "$rra_cv_compiler_c__Wrestrict" >&6; }
+ if test x"$rra_cv_compiler_c__Wrestrict" = xyes; then :
+  WARNINGS_CFLAGS="${WARNINGS_CFLAGS} -Wrestrict"
 fi
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5
 $as_echo_n "checking if $CC supports -Wnested-externs... " >&6; }
@@ -8234,7 +8781,7 @@ esac
 fi
 
 : ${AR=ar}
-: ${AR_FLAGS=cru}
+: ${AR_FLAGS=cr}
 
 
 
@@ -8735,11 +9282,8 @@ _LT_EOF
   test $ac_status = 0; }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5
-  (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && test -s "$nlist"; then
+    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5
+    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -9958,8 +10502,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
-      echo "$AR cru libconftest.a conftest.o" >&5
-      $AR cru libconftest.a conftest.o 2>&5
+      echo "$AR cr libconftest.a conftest.o" >&5
+      $AR cr libconftest.a conftest.o 2>&5
       echo "$RANLIB libconftest.a" >&5
       $RANLIB libconftest.a 2>&5
       cat > conftest.c << _LT_EOF
@@ -10791,6 +11335,12 @@ lt_prog_compiler_static=
        lt_prog_compiler_pic='-KPIC'
        lt_prog_compiler_static='-static'
         ;;
+      # flang / f18. f95 an alias for gfortran or flang on Debian
+      flang* | f18* | f95*)
+       lt_prog_compiler_wl='-Wl,'
+       lt_prog_compiler_pic='-fPIC'
+       lt_prog_compiler_static='-static'
+        ;;
       # icc used to be incompatible with GCC.
       # ICC 10 doesn't accept -KPIC any more.
       icc* | ifort*)
@@ -14351,6 +14901,47 @@ CC=$lt_save_CC
 
 
 
+# Extract the first word of "valgrind", so it can be a program name with args.
+set dummy valgrind; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_VALGRIND+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PATH_VALGRIND in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATH_VALGRIND="$PATH_VALGRIND" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PATH_VALGRIND="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PATH_VALGRIND=$ac_cv_path_PATH_VALGRIND
+if test -n "$PATH_VALGRIND"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_VALGRIND" >&5
+$as_echo "$PATH_VALGRIND" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
 rra_lib_arch_name=lib
  # The cast to long int works around a bug in the HP C Compiler
 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
 $as_echo "#define HAVE_CDB 1" >>confdefs.h
 
 fi
-rra_system_cracklib=
- rra_cracklib_root=
- rra_cracklib_libdir=
- rra_cracklib_includedir=
+rra_CRACKLIB_root=
+ rra_CRACKLIB_libdir=
+ rra_CRACKLIB_includedir=
+ rra_use_CRACKLIB=
  CRACKLIB_CPPFLAGS=
  CRACKLIB_LDFLAGS=
  CRACKLIB_LIBS=
@@ -14646,11 +15237,13 @@ rra_system_cracklib=
 
 # Check whether --with-cracklib was given.
 if test "${with_cracklib+set}" = set; then :
-  withval=$with_cracklib; if test x"$withval" != xno; then :
-  rra_system_cracklib=yes
+  withval=$with_cracklib; if test x"$withval" = xno; then :
+  rra_use_CRACKLIB=false
+else
+  rra_use_CRACKLIB=true
+         if test x"$withval" != xyes; then :
+  rra_CRACKLIB_root="$withval"
 fi
-     if test x"$withval" != xyes && test x"$withval" != xno; then :
-  rra_cracklib_root="$withval"
 fi
 fi
 
@@ -14658,7 +15251,7 @@ fi
 # Check whether --with-cracklib-include was given.
 if test "${with_cracklib_include+set}" = set; then :
   withval=$with_cracklib_include; if test x"$withval" != xyes && test x"$withval" != xno; then :
-  rra_cracklib_includedir="$withval"
+  rra_CRACKLIB_includedir="$withval"
 fi
 fi
 
 # Check whether --with-cracklib-lib was given.
 if test "${with_cracklib_lib+set}" = set; then :
   withval=$with_cracklib_lib; if test x"$withval" != xyes && test x"$withval" != xno; then :
-  rra_cracklib_libdir="$withval"
+  rra_CRACKLIB_libdir="$withval"
 fi
 fi
 
 
-  if test x"$rra_system_cracklib" != xyes; then
-  EMBEDDED_CRACKLIB_TRUE=
-  EMBEDDED_CRACKLIB_FALSE='#'
-else
-  EMBEDDED_CRACKLIB_TRUE='#'
-  EMBEDDED_CRACKLIB_FALSE=
-fi
-
- if test x"$rra_system_cracklib" = xyes; then :
-  if test x"$rra_cracklib_libdir" != x; then :
-  CRACKLIB_LDFLAGS="-L$rra_cracklib_libdir"
+  if test x"$rra_use_CRACKLIB" != xfalse; then :
+  if test x"$rra_use_CRACKLIB" != x; then :
+  if test x"$rra_CRACKLIB_libdir" != x; then :
+  CRACKLIB_LDFLAGS="-L$rra_CRACKLIB_libdir"
 else
-  if test x"$rra_cracklib_root" != x; then :
+  if test x"$rra_CRACKLIB_root" != x; then :
 
- if test -d "$rra_cracklib_root/$rra_lib_arch_name"; then :
+ if test -d "${rra_CRACKLIB_root}/$rra_lib_arch_name"; then :
   if test x"" = x; then :
-  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L$rra_cracklib_root/${rra_lib_arch_name}"
+  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L${rra_CRACKLIB_root}/${rra_lib_arch_name}"
 else
-  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L$rra_cracklib_root/${rra_lib_arch_name}/"
+  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L${rra_CRACKLIB_root}/${rra_lib_arch_name}/"
 fi
 else
   if test x"" = x; then :
-  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L$rra_cracklib_root/lib"
+  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L${rra_CRACKLIB_root}/lib"
 else
-  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L$rra_cracklib_root/lib/"
+  CRACKLIB_LDFLAGS="$CRACKLIB_LDFLAGS -L${rra_CRACKLIB_root}/lib/"
 fi
 fi
  CRACKLIB_LDFLAGS=`echo "$CRACKLIB_LDFLAGS" | sed -e 's/^ *//'`
 fi
 fi
- if test x"$rra_cracklib_includedir" != x; then :
-  CRACKLIB_CPPFLAGS="-I$rra_cracklib_includedir"
+ if test x"$rra_CRACKLIB_includedir" != x; then :
+  CRACKLIB_CPPFLAGS="-I$rra_CRACKLIB_includedir"
 else
-  if test x"$rra_cracklib_root" != x; then :
-  if test x"$rra_cracklib_root" != x/usr; then :
-  CRACKLIB_CPPFLAGS="-I${rra_cracklib_root}/include"
+  if test x"$rra_CRACKLIB_root" != x; then :
+  if test x"$rra_CRACKLIB_root" != x/usr; then :
+  CRACKLIB_CPPFLAGS="-I${rra_CRACKLIB_root}/include"
 fi
 fi
 fi
-      CRACKLIB_LIBS="-lcrack"
-      rra_cracklib_save_CPPFLAGS="$CPPFLAGS"
- rra_cracklib_save_LDFLAGS="$LDFLAGS"
- rra_cracklib_save_LIBS="$LIBS"
+ rra_CRACKLIB_save_CPPFLAGS="$CPPFLAGS"
+ rra_CRACKLIB_save_LDFLAGS="$LDFLAGS"
+ rra_CRACKLIB_save_LIBS="$LIBS"
  CPPFLAGS="$CRACKLIB_CPPFLAGS $CPPFLAGS"
  LDFLAGS="$CRACKLIB_LDFLAGS $LDFLAGS"
  LIBS="$CRACKLIB_LIBS $LIBS"
- ac_fn_c_check_func "$LINENO" "FascistCheck" "ac_cv_func_FascistCheck"
-if test "x$ac_cv_func_FascistCheck" = xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FascistCheck in -lcrack" >&5
+$as_echo_n "checking for FascistCheck in -lcrack... " >&6; }
+if ${ac_cv_lib_crack_FascistCheck+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcrack  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
 
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char FascistCheck ();
+int
+main ()
+{
+return FascistCheck ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_crack_FascistCheck=yes
 else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "unable to link with CrackLib library
-See \`config.log' for more details" "$LINENO" 5; }
+  ac_cv_lib_crack_FascistCheck=no
 fi
-
- CPPFLAGS="$rra_cracklib_save_CPPFLAGS"
- LDFLAGS="$rra_cracklib_save_LDFLAGS"
- LIBS="$rra_cracklib_save_LIBS"
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-if test x"$rra_system_cracklib" = xyes; then :
-  rra_cracklib_save_CPPFLAGS="$CPPFLAGS"
- rra_cracklib_save_LDFLAGS="$LDFLAGS"
- rra_cracklib_save_LIBS="$LIBS"
- CPPFLAGS="$CRACKLIB_CPPFLAGS $CPPFLAGS"
- LDFLAGS="$CRACKLIB_LDFLAGS $LDFLAGS"
- LIBS="$CRACKLIB_LIBS $LIBS"
-     for ac_header in crack.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crack_FascistCheck" >&5
+$as_echo "$ac_cv_lib_crack_FascistCheck" >&6; }
+if test "x$ac_cv_lib_crack_FascistCheck" = xyes; then :
+  CRACKLIB_LIBS=-lcrack
+else
+  as_fn_error $? "cannot find usable CrackLib library" "$LINENO" 5
+fi
+
+ for ac_header in crack.h
 do :
   ac_fn_c_check_header_mongrel "$LINENO" "crack.h" "ac_cv_header_crack_h" "$ac_includes_default"
 if test "x$ac_cv_header_crack_h" = xyes; then :
 
 done
 
-     CPPFLAGS="$rra_cracklib_save_CPPFLAGS"
- LDFLAGS="$rra_cracklib_save_LDFLAGS"
- LIBS="$rra_cracklib_save_LIBS"
+
+$as_echo "#define HAVE_SYSTEM_CRACKLIB 1" >>confdefs.h
+
+ CPPFLAGS="$rra_CRACKLIB_save_CPPFLAGS"
+ LDFLAGS="$rra_CRACKLIB_save_LDFLAGS"
+ LIBS="$rra_CRACKLIB_save_LIBS"
+fi
+
+$as_echo "#define HAVE_CRACKLIB 1" >>confdefs.h
+
+fi
+  if test x"$rra_use_CRACKLIB" = x; then
+  EMBEDDED_CRACKLIB_TRUE=
+  EMBEDDED_CRACKLIB_FALSE='#'
+else
+  EMBEDDED_CRACKLIB_TRUE='#'
+  EMBEDDED_CRACKLIB_FALSE=
 fi
+
 rra_reduced_depends=false
 # Check whether --enable-reduced-depends was given.
 if test "${enable_reduced_depends+set}" = set; then :
@@ -14762,48 +15383,6 @@ if test "${enable_reduced_depends+set}" = set; then :
 fi
 fi
 
-
- # Extract the first word of "krb5-config", so it can be a program name with args.
-set dummy krb5-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_PATH_KRB5_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $PATH_KRB5_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_PATH_KRB5_CONFIG="$PATH_KRB5_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_dummy="${PATH}:/usr/kerberos/bin"
-for as_dir in $as_dummy
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_PATH_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-PATH_KRB5_CONFIG=$ac_cv_path_PATH_KRB5_CONFIG
-if test -n "$PATH_KRB5_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_KRB5_CONFIG" >&5
-$as_echo "$PATH_KRB5_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
 rra_krb5_root=
  rra_krb5_libdir=
  rra_krb5_includedir=
 $as_echo "$ac_cv_lib_krb5_krb5_init_context" >&6; }
 if test "x$ac_cv_lib_krb5_krb5_init_context" = xyes; then :
   KRB5_LIBS="-lkrb5"
-else
-  if test x"true" = xtrue; then :
-  as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5
-fi
-fi
-
- LIBS="$KRB5_LIBS $LIBS"
- if test x"$rra_krb5_incroot" = x; then :
+     LIBS="$KRB5_LIBS $LIBS"
+     if test x"$rra_krb5_incroot" = x; then :
   for ac_header in krb5.h kerberosv5/krb5.h krb5/krb5.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -14986,7 +15559,7 @@ else
 $as_echo "no" >&6; }
 fi
 fi
- for ac_func in krb5_get_error_message
    for ac_func in krb5_get_error_message
 do :
   ac_fn_c_check_func "$LINENO" "krb5_get_error_message" "ac_cv_func_krb5_get_error_message"
 if test "x$ac_cv_func_krb5_get_error_message" = xyes; then :
@@ -15061,9 +15634,9 @@ fi
 $as_echo "$ac_cv_lib_ksvc_krb5_svc_get_msg" >&6; }
 if test "x$ac_cv_lib_ksvc_krb5_svc_get_msg" = xyes; then :
   KRB5_LIBS="$KRB5_LIBS -lksvc"
-                  $as_echo "#define HAVE_KRB5_SVC_GET_MSG 1" >>confdefs.h
+                     $as_echo "#define HAVE_KRB5_SVC_GET_MSG 1" >>confdefs.h
 
-                  for ac_header in ibm_svc/krb5_svc.h
+                     for ac_header in ibm_svc/krb5_svc.h
 do :
   ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" "
 #if HAVE_KRB5_H
@@ -15131,7 +15704,7 @@ else
 fi
 fi
 
-                  if test x"$rra_krb5_incroot" = x; then :
+                     if test x"$rra_krb5_incroot" = x; then :
   for ac_header in et/com_err.h kerberosv5/com_err.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -15186,18 +15759,65 @@ done
 fi
 done
 
+else
+  if test x"true" = xtrue; then :
+  as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5
+fi
+fi
+
  CPPFLAGS="$rra_krb5_save_CPPFLAGS"
  LDFLAGS="$rra_krb5_save_LDFLAGS"
  LIBS="$rra_krb5_save_LIBS"
 else
   if test x"$rra_krb5_includedir" = x && test x"$rra_krb5_libdir" = x; then :
-
- rra_krb5_config_KRB5=
+  rra_krb5_config_KRB5=
  rra_krb5_config_KRB5_ok=
  if test x"${rra_krb5_root}" != x && test -x "${rra_krb5_root}/bin/krb5-config"; then :
   rra_krb5_config_KRB5="${rra_krb5_root}/bin/krb5-config"
 else
-  rra_krb5_config_KRB5="$PATH_KRB5_CONFIG"
+
+ # Extract the first word of "krb5-config", so it can be a program name with args.
+set dummy krb5-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PATH_KRB5_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PATH_KRB5_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PATH_KRB5_CONFIG="$PATH_KRB5_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="${PATH}:/usr/kerberos/bin"
+for as_dir in $as_dummy
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PATH_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PATH_KRB5_CONFIG=$ac_cv_path_PATH_KRB5_CONFIG
+if test -n "$PATH_KRB5_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_KRB5_CONFIG" >&5
+$as_echo "$PATH_KRB5_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+     rra_krb5_config_KRB5="$PATH_KRB5_CONFIG"
 fi
  if test x"$rra_krb5_config_KRB5" != x && test -x "$rra_krb5_config_KRB5"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5 support in krb5-config" >&5
@@ -18640,6 +19260,48 @@ cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_KRB5_KT_FREE_ENTRY $ac_have_decl
 _ACEOF
 
+for ac_func in krb5_appdefault_string
+do :
+  ac_fn_c_check_func "$LINENO" "krb5_appdefault_string" "ac_cv_func_krb5_appdefault_string"
+if test "x$ac_cv_func_krb5_appdefault_string" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_APPDEFAULT_STRING 1
+_ACEOF
+
+else
+  for ac_func in krb5_get_profile
+do :
+  ac_fn_c_check_func "$LINENO" "krb5_get_profile" "ac_cv_func_krb5_get_profile"
+if test "x$ac_cv_func_krb5_get_profile" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_KRB5_GET_PROFILE 1
+_ACEOF
+
+fi
+done
+
+     for ac_header in k5profile.h profile.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+     case " $LIBOBJS " in
+  *" krb5-profile.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS krb5-profile.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
 case " $LIBOBJS " in
   *" krb5-extra.$ac_objext "* ) ;;
   *) LIBOBJS="$LIBOBJS krb5-extra.$ac_objext"
@@ -18871,8 +19533,8 @@ fi
   test $ac_status = 0; }; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE" >&5
-$as_echo_n "checking for SQLITE... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3" >&5
+$as_echo_n "checking for sqlite3... " >&6; }
 
 if test -n "$SQLITE_CFLAGS"; then
     pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
@@ -18912,7 +19574,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -18939,7 +19601,7 @@ Alternatively, you may set the environment variables SQLITE_CFLAGS
 and SQLITE_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -19096,8 +19758,8 @@ fi
   test $ac_status = 0; }; then
 
 pkg_failed=no
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SQLITE" >&5
-$as_echo_n "checking for SQLITE... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3" >&5
+$as_echo_n "checking for sqlite3... " >&6; }
 
 if test -n "$SQLITE_CFLAGS"; then
     pkg_cv_SQLITE_CFLAGS="$SQLITE_CFLAGS"
@@ -19137,7 +19799,7 @@ fi
 
 
 if test $pkg_failed = yes; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 
 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
@@ -19164,7 +19826,7 @@ Alternatively, you may set the environment variables SQLITE_CFLAGS
 and SQLITE_LIBS to avoid the need to call pkg-config.
 See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
-       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
        { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
@@ -19443,7 +20105,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
 
 fi
 
-for ac_header in sys/bittypes.h sys/select.h sys/time.h syslog.h
+for ac_header in strings.h sys/bittypes.h sys/select.h sys/time.h syslog.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -19771,12 +20433,13 @@ else
 esac
 
 fi
-for ac_func in setrlimit
+for ac_func in explicit_bzero setrlimit
 do :
-  ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit"
-if test "x$ac_cv_func_setrlimit" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_SETRLIMIT 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -20382,7 +21045,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by krb5-strength $as_me 3.1, which was
+This file was extended by krb5-strength $as_me 3.2, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20448,7 +21111,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-krb5-strength config.status 3.1
+krb5-strength config.status 3.2
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
@@ -20567,7 +21230,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"
 
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -21463,29 +22126,35 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
   # if we detect the quoting.
-  case $CONFIG_FILES in
-  *\'*) eval set x "$CONFIG_FILES" ;;
-  *)   set x $CONFIG_FILES ;;
-  esac
+  # TODO: see whether this extra hack can be removed once we start
+  # requiring Autoconf 2.70 or later.
+  case $CONFIG_FILES in #(
+  *\'*) :
+    eval set x "$CONFIG_FILES" ;; #(
+  *) :
+    set x $CONFIG_FILES ;; #(
+  *) :
+     ;;
+esac
   shift
-  for mf
+  # Used to flag and report bootstrapping failures.
+  am_rc=0
+  for am_mf
   do
     # Strip MF so we end up with the name of the file.
-    mf=`echo "$mf" | sed -e 's/:.*$//'`
-    # Check whether this is an Automake generated Makefile or not.
-    # We used to match only the files named 'Makefile.in', but
-    # some people rename them; so instead we look at the file content.
-    # Grep'ing the first line is not enough: some people post-process
-    # each Makefile.in and add a new line on top of each file to say so.
-    # Grep'ing the whole file is not good either: AIX grep has a line
+    am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile which includes
+    # dependency-tracking related rules and includes.
+    # Grep'ing the whole file directly is not great: AIX grep has a line
     # limit of 2048, but all sed's we know have understand at least 4000.
-    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
-      dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$mf" : 'X\(//\)[^/]' \| \
-        X"$mf" : 'X\(//\)$' \| \
-        X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
+    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
+      || continue
+    am_dirpart=`$as_dirname -- "$am_mf" ||
+$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+        X"$am_mf" : 'X\(//\)[^/]' \| \
+        X"$am_mf" : 'X\(//\)$' \| \
+        X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$am_mf" |
     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
            s//\1/
            q
@@ -21503,53 +22172,50 @@ $as_echo X"$mf" |
            q
          }
          s/.*/./; q'`
-    else
-      continue
-    fi
-    # Extract the definition of DEPDIR, am__include, and am__quote
-    # from the Makefile without running 'make'.
-    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-    test -z "$DEPDIR" && continue
-    am__include=`sed -n 's/^am__include = //p' < "$mf"`
-    test -z "$am__include" && continue
-    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-    # Find all dependency output files, they are included files with
-    # $(DEPDIR) in their names.  We invoke sed twice because it is the
-    # simplest approach to changing $(DEPDIR) to its actual value in the
-    # expansion.
-    for file in `sed -n "
-      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
-      # Make sure the directory exists.
-      test -f "$dirpart/$file" && continue
-      fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-        X"$file" : 'X\(//\)[^/]' \| \
-        X"$file" : 'X\(//\)$' \| \
-        X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-           s//\1/
-           q
-         }
-         /^X\(\/\/\)[^/].*/{
+    am_filepart=`$as_basename -- "$am_mf" ||
+$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \
+        X"$am_mf" : 'X\(//\)$' \| \
+        X"$am_mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$am_mf" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
            s//\1/
            q
          }
-         /^X\(\/\/\)$/{
+         /^X\/\(\/\/\)$/{
            s//\1/
            q
          }
-         /^X\(\/\).*/{
+         /^X\/\(\/\).*/{
            s//\1/
            q
          }
          s/.*/./; q'`
-      as_dir=$dirpart/$fdir; as_fn_mkdir_p
-      # echo "creating $dirpart/$file"
-      echo '# dummy' > "$dirpart/$file"
-    done
+    { echo "$as_me:$LINENO: cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles" >&5
+   (cd "$am_dirpart" \
+      && sed -e '/# am--include-marker/d' "$am_filepart" \
+        | $MAKE -f - am--depfiles) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } || am_rc=$?
   done
+  if test $am_rc -ne 0; then
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Something went wrong bootstrapping makefile fragments
+    for automatic dependency tracking.  If GNU make was not used, consider
+    re-running the configure script with MAKE=\"gmake\" (or whatever is
+    necessary).  You can also try re-running configure with the
+    '--disable-dependency-tracking' option to at least be able to build
+    the package (albeit without support for automatic dependency tracking).
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+  { am_dirpart=; unset am_dirpart;}
+  { am_filepart=; unset am_filepart;}
+  { am_mf=; unset am_mf;}
+  { am_rc=; unset am_rc;}
+  rm -f conftest-deps.mk
 }
  ;;
     "libtool":C)
index e2e64916052002d9d25ccacb23982da0c5773ca6..6400f4a97a5a711edf2a1aaef13057b1a9e416e4 100644 (file)
@@ -1,15 +1,15 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2016 Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2006, 2007, 2009, 2010, 2012, 2013, 2014
+dnl Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2006-2007, 2009-2010, 2012-2014
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
-dnl See LICENSE for licensing terms.
+dnl SPDX-License-Identifier: MIT
 
 dnl Basic Autoconf configuration.
 AC_PREREQ([2.64])
-AC_INIT([krb5-strength], [3.1], [eagle@eyrie.org])
+AC_INIT([krb5-strength], [3.2], [eagle@eyrie.org])
 AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_LIBOBJ_DIR([portable])
 AC_CONFIG_MACRO_DIR([m4])
@@ -32,13 +32,12 @@ AC_PROG_INSTALL
 AM_DISABLE_STATIC
 LT_INIT
 
+dnl Only used for the test suite.
+AC_PATH_PROG([PATH_VALGRIND], [valgrind])
+
 dnl External libraries.
 RRA_LIB_CDB_OPTIONAL
 RRA_LIB_CRACKLIB
-AS_IF([test x"$rra_system_cracklib" = xyes],
-    [RRA_LIB_CRACKLIB_SWITCH
-     AC_CHECK_HEADERS([crack.h])
-     RRA_LIB_CRACKLIB_RESTORE])
 RRA_LIB_KRB5
 RRA_LIB_KRB5_SWITCH
 AC_CHECK_HEADERS([krb5/pwqual_plugin.h], [], [], [RRA_INCLUDES_KRB5])
@@ -52,6 +51,10 @@ AC_CHECK_FUNCS([krb5_free_default_realm \
 AC_CHECK_FUNCS([krb5_get_init_creds_opt_free],
     [RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS])
 AC_CHECK_DECLS([krb5_kt_free_entry], [], [], [RRA_INCLUDES_KRB5])
+AC_CHECK_FUNCS([krb5_appdefault_string], [],
+    [AC_CHECK_FUNCS([krb5_get_profile])
+     AC_CHECK_HEADERS([k5profile.h profile.h])
+     AC_LIBOBJ([krb5-profile])])
 AC_LIBOBJ([krb5-extra])
 AC_CHECK_HEADERS([kadm5/kadm5-pwcheck.h kadm5/kadm5_err.h], [], [],
     [RRA_INCLUDES_KRB5])
@@ -66,7 +69,7 @@ AC_SUBST([DL_LIBS])
 
 dnl Checks for basic C functionality.
 AC_HEADER_STDBOOL
-AC_CHECK_HEADERS([sys/bittypes.h sys/select.h sys/time.h syslog.h])
+AC_CHECK_HEADERS([strings.h sys/bittypes.h sys/select.h sys/time.h syslog.h])
 AC_CHECK_DECLS([snprintf, vsnprintf])
 RRA_C_C99_VAMACROS
 RRA_C_GNU_VAMACROS
@@ -77,7 +80,7 @@ AC_TYPE_UINT32_T
 AC_CHECK_TYPES([ssize_t], [], [],
     [#include <sys/types.h>])
 RRA_FUNC_SNPRINTF
-AC_CHECK_FUNCS([setrlimit])
+AC_CHECK_FUNCS([explicit_bzero setrlimit])
 AC_REPLACE_FUNCS([asprintf mkstemp reallocarray strndup])
 
 dnl Write out the results.
index a0081cc75056b8be7eca6e723ca406400262f666..09391e206d74bc10f27dc83e600d6f8661f08511 100644 (file)
@@ -7,17 +7,15 @@ following modifications have been made:
  * Modified the adjacent character check to depend on the password length.
  * Remove checks against the user's GECOS entry.
  * Don't exit on failure to open the database.
- * Improve the search algorithm in FindPW somewhat.
+ * Improved the search algorithm in FindPW somewhat.
  * Don't segfault on corrupt dictionaries.
  * Fixed the data format output by packer to properly pad the end.
- * Add ANSI C prototypes for all functions and mark const variables.
- * Remove unused functions.
- * Various compilation warning and portability fixes.
- * Use Autoconf and portable/system.h to find types of specific lengths.
- * Increase MINLENGTH.
- * Add a check for a duplicated dictionary word.
+ * Added ANSI C prototypes for all functions and mark const variables.
+ * Removed unused functions.
+ * Increased MINLENGTH.
+ * Added a check for a duplicated dictionary word.
  * Changed error for very short passwords to match current CrackLib.
- * Remove last block optimization in GetPW and start fresh each time.
+ * Removed last block optimization in GetPW and start fresh each time.
  * Close the dictionary after each password lookup.
  * Set hidden visibility on all CrackLib symbols.
  * Close the wfp file handle on PWClose if it's open.
@@ -25,6 +23,9 @@ following modifications have been made:
  * Changed the type of some variables to size_t to avoid truncation.
  * Forced locale in mkdict to avoid problems with non-C-locale sort.
  * Added a warning to packer if processing out-of-order words.
+ * Used Autoconf and portable/system.h to find types of specific lengths.
+ * Added missing break to RULE_MFIRST "(" and RULE_MLAST ")" handling.
+ * Various compilation warning and portability fixes.
 
 See the leading comments in each source file for a more detailed timeline
 and list of changes.
index b0f6703fdb875fba90777123c49a3ef39a1299e4..2f9d5508931d52a9237f9c204e731cf7bb12ec93 100644 (file)
@@ -17,6 +17,8 @@
  *   - Fix int8, int16, and int32 definitions.
  * 2013-10-01  Russ Allbery <eagle@eyrie.org>
  *   - Set hidden visibility on all symbols by default.
+ * 2020-05-16  Russ Allbery <eagle@eyrie.org>
+ *   - Cast CRACK_TOLOWER and CRACK_TOUPPER to char.
  */
 
 #include <config.h>
@@ -84,6 +86,6 @@ extern char *Lowercase(const char *);
 /* Undo default visibility change. */
 #pragma GCC visibility pop
 
-#define CRACK_TOLOWER(a)       (isupper(a)?tolower(a):(a)) 
-#define CRACK_TOUPPER(a)       (islower(a)?toupper(a):(a)) 
+#define CRACK_TOLOWER(a)       ((char)(isupper(a)?tolower(a):(a)))
+#define CRACK_TOUPPER(a)       ((char)(islower(a)?toupper(a):(a)))
 #define STRCMP(a,b)            strcmp((a),(b))
index 94964de02461b0b002ca7629630e10d1774c0c5e..e5805c46146512d3dfd685957f753e0322f3ff91 100644 (file)
@@ -28,6 +28,8 @@
  *   - Close the wfp file handle on PWClose if it's open.
  * 2016-11-06  Russ Allbery <eagle@eyrie.org>
  *   - Remove unused vers_id to silence GCC warnings.
+ * 2020-05-16  Russ Allbery <eagle@eyrie.org>
+ *   - Fix types of printf formatting directives in DEBUG conditionals.
  */
 
 #include <stdio.h>
@@ -182,7 +184,7 @@ PWClose(PWDICT *pwp)
                    pwp->hwms[i] = pwp->hwms[i-1];
                }
 #ifdef DEBUG
-               printf("hwm[%02x] = %d\n", i, pwp->hwms[i]);
+               printf("hwm[%02x] = %u\n", i, pwp->hwms[i]);
 #endif
            }
            fwrite(pwp->hwms, 1, sizeof(pwp->hwms), pwp->wfp);
@@ -344,7 +346,7 @@ FindPW(PWDICT *pwp, const char *string)
     }
 
 #ifdef DEBUG
-    printf("---- %lu, %lu ----\n", lwm, hwm);
+    printf("---- %u, %u ----\n", lwm, hwm);
 #endif
 
     for (;;)
@@ -352,7 +354,7 @@ FindPW(PWDICT *pwp, const char *string)
        int cmp;
 
 #ifdef DEBUG
-       printf("%lu, %lu\n", lwm, hwm);
+       printf("%u, %u\n", lwm, hwm);
 #endif
 
        middle = lwm + ((hwm - lwm + 1) / 2);
index 8f958458b9671d54f2063ca5595c0743bccb3410..0e25f3c74907d1e35911decb140e1ebf97927e4c 100644 (file)
  * 2016-11-06  Russ Allbery <eagle@eyrie.org>
  *   - Remove unused vers_id to silence GCC warnings.
  *   - Added GCC __attribute__ marker on Debug() function.
+ * 2020-05-16  Russ Allbery <eagle@eyrie.org>
+ *   - Change variables from int to size_t to silence warnings.
+ *   - Add missing break to RULE_MFIRST and RULE_MLAST handling.
+ *   - Remove break after return to silence Clang warnings.
  */
 
 #include <stdarg.h>
@@ -86,8 +90,8 @@ Debug(int val, const char *fmt, ...)
 static int
 Suffix(const char *myword, const char *suffix)
 {
-    register int i;
-    register int j;
+    register size_t i;
+    register size_t j;
     i = strlen(myword);
     j = strlen(suffix);
 
@@ -104,8 +108,8 @@ Suffix(const char *myword, const char *suffix)
 char *
 Reverse(const char *str)
 {
-    register int i;
-    register int j;
+    register size_t i;
+    register size_t j;
     static char area[STRINGSIZE];
     j = i = strlen(str);
     while (*str)
@@ -173,7 +177,7 @@ Capitalise(const char *str)
 static char *
 Pluralise(const char *string)
 {
-    register int length;
+    register size_t length;
     static char area[STRINGSIZE];
     length = strlen(string);
     strcpy(area, string);
@@ -359,7 +363,6 @@ MatchClass(char class, char input)
     default:
        Debug(1, "MatchClass: unknown class %c\n", class);
        return (0);
-       break;
     }
 
     if (isupper(class))
@@ -439,8 +442,9 @@ Char2Int(char character)
 char *
 Mangle(const char *input, const char *control)
 {
-    int limit, min_to_shift;
-    register int j;
+    int limit;
+    size_t min_to_shift;
+    register size_t j;
     const char *ptr;
     static char area[STRINGSIZE * 2] = "";
     char area2[STRINGSIZE * 2] = "";
@@ -786,6 +790,8 @@ Mangle(const char *input, const char *control)
                    }
                }
            }
+            break;
+
        case RULE_MLAST:
            if (!ptr[1] || (ptr[1] == RULE_CLASS && !ptr[2]))
            {
@@ -821,11 +827,11 @@ Mangle(const char *input, const char *control)
                    }
                }
            }
+            break;
 
        default:
            Debug(1, "Mangle: unknown command %c in %s\n", *ptr, control);
            return ((char *) 0);
-           break;
        }
     }
     if (!area[0])              /* have we deweted de poor widdle fing away? */
index a397372c5a0944d673ea55eeac449e5f43fc4804..eaa39dc2856a50cccf1b2655f82a24d1809d8f41 100644 (file)
@@ -1,3 +1,20 @@
+krb5-strength (3.2-1) unstable; urgency=medium
+
+  * New upstream release.
+    - New --check-only option to heimdal-history.
+    - Increase hash iterations for heimdal-history for new hashes.
+    - Use explicit_bzero to overwrite copies of passwords.
+  * Drop upstream patch to modify the test suite, since the upstream test
+    suite now correctly handles a system CrackLib library.
+  * Include the full text of the license of the embedded copy of cracklib
+    (not used in the Debian build) in debian/copyright, since it's not
+    identical to the Artistic license included in common-licenses.
+  * Update to debhelper compatibility level V13.
+  * Update to standards version 4.5.0 (no changes required).
+  * Refresh upstream signing key.
+
+ -- Russ Allbery <rra@debian.org>  Sun, 17 May 2020 10:27:44 -0700
+
 krb5-strength (3.1-2) unstable; urgency=medium
 
   * Update standards version to 4.2.1.
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index b4de394..0000000
+++ /dev/null
@@ -1 +0,0 @@
-11
index 987700d254bcb0cf5304fbe2d376d9c22e720254..51bec65e81750786b1615914648c8eadfddc4acf 100644 (file)
@@ -4,7 +4,7 @@ Priority: optional
 Maintainer: Russ Allbery <rra@debian.org>
 Build-Depends:
  cracklib-runtime,
- debhelper (>= 11),
+ debhelper-compat (= 13),
  libcdb-dev,
  libcrack2-dev,
  libcrypt-pbkdf2-perl,
@@ -26,7 +26,7 @@ Build-Depends:
  pkg-config,
  tinycdb,
 Rules-Requires-Root: no
-Standards-Version: 4.2.1
+Standards-Version: 4.5.0
 Homepage: https://www.eyrie.org/~eagle/software/krb5-strength/
 Vcs-Git: https://git.eyrie.org/git/kerberos/krb5-strength.git -b debian/master
 Vcs-Browser: https://git.eyrie.org/?p=kerberos/krb5-strength.git
index 07ffd81f11ba321d41199b9d92e8786da2f4ec98..94064a42e1267a9776ff5de056d402b4441cf5eb 100644 (file)
@@ -1,39 +1,51 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Contact: Russ Allbery <eagle@eyrie.org>
 Source: https://www.eyrie.org/~eagle/software/krb5-strength/
-Copyright: 2006-2007, 2009-2013
-    The Board of Trustees of the Leland Stanford Junior University
-  2016 Russ Allbery <eagle@eyrie.org>
-License: Expat
 
 Files: *
-Copyright: 1993 Alec Muffett
-  2000-2002, 2004-2016 Russ Allbery <eagle@eyrie.org>
+Copyright: 2000-2002, 2004-2020 Russ Allbery <eagle@eyrie.org>
   2001-2002, 2004-2014
     The Board of Trustees of the Leland Stanford Junior University
   2010 the Massachusetts Institute of Technology
 License: Expat
 
+Files: .clang-format docs/krb5-strength.5.in docs/krb5-strength.pod
+ portable/asprintf.c portable/dummy.c portable/kadmin.h
+ portable/krb5-extra.c portable/krb5.h portable/macros.h portable/mkstemp.c
+ portable/reallocarray.c portable/stdbool.h portable/strndup.c
+ portable/system.h tests/README tests/TESTS tests/data/cppcheck.supp
+ tests/data/perltidyrc tests/portable/asprintf-t.c
+ tests/portable/mkstemp-t.c tests/portable/reallocarray-t.c
+ tests/portable/strndup-t.c tools/heimdal-strength.1
+ tools/heimdal-strength.pod util/macros.h
+Copyright: 2006, 2010, 2014-2020 Russ Allbery <eagle@eyrie.org>
+  2006-2014 The Board of Trustees of the Leland Stanford Junior University
+License: all-permissive
+ 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.
+
 Files: Makefile.in
-Copyright: 1994-2014 Free Software Foundation, Inc.
+Copyright: 1994-2020 Free Software Foundation, Inc.
   2007, 2009-2010, 2012-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2016 Russ Allbery <eagle@eyrie.org>
+  2016, 2020 Russ Allbery <eagle@eyrie.org>
 License: FSF-unlimited and Expat
 
 Files: aclocal.m4
-Copyright: 1996-2016 Free Software Foundation, Inc.
+Copyright: 1996-2020 Free Software Foundation, Inc.
   2004 Scott James Remnant <scott@netsplit.com>
   2012-2015 Dan Nicholson <dbn.lists@gmail.com>
 License: FSF-unlimited, and GPL-2+ with Autoconf exception or Expat
 
 Files: build-aux/ar-lib build-aux/compile build-aux/depcomp
  build-aux/missing
-Copyright: 1996-2014 Free Software Foundation, Inc.
+Copyright: 1996-2020 Free Software Foundation, Inc.
 License: GPL-2+ with Autoconf exception or Expat
 
 Files: build-aux/config.guess build-aux/config.sub
-Copyright: 1992-2016 Free Software Foundation, Inc.
+Copyright: 1992-2018 Free Software Foundation, Inc.
 License: GPL-3+ with Autoconf exception or Expat
 
 Files: build-aux/install-sh
@@ -73,26 +85,116 @@ License: FSF-configure, and GPL-2+ with Libtool exception or Expat
 
 Files: cracklib/*
 Copyright: 1993 Alec Muffett
-License: Artistic
+Copyright-Grant:
  The author disclaims all responsibility or liability with respect to it's
  usage or its effect upon hardware or computer systems, and maintains
  copyright as set out in the "LICENCE" document which accompanies
  distributions of Crack v4.0 and upwards.
+License: Artistic-CrackLib
+ This documents purpose is to state the conditions under which these
+ Packages (See definition below) viz: "Crack", the Unix Password Cracker,
+ and "CrackLib", the Unix Password Checking library, which are held in
+ copyright by Alec David Edward Muffett, may be copied, such that the
+ copyright holder maintains some semblance of artistic control over the
+ development of the packages, while giving the users of the package the
+ right to use and distribute the Package in a more-or-less customary
+ fashion, plus the right to make reasonable modifications.
  .
- See cracklib/LICENCE for the full licensing terms.
-Comment: You can find the Artistic License in
- /usr/share/common-licenses/Artistic on Debian systems.
-
-Files: docs/krb5-strength.5.in docs/krb5-strength.pod tests/README
- tools/heimdal-strength.1 tools/heimdal-strength.pod
-Copyright: 2006-2007, 2009-2010, 2012-2014
-    The Board of Trustees of the Leland Stanford Junior University
-  2010, 2016 Russ Allbery <eagle@eyrie.org>
-License: all-permissive
- 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.
+ So there.
+ .
+ ***************************************************************************
+ .
+ Definitions:
+ .
+ A "Package" refers to the collection of files distributed by the
+ Copyright Holder, and derivatives of that collection of files created
+ through textual modification, or segments thereof.
+ .
+ "Standard Version" refers to such a Package if it has not been modified,
+ or has been modified in accordance with the wishes of the Copyright
+ Holder.
+ .
+ "Copyright Holder" is whoever is named in the copyright or copyrights
+ for the package.
+ .
+ "You" is you, if you're thinking about copying or distributing this
+ Package.
+ .
+ "Reasonable copying fee" is whatever you can justify on the basis of
+ media cost, duplication charges, time of people involved, and so on.
+ (You will not be required to justify it to the Copyright Holder, but
+ only to the computing community at large as a market that must bear the
+ fee.)
+ .
+ "Freely Available" means that no fee is charged for the item itself,
+ though there may be fees involved in handling the item.  It also means
+ that recipients of the item may redistribute it under the same
+ conditions they received it.
+ .
+ 1. You may make and give away verbatim copies of the source form of the
+ Standard Version of this Package without restriction, provided that you
+ duplicate all of the original copyright notices and associated
+ disclaimers.
+ .
+ 2. You may apply bug fixes, portability fixes and other modifications
+ derived from the Public Domain or from the Copyright Holder.  A Package
+ modified in such a way shall still be considered the Standard Version.
+ .
+ 3. You may otherwise modify your copy of this Package in any way,
+ provided that you insert a prominent notice in each changed file stating
+ how and when AND WHY you changed that file, and provided that you do at
+ least ONE of the following:
+ .
+ a) place your modifications in the Public Domain or otherwise make them
+ Freely Available, such as by posting said modifications to Usenet or an
+ equivalent medium, or placing the modifications on a major archive site
+ such as uunet.uu.net, or by allowing the Copyright Holder to include
+ your modifications in the Standard Version of the Package.
+ .
+ b) use the modified Package only within your corporation or organization.
+ .
+ c) rename any non-standard executables so the names do not conflict with
+ standard executables, which must also be provided, and provide separate
+ documentation for each non-standard executable that clearly documents
+ how it differs from the Standard Version.
+ .
+ d) make other distribution arrangements with the Copyright Holder.
+ .
+ 4. You may distribute the programs of this Package in object code or
+ executable form, provided that you do at least ONE of the following:
+ .
+ a) distribute a Standard Version of the executables and library files,
+ together with instructions (in the manual page or equivalent) on where
+ to get the Standard Version.
+ .
+ b) accompany the distribution with the machine-readable source of the
+ Package with your modifications.
+ .
+ c) accompany any non-standard executables with their corresponding
+ Standard Version executables, giving the non-standard executables
+ non-standard names, and clearly documenting the differences in manual
+ pages (or equivalent), together with instructions on where to get the
+ Standard Version.
+ .
+ d) make other distribution arrangements with the Copyright Holder.
+ .
+ 5. You may charge a reasonable copying fee for any distribution of this
+ Package.  You may charge any fee you choose for support of this Package.
+ YOU MAY NOT CHARGE A FEE FOR THIS PACKAGE ITSELF.  However, you may
+ distribute this Package in aggregate with other (possibly commercial)
+ programs as part of a larger (possibly commercial) software distribution
+ provided that YOU DO NOT ADVERTISE this package as a product of your
+ own.
+ .
+ 6. The name of the Copyright Holder may not be used to endorse or
+ promote products derived from this software without specific prior
+ written permission.
+ .
+ 7. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+ MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ .
+                                The End
 
 Files: m4/cc-flags.m4 util/messages.c util/messages.h util/xmalloc.c
  util/xmalloc.h
@@ -100,7 +202,7 @@ Copyright: 1991, 1994-2003 The Internet Software Consortium and Rich Salz
   2004-2006, 2009, 2016 Internet Systems Consortium, Inc.
   2008-2010, 2012-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2015-2016 Russ Allbery <eagle@eyrie.org>
+  2015-2020 Russ Allbery <eagle@eyrie.org>
 License: ISC
  Permission to use, copy, modify, and distribute this software for any
  purpose with or without fee is hereby granted, provided that the above
@@ -119,7 +221,7 @@ Files: m4/clang.m4 m4/cracklib.m4 m4/krb5-config.m4 m4/krb5.m4
  m4/sqlite.m4 m4/tinycdb.m4 m4/vamacros.m4
 Copyright: 2005-2014
     The Board of Trustees of the Leland Stanford Junior University
-  2015 Russ Allbery <eagle@eyrie.org>
+  2015, 2018, 2020 Russ Allbery <eagle@eyrie.org>
 License: unlimited
  This file is free software; the authors give unlimited permission to copy
  and/or distribute it, with or without modifications, as long as this
@@ -133,24 +235,48 @@ Files: m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4
 Copyright: 2004-2005, 2007-2009, 2011-2015 Free Software Foundation, Inc.
 License: FSF-unlimited
 
-Files: portable/asprintf.c portable/dummy.c portable/kadmin.h
- portable/krb5-extra.c portable/krb5.h portable/macros.h portable/mkstemp.c
- portable/reallocarray.c portable/stdbool.h portable/strndup.c
- portable/system.h tests/portable/asprintf-t.c tests/portable/mkstemp-t.c
- tests/portable/reallocarray-t.c tests/portable/strndup-t.c util/macros.h
-Copyright: no copyright notice, see License below
-License: rra-public-domain
- 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.
+Files: portable/krb5-profile.c
+Copyright: 1985-2005 the Massachusetts Institute of Technology
+License: MIT-Kerberos
+ Export of this software from the United States of America may require
+ a specific license from the United States Government.  It is the
+ responsibility of any person or organization contemplating export to
+ obtain such a license before exporting.
+ .
+ WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ distribute this software and its documentation for any purpose and
+ without fee is hereby granted, provided that the above copyright
+ notice appear in all copies and that both that copyright notice and
+ this permission notice appear in supporting documentation, and that
+ the name of M.I.T. not be used in advertising or publicity pertaining
+ to distribution of the software without specific, written prior
+ permission.  Furthermore if you modify this software you must label
+ your software as modified software and not distribute it in such a
+ fashion that it might be confused with the original MIT software.
+ M.I.T. makes no representations about the suitability of this software
+ for any purpose.  It is provided "as is" without express or implied
+ warranty.
+ .
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ .
+ Individual source code files are copyright MIT, Cygnus Support,
+ OpenVision, Oracle, Sun Soft, FundsXpress, and others.
+ .
+ Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
+ and Zephyr are trademarks of the Massachusetts Institute of Technology
+ (MIT).  No commercial use of these trademarks may be made without
+ prior written permission of MIT.
+ .
+ "Commercial use" means use of a name in a product or other for-profit
+ manner.  It does NOT prevent a commercial firm from referring to the
+ MIT trademarks in order to convey information (although in doing so,
+ recognition of their trademark status should be given).
 
 Files: portable/snprintf.c tests/portable/snprintf-t.c
 Copyright: 1995 Patrick Powell
-  2000-2006 Russ Allbery <eagle@eyrie.org>
+  2000-2006, 2018-2020 Russ Allbery <eagle@eyrie.org>
   2001 Hrvoje Niksic
   2009-2010 The Board of Trustees of the Leland Stanford Junior University
 License: Powell-snprintf
@@ -293,3 +419,4 @@ Comment: The option described in the license has been accepted and these
  files are distributed under the same terms as the package as a whole, as
  described at the top of this file.  You can find the GPL version 3 in
  /usr/share/common-licenses/GPL-3 on Debian systems.
+
diff --git a/debian/patches/0001-Change-CrackLib-tests-for-system-CrackLib.patch b/debian/patches/0001-Change-CrackLib-tests-for-system-CrackLib.patch
deleted file mode 100644 (file)
index 6df3039..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-From: Russ Allbery <eagle@eyrie.org>
-Date: Sun, 25 Dec 2016 11:50:14 -0800
-Subject: Change CrackLib tests for system CrackLib
-
-The upstream test suite contains a few tests that fail with the
-normal system CrackLib rules.  Modify them to expect passes so
-that we can run the full test suite during the build.
-
-Also remove CrackLib when testing character classes, since it
-rejects the passwords used for minimum_different testing as too
-simplistic.
----
- tests/data/passwords/cracklib.json |  8 ++------
- tests/plugin/mit-t.c               | 12 ++++++------
- 2 files changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/tests/data/passwords/cracklib.json b/tests/data/passwords/cracklib.json
-index 037a70f..b69e700 100644
---- a/tests/data/passwords/cracklib.json
-+++ b/tests/data/passwords/cracklib.json
-@@ -22,9 +22,7 @@
-     {
-         "name": "in dictionary (repeated)",
-         "principal": "test@EXAMPLE.ORG",
--        "password": "stanfordstanford",
--        "code": "KADM5_PASS_Q_GENERIC",
--        "error": "it is based on a (duplicated) dictionary word"
-+        "password": "stanfordstanford"
-     },
-     {
-         "name": "in dictionary (reversed)",
-@@ -36,9 +34,7 @@
-     {
-         "name": "seven characters",
-         "principal": "test@EXAMPLE.ORG",
--        "password": "dfareas",
--        "code": "KADM5_PASS_Q_GENERIC",
--        "error": "it is too short"
-+        "password": "dfareas"
-     },
-     {
-         "name": "four characters",
-diff --git a/tests/plugin/mit-t.c b/tests/plugin/mit-t.c
-index 7eba594..4406e38 100644
---- a/tests/plugin/mit-t.c
-+++ b/tests/plugin/mit-t.c
-@@ -272,13 +272,13 @@ main(void)
-     vtable->close(ctx, data);
-     /* Add simple character class configuration to krb5.conf. */
--    setup_argv[5] = (char *) "minimum_different";
--    setup_argv[6] = (char *) "8";
--    setup_argv[7] = (char *) "require_ascii_printable";
-+    setup_argv[3] = (char *) "minimum_different";
-+    setup_argv[4] = (char *) "8";
-+    setup_argv[5] = (char *) "require_ascii_printable";
-+    setup_argv[6] = (char *) "true";
-+    setup_argv[7] = (char *) "require_non_letter";
-     setup_argv[8] = (char *) "true";
--    setup_argv[9] = (char *) "require_non_letter";
--    setup_argv[10] = (char *) "true";
--    setup_argv[11] = NULL;
-+    setup_argv[9] = NULL;
-     run_setup((const char **) setup_argv);
-     /* Obtain a new Kerberos context with that krb5.conf file. */
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644 (file)
index ec5913b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0001-Change-CrackLib-tests-for-system-CrackLib.patch
index 1f23e248d0dc211a8442c8b6786c7c6ca2a49cf1..4b72a600ff1e64307346e2c6265488e6e4c51910 100755 (executable)
@@ -3,14 +3,14 @@
 set -e
 
 # Add a user to own the password history database.
-if ! getent passwd _history >/dev/null ; then
+if ! getent passwd _history >/dev/null; then
     echo 'Adding system user for password history' 1>&2
     adduser --disabled-login --quiet --system --no-create-home \
         --home /var/lib/heimdal-history --force-badname --group _history
 fi
 
 # Create the directory for the history database, owned by the history user.
-if [ ! -d /var/lib/heimdal-history ] ; then
+if [ ! -d /var/lib/heimdal-history ]; then
     mkdir /var/lib/heimdal-history
     chown _history:_history /var/lib/heimdal-history
 fi
index d5812bfac5699f64e59d4287ec9640ac6c6863b0..e5fec072578b7da7c9dd66b2d6c19f2dc4d98962 100755 (executable)
@@ -4,16 +4,16 @@ set -e
 
 # Purge the password history database and remove the _history user and group
 # on package purge.  This user should not be used for any other purpose.
-if [ "$1" = purge ] ; then
-    for file in history.db history.db.lock lengths.db lengths.db.lock ; do
+if [ "$1" = purge ]; then
+    for file in history.db history.db.lock lengths.db lengths.db.lock; do
         rm -f "/var/lib/heimdal-history/$file"
     done
     deluser --quiet --system _history >/dev/null || true
 fi
 
 # Remove the directory for the password history database on remove if empty.
-if [ "$1" = purge ] || [ "$1" = remove ] ; then
-    if [ -d /var/lib/heimdal-history ] ; then
+if [ "$1" = purge ] || [ "$1" = remove ]; then
+    if [ -d /var/lib/heimdal-history ]; then
         rmdir --ignore-fail-on-non-empty /var/lib/heimdal-history
     fi
 fi
index 24bbc5ad5837cf2e09b79d1b335f24561572a4ba..bb1fa30f17af3d2f87cf22fa6b3df915ee806f4b 100644 (file)
@@ -11,128 +11,143 @@ k3ZaddDQIBl5yv951EkVAelNwzABVKMeIi8RkpVdBVONj3+2Yg5+6oF9KfZc++KM
 eUXmPIESNaz2YEmN5VEnHBhqHs4v+rUzAZXJo0g3lv5hMEsoqCxu+w4uVR7e+AbT
 dIHnydQxCNkG31ywslUZPR9QP92NleIqgXY/nL1eDXBb9EGoxBSHD99KgavFB+xp
 +dgmzpo8UzOpVM+1xvTAOLHZ+jwW9hGCx1ALpKvWI2qYeW3j+N3LsyGI5wARAQAB
-tB5SdXNzIEFsbGJlcnkgPGVhZ2xlQGV5cmllLm9yZz6JAkAEEwEIACoCGwMFCwkI
-BwMFFQoJCAsFFgIDAQACHgECF4ACGQEFAlfdkzkFCRNh5wcACgkQ0V0xOIIAQXOF
-og//XvypcBeU6YeBnNIvgnyzUE/hcWLvbMNFWVQGHou4UtMt+B9FPxmr5WO+K3X+
-6rYkqNCYDe1IZUC6rRIuzC8+yEFY39vNcWl6fwatkI8Uq/rWhMxHxRPIshc2RA5t
-p4O9kZorY2Sk9ihiWYUc6s8nhjGinpJQ11p8wGvkvFzgPXO/wpw6LZpytS5SoIZH
-S/IyqNS/19DCphIaFdaY6XH3btHCoreshpzAJFh8XPcMf5AS14bOya2XDi9kV3c/
-wWMe2YakHFNmF0eJ9c025FTz4WXB61OuTtNNO1vksm3YSOBaI9Z0svFJJ52uzj+a
-ddHtdjBoisT8G5MzUH64bYgj+uKGkbiRDDdBvOtSb8yS2grx4f8Wg8wjIBCeLbWo
-XuJyInmO3ctO8Pr8lHoWzR07cE1VkmEdhYAkgdBIktKBr6i+0keBR7irZyu6/HdW
-bWEmFeD8qi+UyMZeAu0rlelpLKfNhKBiR9qfl/3YAjK4Hbzth1d1sCn7w3jGyIBu
-s5TrLXBveqchcr86lf82zS/crf1sSlFPzP+7XD/WP/s0xwyUcJ7IMS8BDyD14w5z
-ZvOuWiCfEhdRBzrhGE+kTq/0KhRfl3nF+F094AcJLtt4bPLAw2SvEREzbA4v9cHu
-fDhMIj969u+mayPqA2ZKWQr9JYx/XmJ42XHZP0tPg/jK60O0H1J1c3MgQWxsYmVy
-eSA8cnJhQHN0YW5mb3JkLmVkdT6JAj0EEwEIACcCGwMCHgECF4AFCwkIBwMFFQoJ
-CAsFFgIDAQAFAlfdk1AFCRNh5wcACgkQ0V0xOIIAQXN3Xg//WKk1nmC5S5idtHkf
-bSlC1eSLq2o2ci/JpIY41Z9XaydixhudKl1OPIRoCzuWNyWrGKVxEtZYF5NG0lMK
-IevrLRzM99WpA0D8U8H0syC4zKbIotpWuPNUoomI/+UcsAq0MR2KJ26x3It7lKa2
-3TWTpfLYXD0DqWXkqx/vLEoRV+GGA4Ogf2AoYRqMMUOWzYufBDpv41rJ0x3GF699
-4a4sx88IV528FvpyLaXGVBpBW5Aqyrn7Vln+E9n4LiZF3TAhzCL2Xmti6exqqF2+
-4WbUWnK/2U/SC3w9jWIG7NhkQ8HTBjd1XvPUwuIAxyI6NoNs1jFDNrMKQqtZAg4U
-OlRjl3eafnlDtejBOXXmIkV2zFYewdxNAlTfWxM0C44tMsMtRNd2XA/oSePs1ZgO
-04MXtY3N9Pg5zC4D/Mj/psUcPooKg3DhqE/Vza72cZ2o8hRW8DjKqrHyUmwoT+5C
-C+iYAweA7kaWiLEQVQ6Gkj6izubPt05xwt8A2/+1gwSbJxtnYgaW7+fs0L1RvH0G
-nGUoEIdELyT5apH35a3OwJ7+SFQHbevbEAYex2t2OiK/QuRh2gUIDGDVs6EDwIgr
-0lxpJpWljLA6u6BcLvvDkYT1x87GOoAOP/JXF9WNril6Lt4C4Xb9gFWpQimUUyF4
-0ENJPGi3ySwLrjAmp+LDZuZtulG0HVJ1c3MgQWxsYmVyeSA8cnJhQGRlYmlhbi5v
-cmc+iQI9BBMBCAAnAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJX3ZNQBQkT
-YecHAAoJENFdMTiCAEFz2B8QALLKMz3l64/JbAcNuFt82yRBfa6W0gsNXX1wOV9q
-xbcyRNKxhPqihN6OXTLtUyAFas/bFbK+o4hlzecrKzKylliwUK0BhtjRQRP79u71
-kZc5K5HxWsFTMD45hKVGB8FaDIKUqmQRdMIFEAbzTBZDyTV3FlV2PAXe9hoUS6v7
-ofAQZvYhXKVj0l3epzIb+lMfQmh+l+T44V/3TmITkrsKjhqlgm8R9zFysUE2tFKS
-RBXT949KKwAlRybJ/mCpZVc3R+dH28MigSu0g4WcyWVtK+4HhlLRK67DnT6v89mU
-DzpW1x2tV694Im5n9iftuWI/XaiQ+u26XqPJXUlX+fep1+0Ja8Yb6BLIZNAweTIj
-6if8YnPUP3w3cY92QOprLrL/PVDLhXvn+rGt0s6X2/rmA5ae/0wA5WZOUVm1UHls
-qv9X7oaU6VJ2Z4PA2oTimkCBnL+AGBEeBJcwCaQEpN3Aa58abZWwCf/mjU+VSLG/
-mE181sJQzenKfTQhsA7/ZV7rvurnfnMd5TMHR27qZLGkB7CyKHv+aSjkklVtTCUW
-0q68RweRJr2/9gojIqPvyUchuGnBlJDx6KAXJxhvYSTJrwA+H78XnA6AeuL+Qn+N
-tIL9veJquayxFq0hpt8tLhs6EAcNHumMafYgf2hqA+uj1i2/Tb25VEUbdpCIssZO
-BTW7tCpSdXNzIEFsbGJlcnkgPGVhZ2xlQHdpbmRsb3JkLnN0YW5mb3JkLmVkdT6J
-AkEEMAEIACsFAlPu130kHSBTeXN0ZW0gYW5kIGFkZHJlc3Mgbm8gbG9uZ2VyIGV4
-aXN0AAoJENFdMTiCAEFz6+cP/0LpJNgtaFQTc6EASrZJepp0qR4jSEj0rAxwuQtK
-iFPRM0t9mBrGRLCwWDGssGpUmH5s2xbrg+f80gMPL85CFO2NzRdAX9vak+J53Di6
-dn4f1MrAQouQPt/53R8txN6cyerp3Fyk66j8KVLZSu17crpLxJ7GHTN8UPjHHhmj
-EFxSI7VifM9/9RlKeGY1Tj6+fn8SKRPDJwEE2HwoSDhmmvFbqDJQe/fk7TaaG/G6
-F+iTASFsiqdwK5ffDT1Yi18K3eaCHcuIbgXb0qXHH7hYxIgXQuAOL6t6LQmRz5HC
-upCjUBx9W25AJLTogenj2hgNbBe8LDbbELI5Foxn4Dhb+6dpepvCEAfUirxYiKHc
-RsZB0E8D6qObQUgXmUZ45Z43jJf9Wk8LPVxnN6Lny3DVrGgE5r7sr/QyzDjRuDQg
-Rsa9uXpv7rX2KYKpyZStvgA5SM+XdYTyaIlDgGiTIVjNWkb+3LAzrHXV8CvDSn7F
-CuvpOax+z1+cJXnFFDFOrHN/tC/8w2U29L+fmJRCeJhj7MKjT/IobkdyuS2juBDg
-r7QDmsHcI07ElbZGp4zjKnZYx42hkgVyjJBIcUdU3UGazTsnmF9t7Ek8JrZNannR
-u1KC6rgOc8tP/FsVJmllgnr57CXazF++kLy7qwqgw2T9EA89WMtkakKLyMoit86C
-E40TtCJSdXNzIEFsbGJlcnkgPHJyYUBjcy5zdGFuZm9yZC5lZHU+iQI9BBMBCAAn
-AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJX3ZNQBQkTYecHAAoJENFdMTiC
-AEFzV0kP/3qNPGkGvHAq4fwTI9Bvp/OFrALKfsYMeAnYpo86+P5RCwS8kr2YAr/s
-nPCIWRmnD8xjUVGZPKw2LBX7PliR901NH+JK9MbkLS0+pyYFbg0o+mRchlcnqNbz
-jrAlttYNY7BLxFPti4+aXFljdwnS4onKCdu/vfaswPOrXuNcO6iS3LPbANEzbyRz
-0FUx/e7T2coSDY49ys4pobYjeXoclz689EyfRkihHjK8zXBxWyQcE/5M6iDa9r2I
-w/uYdi+sTJTLUm04ysTkx48DC0uw1fa17TG5oREw4+WGNrzHGrtq+iuZPwTRg+Gv
-ispiDRJAUjFUG1VrGN5joCW5yGpgwgrsyjMa1fC5amfxI3SU/vO7xD2ln8C1Ky8W
-MIE9bi2fBZ/yQz6CfoswOUCoXZ4zFg7nPRNIzgmf0O2P+vyT4j9joBeaqR10nr7N
-r8fhDfqLsGmZSNoQvS+CewGfvBWTSA0EbpgXaLcQPnPeIrEQpRLiBjPWVHwFlyAB
-OtCWoKZANMW5udUilU2NOSJQNf9+m33pduly8g5Ii6eWdNbguKFuUlz0r4wTgtPC
-WHBAukYZte5vzeJMG2s37FIIc9N55DFYQ13l4hLmeuSKax2DEz2e/OkywhQBOZdM
-Z8Xf0jcrF8eYrY0bZHUpu3f9jhxaUvXbWhvc3kSh4k12zdpPkX9ZtBtSdXNzIEFs
-bGJlcnkgPHJyYUBjcGFuLm9yZz6JAj0EEwEIACcFAlgRjnYCGwMFCRNh5wcFCwkI
-BwMFFQoJCAsFFgIDAQACHgECF4AACgkQ0V0xOIIAQXMX9BAAgs5C0IWOMQ8mympm
-q7SOzhvK8eUAEtwqu8wCMv851NEcSlKm/eHzzRJxmwQZluP+5O6+DNIjE0K+soRs
-uLGPmQJjg3eDHyPNqTi9MJyl4EbLZSanccamy3qLF38xYU8Ptl97Uo0TAqcrasQU
-Af6UJT3X/kVk6V+sucNF448KGmjb+GGKQrOJu5jeHaBc3HkMO5IO3iohtksWoPz/
-DvMRHqzWIzoc4zo5ZEE5sfuOjqKcSthY2vGnFYsBMYj+cPXMmmVTz1hhpoG/zyWz
-3gm93kc3bVPVTED//cuua9DHxDXAGOq41j380JzWpbisPzlljzUZtXOn2pHLVci9
-L/2SWeW9HUARNc8wLVONbLvVzSyHGT1YiYppvkYZatyEY2zByd8UwHqRvHlN5VVC
-LZTrpREHq/3AtBLQNXQR5vTMreK+TuUGjZVbtDIB0oHKxzSPb0ITOSd/Ukfly47d
-Q6VEkmDEy0lWF68fG7NV5rzsX7H49/iK6DqeEr0PksA5Kn4lMleNA9rPrlmdjg+W
-XjUJkzunY5nfr/yZyTQvwFvrC28IpGbsVmiG1bOUixirfBagkZ8KjJvsyQdUa3Yi
-D023ZIQ1gNSRL6Pau/ls+cMXOWaMyL1ddemcqw4IUF/fYy8VtwrVB0ZSe8+OoUby
-g+TZy382SJ2MUvJI6oSJdQWnova5Ag0ESh9K6gEQALZuDF62F028dT9/ChFHuJN+
-vH7Qwb4PQG960gXxe9n7FQ4nfVuBR953ismuJlckDN5RJ6gu0iXDAi5lXxEswynk
-+YGz8MeIfWRFuNcOzHEFa2Z6XFbVk3+LVVPVHTvx2CD8t/4ZjeSJgDp4UWb6+jVP
-tHbUPaC9hKsZ1SKbORJA/eXyReLwDPKlCuyxu+EbMqLOOCl082NOjzItu1WlKhli
-ky4eSJxXZ3ad8C/BroxMj+3+QsMso/zafmpRFeGLc/7t8Sa+uUve7+k5gfubclHN
-G9J1paGLHGVKiKuP6x3qjDqV8LTzjlclbPG0nUfAqRtLPbPR5AeqViY1JBHv+Xub
-/3bSWUtMOan97QdkfeakWmIbmVEgW0n43gnklHIqJX69cUgF0HZdVKiJpyMl3rQF
-2NbYDMzzzzVjZ0lOqMukDh+Asl5W46ayM9MDldn6rQZYizTjvY5Qpv9N5bWbJxI3
-dnr2YszCpeCvgNS7feCg9YIga5JSnMX4Knn3Mk6JritKKm9m252jKroJpwJFYTjx
-6w8q126UaNr0iH+6/ZcVYq1eXP3CrDDphy7d19C4foWib0KnjQg9z9VMbVD3mb1r
-v4Pq7tN8mFGgGt3MQIrmxigbCwgErniLOx8J7i/gozFyYhAOkM8zqBgIQCaWYei/
-SkYhr+eKMu75VWnJPrsHABEBAAGJAiUEGAEIAA8CGwwFAlfdk2IFCRNh4vgACgkQ
-0V0xOIIAQXOcww/9Ee8qSiXONyHWROBw/rMG+hPuj/uhgMmE1Ekia8yI744iMQ63
-L/wIjOte6FZ+aLhQ4kohXqj4HkgX1PKVVQzF2oSEn2V8GgiTP+UJ/NN/BRKNn/U1
-aO2dtHnvYEWMSclKxSsd1z+dwS9EIFMkto/JVQyUOXZnd8vir7KMorjxYk1dAe0b
-sL+DGPQV+6zKFtotrBaCBmrbj+r5iE9XsbnvFQN2o1NwQc3S9+OhO8Fwsm2yCSGC
-EDOxnbGpnMv5GvWmEX1hp01UZRauTJawsNKjZXKAESIpJtvK9oRyfKWuwhJHnAv6
-F2Vag96sIsCrCr/kpEgR2m/csaHxaqmfPMr9IEd17IGE3Q9kJUbTnDbRWiNj7Vy5
-2T+T8e/ptY6LCdA6ypxOMH2i2+p6yc5jk1WI3x3UaxsiXw0g9wI3z9DKy4pplbLE
-8LyvCJCWbmRMAb+pOodhJpVbep4qtWSxsYC7bCZShjXuIdjHDtGPChxfAn0XWeMC
-NXnUVvBZheDBvwrQS/Ura0KuggeDNgF5keHXJ9CNdUYN2mYhVbpxL/2OeIopcfvW
-ElLLQL5q6pMXZveqexu0xXsck3QeC3emRDhQt3afmHVJNcUi14tQ1PRl5y6G+yP8
-UhjApWTgXIznjWH1gIU9QczZYBLWyZP90YHwUaWYeL6zhEwufD3WzAlsuRO5AQ0E
-TJP4JAEIAMAX+3WIpAzDwNrBrP4ZKvVnxWHznj4AdnDjnDBaOlovWUUQThWqgNdz
-pngcM8almlJd/kp6gWNHQ/lI4Pro1Y+XwJQiNjt/IMAVc1zWf7/eUdztW3+4i7ZM
-MEYDrgiXTPWvijKFOOzl2NmntBShaJPtQXItamem8h5KyCD4yt8w3khLGTpcVEUp
-KGkHa/9uanCXiGWdXnCms37ejy5rk2l46g18pj7dAHbJfEMqSJkjS2uHvNPZdVRq
-GuiAopdozf1FVMA0pkuiKRI/7je7z825Q1xRkE8jRUBdPjZ3/I6wdq2w/vB1LBr3
-wV6listhedbXhwmND98bCSs5juoS9q0AEQEAAYkDWwQYAQgAJgIbAhYhBOeENk6N
-3nuzcPvZ6tFdMTiCAEFzBQJarZuVBQkP+tbxASnAXSAEGQEIAAYFAkyT+CQACgkQ
-fYAxXFc23nUqAQgAv9KrkxT53DPqHklBDsiA355Z/xl789bd2oUEFFskAeyXGoIi
-tds2S6iTbCTBizzTu8l1Vo41U9AIuHGNjvUHRwrFlAb8aaXiRAia/IJeBvI9kuWu
-ArX5y63Qt/TN1dJVXVm72s2LqbYWSeAYSwD0lbJ+nfeH9ALT/celYk7ZCSiQB0g8
-dRFJBNsBVkRTnM7RScULr3Q9RXHrJK9dcPCbfQjCuAxhI9d93F1iSn3J/+V3rgZR
-XZUdItUuWixwwi0FEz+gYj/POaZ4GtTbGpF9D1lR1OzWNbbDE0slsFPBdEL/qNV0
-LD/XfRdZh2cEWzfx5YoOzP+eD8SYC90hHkL2kwkQ0V0xOIIAQXNhzQ/9HklMn5DX
-MJQUCBgFlc7sOwv3XHfMamUOA+cpCSO74HxnvXPDZLfdaYdJuWkm3vO3Z2BvkopI
-pHZiaJSoIoBZdQNWSlsnqLAYDZVQYjjV3WvSOh3NcsPOaOo6bJkGUVn8KFsc16uN
-xhptPEQ0fiOIciv0rbasVccVWUySML1gOPb5eeCwpl2pf1/mn5n9aU8bOu7tjkFG
-9BVZqu0yDwwo+e/rF3/THp3Bqr6wx4bUbGPSqaUKeb5ZGz39hrdgrUQMHOeed/DJ
-iPhNe2SI1KjJ+AK2UphzrasWbERveGGy7jojtf79QQ12RDWInk8HtQHpKUoGGa/N
-kk3CZ+Bnn8QW1dlHFzI2T99ZOuxkPjZaBOgbDr+SgasWHl8Rv2fKjpSeR8FwNr4m
-9T84jvG+U3RfMwNkrEU31rlPEPSl2R/6CC+YctqXFSmDSjrktQAeeiEPLWr8I3Q2
-Pjdr/GFLwwoFUbmdh80bdMogkrDA3Nt9xxIIjjqwXFMRmN+wZF2NrREyogP8Zqgf
-bniMC3pS1nkj2XB3ljYbyClagLO3SGoY+n+U6QxVEkM9aYjfwYKssGgPtdVA1amM
-DXxhVUL4QlndETnaLY9LEPf+SNWew1MJ6H35Oh2AKU9rlTP8NQ0iPkc2HH9nimkO
-CcB+Qe3zuHD4+pGEhQ0WklUBPEJ1qTg6WFM=
-=5bZl
+tB5SdXNzIEFsbGJlcnkgPGVhZ2xlQGV5cmllLm9yZz6JAlcEEwEIAEECGwMFCwkI
+BwMFFQoJCAsFFgIDAQACHgECF4ACGQEWIQTnhDZOjd57s3D72erRXTE4ggBBcwUC
+W6BpnAUJFyS9agAKCRDRXTE4ggBBc4PgEACa9sft6EPV/f43Xl304pBeDEIbWWYs
+gWaJ2A/zT/1WGP/Jvtd/pQ9ShjII42tX+aKoEFdTBN/QHArmYArM+9Rcy8+iL+h+
+uGfSbB0X6PdGjtjuzQWjrzDUf2g8KsP09jl86kWUH9XpReOifL+KntkjRreif/dY
+ALOcUYfbwWBlugCwZC7ZjIrlUqk/X7l1AY+XhVqkVWKcObRTzfjulgYLsO51COre
+SkoRST5tsI1VenoLmAOb154YwEmLVHCBF41kWP38ezYJGx7CvAdM3bQM/jzlleGS
+IXZnCKt/Fratv4E7xNPDX/DCyRGpItqPjyYB7KN5YrIe3xLzJ0f+2hkdCqYHok+k
+HHXoV6Ms7IsM0j2vo1bHqm6UIw8VwhWiSLZkYOmk4P4eWbgiBm7EnjEalySVRftQ
+re5Hz5gK1oVZgI48mJ6ZKR93+YsyNNLY21ngwCpcfeg51H0qp+Q9ScNGMQ5iH0gA
+TIDHtpn2Dl0i7k79l0TjWAeezWXsvYZeXy4k7NlFul9N0Rs7eLcoZdKKeZ3JvWH2
+lqXFo0C+pqTyjYKwsxNK0mRwOUN3LI6S9oFe6vQKWx8M1m/I3GCVXdjnz0fihP3n
+re9aNijOT9UCl+larNiKxktkU4dRLRbERsHN6goK/k7t4ozOUFBPj1DgIrv+eotP
+nVPdQAnei0Z4TbQfUnVzcyBBbGxiZXJ5IDxycmFAc3RhbmZvcmQuZWR1PokCNgQw
+AQgAIBYhBOeENk6N3nuzcPvZ6tFdMTiCAEFzBQJdkQ2HAh0gAAoJENFdMTiCAEFz
+IY8P/RVKZH2Vhky7gY1cUUb47ujTO3pS7ytjUIyy3S41/yVRE2TwiWlFj1bSfRzX
+AKWdOdQ/b5NWQIoEF+M9wofQ/01OPa4izalkjClzD/fKZXUr5QaRMELgcheQjAgm
+rFFrA8Q99iYwPHKCO5lKy5UOFQJRFA42DAD/n4zC91xQetxWLQl+nLncOmSH2Ds7
+H1ZVPQWcbgHVS74zfkcHrg6uluRRxGCEiF2m2CdKdE0S/5vziMFE6yDCs6+LL/hy
+CRs4DfOf94fcX4e7Ess8x7/jTAZpR68A2rzY8H1qVsZaJYt+SGCc/o3l9gFNQKsV
+rYLPdQTypo0PgsxoRbjYp4MXqgAqu8s1by2v4cnli6IOqEjDqw+0CQ2YWPdhDKxC
+Ofs2Wa1bpEUo1bXIIfSBmb47aiaFrmc07Wuj4SBvNiWr249YXgiLNKXnz/Z/3jvD
+cJ6cFGxaZcpDo9CDdeYqS9/URBFS/16hoZmtyZ0OMWoDnwMWVna+PO9dQApxkaKj
+lqzBWelSUcWLVB1/VmD/Ty6o+HqDIyUeoYMIdoN0hgxCJkcUJxf+TUDyNeSxJ+vy
+8QvaG4H0JYazEHzHkXLVhgJTYqchUOGZFCb9gbQjY2Tm9v+tiZtAXDOzx76Loyyn
+PscWm5cdgfFZrtWJXMBDgNVReaHFyWnE48ekjnwuaYXPqn5MtB1SdXNzIEFsbGJl
+cnkgPHJyYUBkZWJpYW4ub3JnPokCVAQTAQgAPgIbAwULCQgHAwUVCgkICwUWAgMB
+AAIeAQIXgBYhBOeENk6N3nuzcPvZ6tFdMTiCAEFzBQJboGmpBQkXJL1qAAoJENFd
+MTiCAEFzdVYQAKv0yWSmWMc7ayZdg9pa6mFqjWCrNvUUggWaEZbplcnPuLNhONMl
+W3hFgYw0qNYpBR5OlPDaZlfJaIl1ne1wtWek4SrvG4XyRmPJtpB4xiUi/rpmh18P
+ufK+fNAPSixuwsSeMuaaSYqDmQE/bSIE3lUjYCqfh466z7IT/HeFUSJDOam13VTm
+wx7p1r2MPvnXYe6laOUS1p+ivRlFSIPhaj+H3Dy6GRoCbHlVkOjOw1I9kJ7kM8jU
+Ki5Ppwg74VuvXFxKXQHWliydXkYRJxs5ZaErkAPha0SZpHNeHOk30RsG2uJYoHW4
+jrtfyJvcPMZO8P207iZe6lh2i0ZnrpQWph3iMH3m9iEhx5L1BKbWgyvL51r/i3h1
+8xCEVXi8SvxWaY/2i+EthKiFHvfftzqnjyfPnMEBz0zlY93kIN5+hSYm4o/RVLzk
+G6zE/IErweyx+tktw/ztkuivPl6ZGcs11YkH7erfsaSUZBV4ulx6x7C2/doWdUUF
+QOaPs8BPSNdOw2rvIBsTrwpj8NlV9tTGZykLx7nGkNo7kEdhdtJxVFQSQZulMKIY
+oJnFqxkFRgRbQAOT8XQE4en3EH015tgNgSxNbTdezxeiUnCjU3JfAMx8GujpsBR/
+QW0kE3tfx7qeqUAdCkcWVL23MEvHApO7PGFhNBN+Q9VWFU+uYS6lAnK9tCpSdXNz
+IEFsbGJlcnkgPGVhZ2xlQHdpbmRsb3JkLnN0YW5mb3JkLmVkdT6JAkEEMAEIACsF
+AlPu130kHSBTeXN0ZW0gYW5kIGFkZHJlc3Mgbm8gbG9uZ2VyIGV4aXN0AAoJENFd
+MTiCAEFz6+cP/0LpJNgtaFQTc6EASrZJepp0qR4jSEj0rAxwuQtKiFPRM0t9mBrG
+RLCwWDGssGpUmH5s2xbrg+f80gMPL85CFO2NzRdAX9vak+J53Di6dn4f1MrAQouQ
+Pt/53R8txN6cyerp3Fyk66j8KVLZSu17crpLxJ7GHTN8UPjHHhmjEFxSI7VifM9/
+9RlKeGY1Tj6+fn8SKRPDJwEE2HwoSDhmmvFbqDJQe/fk7TaaG/G6F+iTASFsiqdw
+K5ffDT1Yi18K3eaCHcuIbgXb0qXHH7hYxIgXQuAOL6t6LQmRz5HCupCjUBx9W25A
+JLTogenj2hgNbBe8LDbbELI5Foxn4Dhb+6dpepvCEAfUirxYiKHcRsZB0E8D6qOb
+QUgXmUZ45Z43jJf9Wk8LPVxnN6Lny3DVrGgE5r7sr/QyzDjRuDQgRsa9uXpv7rX2
+KYKpyZStvgA5SM+XdYTyaIlDgGiTIVjNWkb+3LAzrHXV8CvDSn7FCuvpOax+z1+c
+JXnFFDFOrHN/tC/8w2U29L+fmJRCeJhj7MKjT/IobkdyuS2juBDgr7QDmsHcI07E
+lbZGp4zjKnZYx42hkgVyjJBIcUdU3UGazTsnmF9t7Ek8JrZNannRu1KC6rgOc8tP
+/FsVJmllgnr57CXazF++kLy7qwqgw2T9EA89WMtkakKLyMoit86CE40TtCJSdXNz
+IEFsbGJlcnkgPHJyYUBjcy5zdGFuZm9yZC5lZHU+iQJUBBMBCAA+AhsDBQsJCAcD
+BRUKCQgLBRYCAwEAAh4BAheAFiEE54Q2To3ee7Nw+9nq0V0xOIIAQXMFAlugaakF
+CRckvWoACgkQ0V0xOIIAQXNpMg/+Ip3k49/qiBBb/NKn2bWAAQWJe0WLpkVP3LVU
+FhTSx3Pvwh0EF/ZeJWTCFAG9YnO+qXLFmf9mBsu3Y42hkRBZOMZmHrFtSDofS6ZA
+OBg6rS6QEIqGvXr9y8ObGwsQqJ4pEFXK4CE5Z9Og6H7MLH8H8/0/56Iox00gyGX3
+rdsa3FxRvJmWgON4CpdiJlvc5i+C2HITYJnmu1lBy/ag+Xcvmrqu93YbW55Ovooi
+Kktf3m4VIgutB5DAYqHvR3yYtCojMerJdL1SZ1n7SOC60xIH6WRqEN32EtHfPJXo
+S/bmhYLU5rEruu19Dcvjw7f99Y1mmbc7b5KDXIJrsmqxwGw00hBEnjE4T+4ln0m8
+MDl5ORubyKkJAPogY+iTMnI9tXwFr2xvml87tDl4oQJrx+cuGVVK1TSPrRSrcXzB
+qYYrOzgK69taIZfEtLTIhxUdwn8rBsT1Aa19QCpDxoCcpRO/M9DeNQO7Yrfv/C94
+6MtZfxXMIlSrcmLiT2wLFBadNhjNzvBpHVVGU87LYkqek/nRfDq5Z0ElnyepQz9K
+oP5qPMFzmJsAl70dHQzxzx2JWilc5Fp0QUluPWtieg1KykChMm3ra19KCFpjeoRZ
+0NFQzRgRY+9+dkvzGv7toweu7wEOmGML610ZlzI+iHZly9X07noEJF6tT18Yfnuo
+FiA0J7W0G1J1c3MgQWxsYmVyeSA8cnJhQGNwYW4ub3JnPokCVAQTAQgAPgIbAwUL
+CQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBOeENk6N3nuzcPvZ6tFdMTiCAEFzBQJb
+oGmpBQkXJL1qAAoJENFdMTiCAEFzZ5sP/2gFgnVD/4vtjP88KfWHBs/URJVVeC5x
+MENfQCyxe5+b1AEz9Re7C2LaLZB4SwbnSk/VWayFsTwYo4ouFuGQn504zupZVwe4
+ZLvwZWArkwHkRp3pX/AF89cje75gZ+xE2uoZL+FLbVlEDP0SemwYypDHUkahfR8p
+cKiX0os2FQ4DFdIy3/7cCJyZQzrSk/0LamasEFcsCLjqNMGkU1/oOEhoVFqX3aPn
+GLtZPpBbgcOAJD26OGPn3x4w4zhRN8me02FVG+JNNbVpMVFkqRlyGwMT/w3zPq4h
+ddlfygiFbjWtkbIM2vxlcZJTpppOAUmXrNWo5OgQiFTFmMa7XIi/ISQW7KNcVbOP
+Q8PqKtGf90LEHFnrU9S2n176Y0csFQx4bp1YjXVXD0+JeTeb3haGCoN3BWj41kvi
+0NdyeffL7UNwqpgzYSEcjovgtTroC+2IKKZUgtOkWWf83Ht4fbE5RdOGxmKbvRzP
+0+cryvil82t3PIPtG5mvGmQIzulNwSU0DpFpkbVbmU/kP2anGdlvoK+3uroOCAFC
+lg/hQdrRbtvK8xU6TyhGjxjTdYRGtHzq8Yp3RUNHhPy1muVXVjJs0IF/wEevuHzp
+6oRGYbIpo8T9sXevcQx9GEzQ5nfaS6FEFjMCsA7tAL2LF2IhjkwnK6Mi52pW5zfQ
+GLcTsDXa/glptBtSdXNzIEFsbGJlcnkgPHJyYUBsc3N0Lm9yZz6JAlQEEwEIAD4W
+IQTnhDZOjd57s3D72erRXTE4ggBBcwUCXjC5dwIbAwUJFyS9agULCQgHAwUVCgkI
+CwUWAgMBAAIeAQIXgAAKCRDRXTE4ggBBc6iMD/9zeq3JzPlIUIuyyB2QSq9GIVnO
+kAXEh91a74OeC2+AWl/t/1HlvIh5fq5gYnB0ccoKnxlNZFmJgpz9AvUcSmoV+huG
+AB+wbf3zF9GqJvFyuY/9igm87ZE+XOtcnLlX9zpx9hUb78YA4qGk9KrMr6MIyXW8
+/Vpi6GX+7Z03j1WpxU3mcvG0tbE1udHppuOQIej5kE3zTmSUbr1t7Ejhc5VA3Qv9
+973PqSUWudl/BAkYC6JMFAsUL6wO6b2aiiRsAZM0KiSILK7BZM4ZnQf3VRFh6XVa
+43vxhwyNxepzl4H5y0PoubAJFGe1ApWtFrTBbjfl00r6o3AkNpbLNYUZxuRUsfGM
+IzTXvU/POBQ0J0jssxU0soOmVe5qVnGVWyaqgeoBlJVBOewRUZ/PfkxggXZnoSss
+pmQzRe5ZjPxCQRCyDDdo/xe5AIElmY6FdHHnBS3HEEQLXx9T1bOIEpDaddit+5l7
+DjAf4VDS2AaY/Fw8Fs39e/IsIHBno54SlIoyGdEguDlEGoN1ohCa1ShuRt/+hNnm
+ZZ2iSWmS3duMu+2f07rhMuR2P4HyG3sJ8JqZXIzefe39bYKEcDlSWoLmuf0BGCdl
+bc+SQsYXMz90+UuJI7pwnaREkmQyWjKKEzTOMNn+3N4eTBey9m67agyvOvoJu70Q
+rzxW4qKraJvjYCFUq7kCDQRKH0rqARAAtm4MXrYXTbx1P38KEUe4k368ftDBvg9A
+b3rSBfF72fsVDid9W4FH3neKya4mVyQM3lEnqC7SJcMCLmVfESzDKeT5gbPwx4h9
+ZEW41w7McQVrZnpcVtWTf4tVU9UdO/HYIPy3/hmN5ImAOnhRZvr6NU+0dtQ9oL2E
+qxnVIps5EkD95fJF4vAM8qUK7LG74Rsyos44KXTzY06PMi27VaUqGWKTLh5InFdn
+dp3wL8GujEyP7f5Cwyyj/Np+alEV4Ytz/u3xJr65S97v6TmB+5tyUc0b0nWloYsc
+ZUqIq4/rHeqMOpXwtPOOVyVs8bSdR8CpG0s9s9HkB6pWJjUkEe/5e5v/dtJZS0w5
+qf3tB2R95qRaYhuZUSBbSfjeCeSUciolfr1xSAXQdl1UqImnIyXetAXY1tgMzPPP
+NWNnSU6oy6QOH4CyXlbjprIz0wOV2fqtBliLNOO9jlCm/03ltZsnEjd2evZizMKl
+4K+A1Lt94KD1giBrklKcxfgqefcyTomuK0oqb2bbnaMqugmnAkVhOPHrDyrXbpRo
+2vSIf7r9lxVirV5c/cKsMOmHLt3X0Lh+haJvQqeNCD3P1UxtUPeZvWu/g+ru03yY
+UaAa3cxAiubGKBsLCASueIs7HwnuL+CjMXJiEA6QzzOoGAhAJpZh6L9KRiGv54oy
+7vlVack+uwcAEQEAAYkCPAQYAQgAJgIbDBYhBOeENk6N3nuzcPvZ6tFdMTiCAEFz
+BQJboGn5BQkXJLmPAAoJENFdMTiCAEFz/88QAKhytANe2ek9b3BbgGqhhZdLxcOk
++H8XdRNXbDtWc11d5sQ+XgFcc2zXRC63ODkW5lZxsHZDoW+qN0Uq1nILuG7BUjQf
+CI7G7HGVDgc7jvEv98n6mGD0LaGEFVJbLbC3ahmrJOjBxNY9Qej0MLGmWYbuRzQJ
+gj9L99iu30vgWxKxYykbJ81A5+HaatRKalMXoTKx71+BpgY+IeoJGb4oQDJW7vNk
+TQcUatyQz78jPY1GvOI4GJKpL9nRxGDrnphE9jYGBqSqHT2X6BuXUEwlbfdAEPjr
+q9KiHvKeXGeNH3TX7bgdoIcGmhUdtZUQ7L0/SH7NAQerhoMwLdDzRaS7UPFYsrD3
+a1yBNgw4MbnrGRO+4JJcGn9l3k2R1xwLusiPJkZQNSN2OGVZhQnOIFPDMB3puFsE
+XUUI/xqMlQdwhrY1jliswo87Zc0v/Bs8kttDhwJ7zMpVFQevwG5wN3l+SobL2cNf
+sBUFfQLXS3rU7hxpbhtQqwJUfzP8gzTbFq3yGhnBBWPeGa9Jn3pbwXfr4HLZw3+k
+m3G3zyPe/EZ3S1pAPpt9MfbRphJ2PsR3XSXCgoI30j/1mtoeC/wGQp06wz2+f596
+ExDpFUknwbZljqyJEQA9i1q0BhhZOm1ZS4rafyrJY6udjLlzMnepecRj0hWbKa7a
+VGpOkmUES8W7e4pYuQENBEyT+CQBCADAF/t1iKQMw8Dawaz+GSr1Z8Vh854+AHZw
+45wwWjpaL1lFEE4VqoDXc6Z4HDPGpZpSXf5KeoFjR0P5SOD66NWPl8CUIjY7fyDA
+FXNc1n+/3lHc7Vt/uIu2TDBGA64Il0z1r4oyhTjs5djZp7QUoWiT7UFyLWpnpvIe
+Ssgg+MrfMN5ISxk6XFRFKShpB2v/bmpwl4hlnV5wprN+3o8ua5NpeOoNfKY+3QB2
+yXxDKkiZI0trh7zT2XVUahrogKKXaM39RVTANKZLoikSP+43u8/NuUNcUZBPI0VA
+XT42d/yOsHatsP7wdSwa98FepYrLYXnW14cJjQ/fGwkrOY7qEvatABEBAAGJA1sE
+GAEIACYCGwIWIQTnhDZOjd57s3D72erRXTE4ggBBcwUCXoEPJAUJE85KgAEpwF0g
+BBkBCAAGBQJMk/gkAAoJEH2AMVxXNt51KgEIAL/Sq5MU+dwz6h5JQQ7IgN+eWf8Z
+e/PW3dqFBBRbJAHslxqCIrXbNkuok2wkwYs807vJdVaONVPQCLhxjY71B0cKxZQG
+/Gml4kQImvyCXgbyPZLlrgK1+cut0Lf0zdXSVV1Zu9rNi6m2FkngGEsA9JWyfp33
+h/QC0/3HpWJO2QkokAdIPHURSQTbAVZEU5zO0UnFC690PUVx6ySvXXDwm30IwrgM
+YSPXfdxdYkp9yf/ld64GUV2VHSLVLloscMItBRM/oGI/zzmmeBrU2xqRfQ9ZUdTs
+1jW2wxNLJbBTwXRC/6jVdCw/130XWYdnBFs38eWKDsz/ng/EmAvdIR5C9pMJENFd
+MTiCAEFzGeEP/iT3g9zl6z3uEuQOzp/nG4vAb0ySI+qjCB4Yt1XS9XKuAeWF2GfQ
+1kHamZvqVKuUqiO1Fx8nVrCTHfUAeHsWg1NA3O+PURSIplgE9xiSomSRz2VvQ5yp
+l2lpRqiXUt9yt2xI5RlXy0WCShhFJ2Gxy0+FFgvaF1rge/jOd7PtCjrV3bmLImLo
+eks4wfcxWZykoa7MDgK/vn64/b2nx+XhsRloCZX34LYvalPRV9e9nq03DWXt/hU0
+0dhJSzGTogZhdpDWgEgdwluW6NRixWI2yWq1b8qdBtwX2Uz7MiLoOX3+x09SPwrc
+zUP1Qzm5HZjhZ3wEqFSexUQ5CcY7vvEotQK86jlRgW+BltKHGY2OFzTUjNV28YCH
+pyKuo7BSW2DBKsT1VrzxpT6z7Pa3app8mD3eC6nC0Sv+xxdKjL6vfGQblAjIenwN
+yG1IfMiVaFEEQvmlhC/Imq5AubegpoBWGzoIDsJTaHgYsPK5UcE0TlHI3TK09dTU
+d45yn3KQ9hCN5OAZbUj0V7ah97tIeJwX/zYHLdXdZLJyrHwSMk7VjxnFR94CIK4H
+RVJky+XAJCUHxqEcfEsVrJhTOnMTYlPRP0ICnd62XUezPkEbD2b1hX6nJZsXo9yA
+aJHblv92GiE8pZW3HR7jRlZjxi5AhQac7MkmLU/H9zUP1gkowB24VO7E
+=WK2E
 -----END PGP PUBLIC KEY BLOCK-----
index 2df53054bf6760d765a7c2b5564b976df67c9dc8..f0eae8bd7b4896b26e06ca4eae31caa08e955401 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+.    if \nF \{\
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.    if !\nF==2 \{\
-.        nr % 0
-.        nr F 2
+.        if !\nF==2 \{\
+.            nr % 0
+.            nr F 2
+.        \}
 .    \}
 .\}
+.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "KRB5-STRENGTH 5"
-.TH KRB5-STRENGTH 5 "2016-12-25" "3.1" "krb5-strength"
+.TH KRB5-STRENGTH 5 "2020-05-17" "3.2" "krb5-strength"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -250,7 +254,7 @@ you may have to omit \f(CW\*(C`policy_libraries\*(C'\fR in your configuration an
 pass the \f(CW\*(C`\-\-check\-library argument\*(C'\fR to \fBkpasswdd\fR specifying the library
 to load.
 .PP
-If you want to also enable history checking, see \fIheimdal\-history\fR\|(1) for
+If you want to also enable history checking, see \fBheimdal\-history\fR\|(1) for
 further instructions.
 .SS "\s-1MIT\s0 Kerberos"
 .IX Subsection "MIT Kerberos"
@@ -457,14 +461,16 @@ Russ Allbery <eagle@eyrie.org>
 .IX Header "COPYRIGHT AND LICENSE"
 Copyright 2016 Russ Allbery <eagle@eyrie.org>
 .PP
-Copyright 2006, 2007, 2009, 2010, 2012, 2013, 2014 The Board of Trustees
-of the Leland Stanford Junior University
+Copyright 2006\-2007, 2009\-2010, 2012\-2014 The Board of Trustees of the
+Leland Stanford Junior University
 .PP
 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.
+.PP
+SPDX-License-Identifier: \s-1FSFAP\s0
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fIcracklib\-format\fR\|(8), \fIcracklib\-packer\fR\|(8), \fIheimdal\-strength\fR\|(1),
-\&\fIkrb5\-strength\-wordlist\fR\|(1)
+\&\fBcracklib\-format\fR\|(8), \fBcracklib\-packer\fR\|(8), \fBheimdal\-strength\fR\|(1),
+\&\fBkrb5\-strength\-wordlist\fR\|(1)
index 0db76e858ba731d81e1cae713a3a93cb28a1515a..597378d67e0fce2d8b38c25a012a6e53ab1a2098 100644 (file)
@@ -2,6 +2,7 @@
 Allbery CDB CrackLib Heimdal KDC KDCs canonicalization cracklib-format
 cracklib-packer heimdal-strength heimdal-history kadmind kpasswd kpasswdd
 krb5-strength mkdict pwqual cracklib-runtime krb5-strength-wordlist
+SPDX-License-Identifier FSFAP
 
 =head1 NAME
 
@@ -315,14 +316,16 @@ Russ Allbery <eagle@eyrie.org>
 
 Copyright 2016 Russ Allbery <eagle@eyrie.org>
 
-Copyright 2006, 2007, 2009, 2010, 2012, 2013, 2014 The Board of Trustees
-of the Leland Stanford Junior University
+Copyright 2006-2007, 2009-2010, 2012-2014 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.
 
+SPDX-License-Identifier: FSFAP
+
 =head1 SEE ALSO
 
 L<cracklib-format(8)>, L<cracklib-packer(8)>, L<heimdal-strength(1)>,
index 38afd2a506fd17d5ae6229340a40b64ee5bab96c..2081c59873237903f2b826965b11a277f00b3a30 100644 (file)
@@ -2,13 +2,15 @@ By default, the Heimdal external password check function is installed as
 `/usr/local/bin/heimdal-strength`, and the plugin is installed as
 `/usr/local/lib/krb5/plugins/pwqual/strength.so`.  You can change these
 paths with the `--prefix`, `--libdir`, and `--bindir` options to
-configure.
+`configure`.
 
 By default, the embedded version of CrackLib will be used.  To build with
-the system version of CrackLib, pass `--with-cracklib` to configure.  You
-can optionally add a directory, giving the root directory where CrackLib
-was installed, or separately set the include and library path with
-`--with-cracklib-include` and `--with-cracklib-lib`.
+the system version of CrackLib, pass `--with-cracklib` to `configure`.
+You can optionally add a directory, giving the root directory where
+CrackLib was installed, or separately set the include and library path
+with `--with-cracklib-include` and `--with-cracklib-lib`.  You can also
+build without any CrackLib support by passing `--without-cracklib` to
+`configure`.
 
 krb5-strength will automatically build with TinyCDB if it is found.  To
 specify the installation path of TinyCDB, use `--with-tinycdb`.  You can
diff --git a/docs/metadata/debian/summary b/docs/metadata/debian/summary
new file mode 100644 (file)
index 0000000..2666562
--- /dev/null
@@ -0,0 +1 @@
+A Debian package is included in Debian 8.0 (jessie) and later releases.
index 59368fcdb735b50a0fa109079e57c736600049bd..ceac856b35c23c0a8eb133246e83c71cf7215608 100644 (file)
@@ -1,12 +1,12 @@
 {
     "name": "krb5-strength",
-    "version": "3.1",
+    "version": "3.2",
     "synopsis": "Kerberos password strength checking plugin",
     "maintainer": "Russ Allbery <eagle@eyrie.org>",
     "copyrights": [
         {
             "holder": "Russ Allbery <eagle@eyrie.org>",
-            "years": "2016",
+            "years": "2016, 2020",
         },
         {
             "holder": "The Board of Trustees of the Leland Stanford Junior University",
     ],
     "license": "Expat",
     "build": {
-        "lancaster": true,
-        "autotools": true,
-        "automake": "1.11",
         "autoconf": "2.64",
-        "type": "Autoconf",
-        "reduced_depends": true,
+        "automake": "1.11",
+        "autotools": true,
         "kerberos": true,
+        "lancaster": true,
+        "reduced_depends": true,
+        "type": "Autoconf",
+        "valgrind": true,
     },
     "support": {
         "email": "eagle@eyrie.org",
     "vcs": {
         "type": "Git",
         "url": "https://git.eyrie.org/git/kerberos/krb5-strength.git",
-        "browse": "https://git.eyrie.org/?p=devel/krb5-strength.git",
+        "browse": "https://git.eyrie.org/?p=kerberos/krb5-strength.git",
         "github": "rra/krb5-strength",
         "openhub": "https://www.openhub.net/p/krb5-strength",
+        "status": {
+            "workflow": "build",
+        },
     },
     "distribution": {
         "section": "kerberos",
         "tarname": "krb5-strength",
         "version": "krb5-strength",
     },
+    "packaging": {
+        "debian": "krb5-strength",
+    },
     "docs": {
         "user": [
             {
@@ -59,7 +66,7 @@
                 "title": "krb5-strength plugin",
             },
             {
-                "name": "krb5-strength-wordlist",
+                "name": "wordlist",
                 "title": "krb5-strength-wordlist",
             },
         ],
index 3db0d1f531473872b70749ba3662e043cc49cf52..b4e238e0f14617fc43a0c879ea1ecd5b87c188be 100644 (file)
@@ -1,7 +1,7 @@
 For Heimdal, you may use either the external password quality check tool,
 installed as heimdal-strength, or the plugin as you choose.  It has been
 tested with Heimdal 1.2.1 and later, but has not recently been tested with
-versions prior to 1.5.
+versions prior to 7.0.
 
 For MIT Kerberos, version 1.9 or higher is required for the password
 quality plugin interface.  MIT Kerberos does not support an external
@@ -34,7 +34,7 @@ distribution); the database format is compatible.
 For building a CDB or SQLite dictionary, use the provided
 `krb5-strength-wordlist` program.  For CDB dictionries, the `cdb` utility
 must be on your `PATH`.  For SQLite, the DBI and DBD::SQLite Perl modules
-are required.  `krb5-strength-wordlist` requires Perl 5.006 or later.
+are required.  `krb5-strength-wordlist` requires Perl 5.010 or later.
 
 For a word list to use as source for the dictionary, you can use
 `/usr/share/dict/words` if it's available on your system, but it would be
@@ -53,17 +53,3 @@ later plus the following CPAN modules:
 * Readonly
 
 and their dependencies.
-
-To run the test suite, you will need Perl 5.010 or later and the
-dependencies of the `heimdal-history` program.  The following additional
-Perl modules will also be used by the test suite if present:
-
-* Perl6::Slurp
-* Test::MinimumVersion
-* Test::Perl::Critic
-* Test::Pod
-* Test::Spelling
-* Test::Strict
-
-All are available on CPAN.  Some tests will be skipped if the modules
-are not available.
diff --git a/docs/metadata/test/suffix b/docs/metadata/test/suffix
new file mode 100644 (file)
index 0000000..06f18d2
--- /dev/null
@@ -0,0 +1,13 @@
+To run the test suite, you will need Perl 5.010 or later and the
+dependencies of the `heimdal-history` program.  The following additional
+Perl modules will also be used by the test suite if present:
+
+* Perl6::Slurp
+* Test::MinimumVersion
+* Test::Perl::Critic
+* Test::Pod
+* Test::Spelling
+* Test::Strict
+
+All are available on CPAN.  Some tests will be skipped if the modules
+are not available.
index 9bbdccbcf1ab631f76b920679839f2aee1f291a5..9a749f71a97869a3731ae3c443d10acebb1f4dfb 100644 (file)
@@ -14,11 +14,11 @@ dnl
 dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
-dnl Copyright 2016 Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2016-2020 Russ Allbery <eagle@eyrie.org>
 dnl Copyright 2006, 2009, 2016
 dnl     by Internet Systems Consortium, Inc. ("ISC")
 dnl
-dnl Permission to use, copy, modify, and distribute this software for any
+dnl Permission to use, copy, modify, and/or distribute this software for any
 dnl purpose with or without fee is hereby granted, provided that the above
 dnl copyright notice and this permission notice appear in all copies.
 dnl
@@ -29,12 +29,14 @@ dnl SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 dnl ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 dnl IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl SPDX-License-Identifier: ISC
 
 dnl Used to build the result cache name.
 AC_DEFUN([_RRA_PROG_CC_FLAG_CACHE],
-[translit([rra_cv_compiler_c_$1], [-=], [__])])
+[translit([rra_cv_compiler_c_$1], [-=+], [___])])
 
-dnl Check whether a given flag is supported by the complier.
+dnl Check whether a given flag is supported by the compiler.
 AC_DEFUN([RRA_PROG_CC_FLAG],
 [AC_REQUIRE([AC_PROG_CC])
  AC_MSG_CHECKING([if $CC supports $1])
@@ -53,20 +55,31 @@ AC_DEFUN([RRA_PROG_CC_FLAG],
 dnl Determine the full set of viable warning flags for the current compiler.
 dnl
 dnl This is based partly on personal preference and is a fairly aggressive set
-dnl of warnings.  Desirable warnings that can't be turned on due to other
+dnl of warnings.  Desirable CC warnings that can't be turned on due to other
 dnl problems:
 dnl
-dnl   -Wconversion       http://bugs.debian.org/488884 (htons warnings)
-dnl   -Wsign-conversion  Too much noise from ssize_t and flag variables
+dnl   -Wsign-conversion  Too many fiddly changes for the benefit
 dnl   -Wstack-protector  Too many false positives from small buffers
 dnl
-dnl Last checked against gcc 6.1.0 (2016-09-25).  -D_FORTIFY_SOURCE=2 enables
+dnl Last checked against gcc 9.2.1 (2019-09-01).  -D_FORTIFY_SOURCE=2 enables
 dnl warn_unused_result attribute markings on glibc functions on Linux, which
 dnl catches a few more issues.  Add -O2 because gcc won't find some warnings
 dnl without optimization turned on.
 dnl
-dnl The warnings here are listed in the same order they're listed in the
-dnl "Preprocessor Options" and "Warning Options" chapters of the GCC manual.
+dnl For Clang, we try to use -Weverything, but we have to disable some of the
+dnl warnings:
+dnl
+dnl   -Wcast-qual                     Some structs require casting away const
+dnl   -Wdisabled-macro-expansion      Triggers on libc (sigaction.sa_handler)
+dnl   -Wpadded                        Not an actual problem
+dnl   -Wreserved-id-macros            Autoconf sets several of these normally
+dnl   -Wsign-conversion               Too many fiddly changes for the benefit
+dnl   -Wtautological-pointer-compare  False positives with for loops
+dnl   -Wundef                         Conflicts with Autoconf probe results
+dnl   -Wunreachable-code              Happens with optional compilation
+dnl   -Wunreachable-code-return       Other compilers get confused
+dnl   -Wunused-macros                 Often used on suppressed branches
+dnl   -Wused-but-marked-unused        Happens a lot with conditional code
 dnl
 dnl Sets WARNINGS_CFLAGS as a substitution variable.
 AC_DEFUN([RRA_PROG_CC_WARNINGS_FLAGS],
@@ -74,21 +87,26 @@ AC_DEFUN([RRA_PROG_CC_WARNINGS_FLAGS],
  AS_IF([test x"$CLANG" = xyes],
     [WARNINGS_CFLAGS="-Werror"
      m4_foreach_w([flag],
-        [-Weverything -Wno-padded],
+        [-Weverything -Wno-cast-qual -Wno-disabled-macro-expansion -Wno-padded
+         -Wno-sign-conversion -Wno-reserved-id-macro
+         -Wno-tautological-pointer-compare -Wno-undef -Wno-unreachable-code
+         -Wno-unreachable-code-return -Wno-unused-macros
+         -Wno-used-but-marked-unused],
         [RRA_PROG_CC_FLAG(flag,
             [WARNINGS_CFLAGS="${WARNINGS_CFLAGS} flag"])])],
     [WARNINGS_CFLAGS="-g -O2 -D_FORTIFY_SOURCE=2 -Werror"
      m4_foreach_w([flag],
-        [-fstrict-overflow -fstrict-aliasing -Wcomments -Wendif-labels -Wall
-         -Wextra -Wformat=2 -Wformat-signedness -Wnull-dereference -Winit-self
-         -Wswitch-enum -Wuninitialized -Wstrict-overflow=5
-         -Wmissing-format-attribute -Wduplicated-cond -Wtrampolines
-         -Wfloat-equal -Wdeclaration-after-statement -Wshadow -Wpointer-arith
-         -Wbad-function-cast -Wcast-align -Wwrite-strings -Wdate-time
-         -Wjump-misses-init -Wfloat-conversion -Wlogical-op
+        [-fstrict-overflow -fstrict-aliasing -Wall -Wextra -Wformat=2
+         -Wformat-overflow=2 -Wformat-signedness -Wformat-truncation=2
+         -Wnull-dereference -Winit-self -Wswitch-enum -Wstrict-overflow=5
+         -Wmissing-format-attribute -Walloc-zero -Wduplicated-branches
+         -Wduplicated-cond -Wtrampolines -Wfloat-equal
+         -Wdeclaration-after-statement -Wshadow -Wpointer-arith
+         -Wbad-function-cast -Wcast-align -Wwrite-strings -Wconversion
+         -Wno-sign-conversion -Wdate-time -Wjump-misses-init -Wlogical-op
          -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes
-         -Wnormalized=nfc -Wpacked -Wredundant-decls -Wnested-externs -Winline
-         -Wvla],
+         -Wmissing-declarations -Wnormalized=nfc -Wpacked -Wredundant-decls
+         -Wrestrict -Wnested-externs -Winline -Wvla],
         [RRA_PROG_CC_FLAG(flag,
             [WARNINGS_CFLAGS="${WARNINGS_CFLAGS} flag"])])])
  AC_SUBST([WARNINGS_CFLAGS])])
index b9ceefeb3aceabd956d960f78c237ece4328b8e6..c1815a5702c2633d2ff2fe118d31cb225f2de047 100644 (file)
@@ -10,6 +10,8 @@ dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Source used by RRA_PROG_CC_CLANG.
 AC_DEFUN([_RRA_PROG_CC_CLANG_SOURCE], [[
index d19bd1533826d248d969a545ca8ea3566fbfa1ba..f83b0664c31db1889b3ded46a30837c1bb3248ba 100644 (file)
@@ -15,87 +15,61 @@ dnl remctl libraries, saving the current values first, and
 dnl RRA_LIB_CRACKLIB_RESTORE to restore those settings to before the last
 dnl RRA_LIB_CRACKLIB_SWITCH.
 dnl
-dnl Depends on RRA_SET_LDFLAGS.
+dnl Depends on the lib-helper.m4 framework.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2020 Russ Allbery <eagle@eyrie.org>
 dnl Copyright 2010
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Save the current CPPFLAGS, LDFLAGS, and LIBS settings and switch to
-dnl versions that include the Kerberos v5 flags.  Used as a wrapper, with
+dnl versions that include the CrackLib flags.  Used as a wrapper, with
 dnl RRA_LIB_CRACKLIB_RESTORE, around tests.
-AC_DEFUN([RRA_LIB_CRACKLIB_SWITCH],
-[rra_cracklib_save_CPPFLAGS="$CPPFLAGS"
- rra_cracklib_save_LDFLAGS="$LDFLAGS"
- rra_cracklib_save_LIBS="$LIBS"
- CPPFLAGS="$CRACKLIB_CPPFLAGS $CPPFLAGS"
- LDFLAGS="$CRACKLIB_LDFLAGS $LDFLAGS"
- LIBS="$CRACKLIB_LIBS $LIBS"])
+AC_DEFUN([RRA_LIB_CRACKLIB_SWITCH], [RRA_LIB_HELPER_SWITCH([CRACKLIB])])
 
 dnl Restore CPPFLAGS, LDFLAGS, and LIBS to their previous values (before
 dnl RRA_LIB_CRACKLIB_SWITCH was called).
-AC_DEFUN([RRA_LIB_CRACKLIB_RESTORE],
-[CPPFLAGS="$rra_cracklib_save_CPPFLAGS"
- LDFLAGS="$rra_cracklib_save_LDFLAGS"
- LIBS="$rra_cracklib_save_LIBS"])
-
-dnl Set CRACKLIB_CPPFLAGS and CRACKLIB_LDFLAGS based on rra_cracklib_root,
-dnl rra_cracklib_libdir, and rra_cracklib_includedir.
-AC_DEFUN([_RRA_LIB_CRACKLIB_PATHS],
-[AS_IF([test x"$rra_cracklib_libdir" != x],
-    [CRACKLIB_LDFLAGS="-L$rra_cracklib_libdir"],
-    [AS_IF([test x"$rra_cracklib_root" != x],
-        [RRA_SET_LDFLAGS([CRACKLIB_LDFLAGS], [$rra_cracklib_root])])])
- AS_IF([test x"$rra_cracklib_includedir" != x],
-    [CRACKLIB_CPPFLAGS="-I$rra_cracklib_includedir"],
-    [AS_IF([test x"$rra_cracklib_root" != x],
-        [AS_IF([test x"$rra_cracklib_root" != x/usr],
-            [CRACKLIB_CPPFLAGS="-I${rra_cracklib_root}/include"])])])])
+AC_DEFUN([RRA_LIB_CRACKLIB_RESTORE], [RRA_LIB_HELPER_RESTORE([CRACKLIB])])
 
-dnl Sanity-check the results of the CrackLib library search to be sure we can
-dnl really link a CrackLib program.
-AC_DEFUN([_RRA_LIB_CRACKLIB_CHECK],
-[RRA_LIB_CRACKLIB_SWITCH
- AC_CHECK_FUNC([FascistCheck], ,
-    [AC_MSG_FAILURE([unable to link with CrackLib library])])
+dnl Checks if CrackLib is present and sets variables as appropriate.
+AC_DEFUN([_RRA_LIB_CRACKLIB_INTERNAL],
+[RRA_LIB_HELPER_PATHS([CRACKLIB])
+ RRA_LIB_CRACKLIB_SWITCH
+ AC_CHECK_LIB([crack], [FascistCheck], [CRACKLIB_LIBS=-lcrack],
+    [AC_MSG_ERROR([cannot find usable CrackLib library])])
+ AC_CHECK_HEADERS([crack.h])
+ AC_DEFINE([HAVE_SYSTEM_CRACKLIB], 1, [Define if using the system CrackLib.])
  RRA_LIB_CRACKLIB_RESTORE])
 
 dnl The main macro.
 AC_DEFUN([RRA_LIB_CRACKLIB],
-[rra_system_cracklib=
- rra_cracklib_root=
- rra_cracklib_libdir=
- rra_cracklib_includedir=
- CRACKLIB_CPPFLAGS=
- CRACKLIB_LDFLAGS=
- CRACKLIB_LIBS=
- AC_SUBST([CRACKLIB_CPPFLAGS])
- AC_SUBST([CRACKLIB_LDFLAGS])
- AC_SUBST([CRACKLIB_LIBS])
+[RRA_LIB_HELPER_VAR_INIT([CRACKLIB])
 
  AC_ARG_WITH([cracklib],
-    [AS_HELP_STRING([--with-cracklib@<:@=DIR@:>@],
+    [AS_HELP_STRING([--with-cracklib][@<:@=DIR@:>@],
         [Use system CrackLib instead of embedded copy])],
-    [AS_IF([test x"$withval" != xno], [rra_system_cracklib=yes])
-     AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
-        [rra_cracklib_root="$withval"])])
- AC_ARG_WITH([cracklib-include],
+    [AS_IF([test x"$withval" = xno],
+        [rra_use_CRACKLIB=false],
+        [rra_use_CRACKLIB=true
+         AS_IF([test x"$withval" != xyes], [rra_CRACKLIB_root="$withval"])])])
+ AC_ARG_WITH([cracklib][-include],
     [AS_HELP_STRING([--with-cracklib-include=DIR],
         [Location of CrackLib headers])],
     [AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
-        [rra_cracklib_includedir="$withval"])])
+        [rra_CRACKLIB_includedir="$withval"])])
  AC_ARG_WITH([cracklib-lib],
     [AS_HELP_STRING([--with-cracklib-lib=DIR],
-        [Location of cracklib libraries])],
+        [Location of CrackLib libraries])],
     [AS_IF([test x"$withval" != xyes && test x"$withval" != xno],
-        [rra_cracklib_libdir="$withval"])])
+        [rra_CRACKLIB_libdir="$withval"])])
 
- AM_CONDITIONAL([EMBEDDED_CRACKLIB], [test x"$rra_system_cracklib" != xyes])
- AS_IF([test x"$rra_system_cracklib" = xyes],
-     [_RRA_LIB_CRACKLIB_PATHS
-      CRACKLIB_LIBS="-lcrack"
-      _RRA_LIB_CRACKLIB_CHECK])])
+  AS_IF([test x"$rra_use_CRACKLIB" != xfalse],
+     [AS_IF([test x"$rra_use_CRACKLIB" != x], [_RRA_LIB_CRACKLIB_INTERNAL])
+      AC_DEFINE([HAVE_CRACKLIB], 1, [Define if CrackLib is available.])])
+ AM_CONDITIONAL([EMBEDDED_CRACKLIB], [test x"$rra_use_CRACKLIB" = x])])
index 738b30b826eceffcb76e139e914c5451786d722a..bbfcdc194e6c5233c1b1ad01f499f01609475742 100644 (file)
@@ -11,12 +11,15 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2011, 2012
+dnl Copyright 2018 Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2011-2012
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Check for krb5-config in the user's path and set PATH_KRB5_CONFIG.  This
 dnl is moved into a separate macro so that it can be loaded via AC_REQUIRE,
@@ -75,12 +78,12 @@ dnl argument if that option was requested and not supported.  Old versions of
 dnl krb5-config didn't take an argument to specify the library type, but
 dnl always returned the flags for libkrb5.
 AC_DEFUN([RRA_KRB5_CONFIG],
-[AC_REQUIRE([_RRA_KRB5_CONFIG_PATH])
- rra_krb5_config_$3=
+[rra_krb5_config_$3=
  rra_krb5_config_$3[]_ok=
  AS_IF([test x"$1" != x && test -x "$1/bin/krb5-config"],
     [rra_krb5_config_$3="$1/bin/krb5-config"],
-    [rra_krb5_config_$3="$PATH_KRB5_CONFIG"])
+    [_RRA_KRB5_CONFIG_PATH
+     rra_krb5_config_$3="$PATH_KRB5_CONFIG"])
  AS_IF([test x"$rra_krb5_config_$3" != x && test -x "$rra_krb5_config_$3"],
     [AC_CACHE_CHECK([for $2 support in krb5-config], [rra_cv_lib_$3[]_config],
          [AS_IF(["$rra_krb5_config_$3" 2>&1 | grep $2 >/dev/null 2>&1],
index 236f0b09261c716e49f5fb04b0957cfcacb00bc9..617c27b6ab6bb578cfd7a8fa0d9cb33dd9ecb4aa 100644 (file)
@@ -50,12 +50,15 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014
+dnl Copyright 2018 Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2005-2011, 2013-2014
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Ignore Automake conditionals if not using Automake.
 m4_define_default([AM_CONDITIONAL], [:])
@@ -137,26 +140,27 @@ dnl linkage.  The single argument, if true, says to fail if Kerberos could not
 dnl be found.
 AC_DEFUN([_RRA_LIB_KRB5_REDUCED],
 [RRA_LIB_KRB5_SWITCH
- AC_CHECK_LIB([krb5], [krb5_init_context], [KRB5_LIBS="-lkrb5"],
+ AC_CHECK_LIB([krb5], [krb5_init_context],
+    [KRB5_LIBS="-lkrb5"
+     LIBS="$KRB5_LIBS $LIBS"
+     _RRA_LIB_KRB5_CHECK_HEADER_KRB5
+     AC_CHECK_FUNCS([krb5_get_error_message],
+        [AC_CHECK_FUNCS([krb5_free_error_message])],
+        [AC_CHECK_FUNCS([krb5_get_error_string], [],
+            [AC_CHECK_FUNCS([krb5_get_err_txt], [],
+                [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
+                    [KRB5_LIBS="$KRB5_LIBS -lksvc"
+                     AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
+                     AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
+                        [RRA_INCLUDES_KRB5])],
+                    [AC_CHECK_LIB([com_err], [com_err],
+                        [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
+                        [AS_IF([test x"$1" = xtrue],
+                            [AC_MSG_ERROR([cannot find usable com_err library])],
+                            [KRB5_LIBS=""])])
+                     _RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])],
      [AS_IF([test x"$1" = xtrue],
          [AC_MSG_ERROR([cannot find usable Kerberos library])])])
- LIBS="$KRB5_LIBS $LIBS"
- _RRA_LIB_KRB5_CHECK_HEADER_KRB5
- AC_CHECK_FUNCS([krb5_get_error_message],
-     [AC_CHECK_FUNCS([krb5_free_error_message])],
-     [AC_CHECK_FUNCS([krb5_get_error_string], [],
-         [AC_CHECK_FUNCS([krb5_get_err_txt], [],
-             [AC_CHECK_LIB([ksvc], [krb5_svc_get_msg],
-                 [KRB5_LIBS="$KRB5_LIBS -lksvc"
-                  AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1])
-                  AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [],
-                     [RRA_INCLUDES_KRB5])],
-                 [AC_CHECK_LIB([com_err], [com_err],
-                     [KRB5_LIBS="$KRB5_LIBS -lcom_err"],
-                     [AS_IF([test x"$1" = xtrue],
-                         [AC_MSG_ERROR([cannot find usable com_err library])],
-                         [KRB5_LIBS=""])])
-                  _RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])])
  RRA_LIB_KRB5_RESTORE])
 
 dnl Does the appropriate library checks for Kerberos linkage when we don't
index 4b32ef55527ad799ca2c6e81afd4d3f77ae708ff..09a2cf9f0737dd38bfdd6c6ec94ace24ae7c5f95 100644 (file)
@@ -13,12 +13,14 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2005, 2006, 2007
+dnl Copyright 2005-2007
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 AC_DEFUN([RRA_ENABLE_REDUCED_DEPENDS],
 [rra_reduced_depends=false
index 4e0c751c44e21ec2cef2718c5a8952c3091b6acf..481122b72a38c7e0de40df026f31159b2bf38bbd 100644 (file)
@@ -12,12 +12,15 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
+dnl Copyright 2018 Russ Allbery <eagle@eyrie.org>
 dnl Copyright 2011, 2013
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Add the library flags to the default compiler flags and then remove them.
 dnl
@@ -88,6 +91,14 @@ AC_DEFUN([RRA_LIB_HELPER_VAR_INIT],
  AC_SUBST([$1][_LDFLAGS])
  AC_SUBST([$1][_LIBS])])
 
+dnl Unset all of the variables used by a library probe.  Used with the
+dnl _OPTIONAL versions of header probes when a header or library wasn't found
+dnl and therefore the library isn't usable.
+AC_DEFUN([RRA_LIB_HELPER_VAR_CLEAR],
+[$1[]_CPPFLAGS=
+ $1[]_LDFLAGS=
+ $1[]_LIBS=])
+
 dnl Handles --with options for a non-optional library.  First argument is the
 dnl base for the switch names.  Second argument is the short description.
 dnl Third argument is the variable prefix.  The variables set are used by
index 858bed5fcfd1c19af7777a64650a54ba4b869a48..46e887978e4e541c5cee1494706f0bf641aab203 100644 (file)
@@ -16,12 +16,14 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 20082009
+dnl Copyright 2008-2009
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Probe for the alternate library name that we should attempt on this
 dnl architecture, given the size of an int, and set rra_lib_arch_name to that
index ee80844b619f4e8689086457c4807c40fe238784..a6d21ae56ea74c1ac100364f8a37375a3632db72 100644 (file)
@@ -1041,8 +1041,8 @@ int forced_loaded() { return 2;}
 _LT_EOF
       echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
       $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
-      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
-      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
+      echo "$AR cr libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
+      $AR cr libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
       echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
       $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
       cat > conftest.c << _LT_EOF
@@ -1492,7 +1492,7 @@ need_locks=$enable_libtool_lock
 m4_defun([_LT_PROG_AR],
 [AC_CHECK_TOOLS(AR, [ar], false)
 : ${AR=ar}
-: ${AR_FLAGS=cru}
+: ${AR_FLAGS=cr}
 _LT_DECL([], [AR], [1], [The archiver])
 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
 
@@ -4063,7 +4063,8 @@ _LT_EOF
   if AC_TRY_EVAL(ac_compile); then
     # Now try to grab the symbols.
     nlist=conftest.nm
-    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
+    $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&AS_MESSAGE_LOG_FD
+    if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&AS_MESSAGE_LOG_FD && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
        mv -f "$nlist"T "$nlist"
@@ -4703,6 +4704,12 @@ m4_if([$1], [CXX], [
        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
        _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
         ;;
+      # flang / f18. f95 an alias for gfortran or flang on Debian
+      flang* | f18* | f95*)
+       _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+       _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+       _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+        ;;
       # icc used to be incompatible with GCC.
       # ICC 10 doesn't accept -KPIC any more.
       icc* | ifort*)
@@ -6438,7 +6445,7 @@ if test yes != "$_lt_caught_CXX_error"; then
       # Commands to make compiler produce verbose output that lists
       # what "hidden" libraries, object files and flags are used when
       # linking a shared library.
-      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
 
     else
       GXX=no
@@ -6813,7 +6820,7 @@ if test yes != "$_lt_caught_CXX_error"; then
             # explicitly linking system object files so we need to strip them
             # from the output so that they don't get included in the library
             # dependencies.
-            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
             ;;
           *)
             if test yes = "$GXX"; then
@@ -6878,7 +6885,7 @@ if test yes != "$_lt_caught_CXX_error"; then
            # explicitly linking system object files so we need to strip them
            # from the output so that they don't get included in the library
            # dependencies.
-           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+           output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
           *)
            if test yes = "$GXX"; then
@@ -7217,7 +7224,7 @@ if test yes != "$_lt_caught_CXX_error"; then
              # Commands to make compiler produce verbose output that lists
              # what "hidden" libraries, object files and flags are used when
              # linking a shared library.
-             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+             output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
 
            else
              # FIXME: insert proper C++ library support
@@ -7301,7 +7308,7 @@ if test yes != "$_lt_caught_CXX_error"; then
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
              else
                # g++ 2.7 appears to require '-G' NOT '-shared' on this
                # platform.
@@ -7312,7 +7319,7 @@ if test yes != "$_lt_caught_CXX_error"; then
                # Commands to make compiler produce verbose output that lists
                # what "hidden" libraries, object files and flags are used when
                # linking a shared library.
-               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
+               output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'
              fi
 
              _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
index 3d9c8517e407009173f66c352faf2ef71101b4bd..e739bbfea51abb14449580cfa945fcecb483731e 100644 (file)
@@ -13,12 +13,14 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2006, 20082009
+dnl Copyright 2006, 2008-2009
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Source used by RRA_FUNC_SNPRINTF.
 AC_DEFUN([_RRA_FUNC_SNPRINTF_SOURCE], [[
index edc68908fc3a04722ea564d25246cd3cb8f50c78..b0a7bd5f2a02536c53376f473c5f80de1a4109f5 100644 (file)
@@ -26,6 +26,8 @@ dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Save the current CPPFLAGS, LDFLAGS, and LIBS settings and switch to
 dnl versions that include the libevent flags.  Used as a wrapper, with
index 53176706a2c873097df2a5aadb3b436335050d60..8aff1e367a3fd0d3149a53d91e7e2e7625a73a8e 100644 (file)
@@ -23,6 +23,8 @@ dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 dnl Save the current CPPFLAGS, LDFLAGS, and LIBS settings and switch to
 dnl versions that include the TinyCDB flags.  Used as a wrapper, with
index 3ed5496f211f1c53f0561e492950d166e169771c..5595b86abfa78f22c8883ed97df69a024d3da0d0 100644 (file)
@@ -17,12 +17,14 @@ dnl The canonical version of this file is maintained in the rra-c-util
 dnl package, available at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 dnl
 dnl Written by Russ Allbery <eagle@eyrie.org>
-dnl Copyright 2006, 20082009
+dnl Copyright 2006, 2008-2009
 dnl     The Board of Trustees of the Leland Stanford Junior University
 dnl
 dnl This file is free software; the authors give unlimited permission to copy
 dnl and/or distribute it, with or without modifications, as long as this
 dnl notice is preserved.
+dnl
+dnl SPDX-License-Identifier: FSFULLR
 
 AC_DEFUN([_RRA_C_C99_VAMACROS_SOURCE], [[
 #include <stdio.h>
index 92e08eb13dfdd6e78d2b0d0d73ef1b58c670da1d..7b268d95f848f8ce59e51d21c45453ce2ece396b 100644 (file)
@@ -12,7 +12,7 @@
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -21,7 +21,7 @@
 #include <portable/system.h>
 
 #ifdef HAVE_CDB_H
-# include <cdb.h>
+#    include <cdb.h>
 #endif
 #include <errno.h>
 #include <fcntl.h>
@@ -47,8 +47,9 @@ strength_init_cdb(krb5_context ctx, krb5_pwqual_moddata data UNUSED)
     if (path == NULL)
         return 0;
     free(path);
-    krb5_set_error_message(ctx, KADM5_BAD_SERVER_PARAMS, "CDB dictionary"
-                           " requested but not built with CDB support");
+    krb5_set_error_message(ctx, KADM5_BAD_SERVER_PARAMS,
+                           "CDB dictionary requested but not built with CDB"
+                           " support");
     return KADM5_BAD_SERVER_PARAMS;
 }
 #endif
@@ -57,21 +58,6 @@ strength_init_cdb(krb5_context ctx, krb5_pwqual_moddata data UNUSED)
 /* Skip the rest of this file if CDB is not available. */
 #ifdef HAVE_CDB
 
-/*
- * Macro used to make password checks more readable.  Assumes that the found
- * and fail labels are available for the abort cases of finding a password or
- * failing to look it up.
- */
-# define CHECK_PASSWORD(ctx, data, password)                    \
-    do {                                                        \
-        code = in_cdb_dictionary(ctx, data, password, &found);  \
-        if (code != 0)                                          \
-            goto fail;                                          \
-        if (found)                                              \
-            goto found;                                         \
-    } while (0)
-
-
 /*
  * Look up a password in CDB and set the found parameter to true if it is
  * found, false otherwise.  Returns a Kerberos status code, which will be 0 on
@@ -84,7 +70,7 @@ in_cdb_dictionary(krb5_context ctx, krb5_pwqual_moddata data,
     int status;
 
     *found = false;
-    status = cdb_find(&data->cdb, password, strlen(password));
+    status = cdb_find(&data->cdb, password, (unsigned int) strlen(password));
     if (status < 0)
         return strength_error_system(ctx, "cannot query CDB database");
     else {
@@ -130,6 +116,21 @@ strength_init_cdb(krb5_context ctx, krb5_pwqual_moddata data)
 }
 
 
+/*
+ * Macro used to make password checks more readable.  Assumes that the found
+ * and fail labels are available for the abort cases of finding a password or
+ * failing to look it up.
+ */
+#    define CHECK_PASSWORD(ctx, data, password)                    \
+        do {                                                       \
+            code = in_cdb_dictionary(ctx, data, password, &found); \
+            if (code != 0)                                         \
+                goto fail;                                         \
+            if (found)                                             \
+                goto found;                                        \
+        } while (0)
+
+
 /*
  * Given a password, try the various transformations that we want to apply and
  * check for each of them in the dictionary.  Returns a Kerberos status code,
index bf9ef019888820a2c6626621397cdc42575f827a..f7c985a078b4864581745145a4c190e1ca34fda5 100644 (file)
@@ -5,10 +5,10 @@
  *
  * Written by Russ Allbery <eagle@eyrie.org>
  * Copyright 2016 Russ Allbery <eagle@eyrie.org>
- * Copyright 20132014
+ * Copyright 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -48,10 +48,14 @@ analyze_password(const char *password, struct password_classes *classes)
         else
             classes->symbol = true;
     }
-    if (classes->lower)  classes->num_classes++;
-    if (classes->upper)  classes->num_classes++;
-    if (classes->digit)  classes->num_classes++;
-    if (classes->symbol) classes->num_classes++;
+    if (classes->lower)
+        classes->num_classes++;
+    if (classes->upper)
+        classes->num_classes++;
+    if (classes->digit)
+        classes->num_classes++;
+    if (classes->symbol)
+        classes->num_classes++;
 }
 
 
index 0114740ad480f7bcaaa575d1614df2f927295f5a..d9d2a5248bc58e2ec5c73b1b02cbbe8c8fc0dd97 100644 (file)
@@ -10,7 +10,7 @@
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -68,7 +68,7 @@ default_realm(krb5_context ctx)
         return NULL;
     code = krb5_get_default_realm(ctx, &realm);
     if (code != 0) {
-        free(realm);
+        free(realm_data);
         return NULL;
     }
     realm_data->magic = KV5M_DATA;
@@ -78,7 +78,7 @@ default_realm(krb5_context ctx)
         krb5_free_default_realm(ctx, realm);
         return NULL;
     }
-    realm_data->length = strlen(realm);
+    realm_data->length = (unsigned int) strlen(realm);
     krb5_free_default_realm(ctx, realm);
     return realm_data;
 }
@@ -187,8 +187,10 @@ parse_class(krb5_context ctx, const char *spec, struct class_rule **rule)
         if (okay)
             spec = end + 1;
         else {
-            code = strength_error_config(ctx, "bad character class requirement"
-                                         " in configuration: %s", spec);
+            code = strength_error_config(ctx,
+                                         "bad character class requirement in"
+                                         " configuration: %s",
+                                         spec);
             goto fail;
         }
     }
@@ -214,15 +216,16 @@ parse_class(krb5_context ctx, const char *spec, struct class_rule **rule)
             (*rule)->digit = true;
         else if (strcmp(class, "symbol") == 0)
             (*rule)->symbol = true;
-       else if (isdigit((unsigned char) *class)) {
-           okay = parse_number(class, &(*rule)->num_classes, &end);
-           if (!okay || *end != '\0' || (*rule)->num_classes > MAX_CLASSES) {
-                code = strength_error_config(ctx, "bad character class minimum"
-                                             " in configuration: %s", class);
-               goto fail;
-           }
-       }
-        else {
+        else if (isdigit((unsigned char) *class)) {
+            okay = parse_number(class, &(*rule)->num_classes, &end);
+            if (!okay || *end != '\0' || (*rule)->num_classes > MAX_CLASSES) {
+                code = strength_error_config(ctx,
+                                             "bad character class minimum in"
+                                             " configuration: %s",
+                                             class);
+                goto fail;
+            }
+        } else {
             code = strength_error_config(ctx, "unknown character class %s",
                                          class);
             goto fail;
@@ -302,8 +305,7 @@ fail:
  * allocation failed while parsing or while setting the default value.
  */
 krb5_error_code
-strength_config_list(krb5_context ctx, const char *opt,
-                     struct vector **result)
+strength_config_list(krb5_context ctx, const char *opt, struct vector **result)
 {
     realm_type realm;
     char *value = NULL;
index 7bb8c7e863a8fad6164c91702d05be685eb40c7c..95656bdcb62e3b065c6a45472a3245dbc371b17d 100644 (file)
@@ -8,25 +8,58 @@
  * Developed by Derrick Brashear and Ken Hornstein of Sine Nomine Associates,
  *     on behalf of Stanford University
  * Extensive modifications by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2012, 2013
+ * Copyright 2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2007, 2009, 2012-2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
+#include <portable/kadmin.h>
 #include <portable/system.h>
 
 #include <plugin/internal.h>
+#include <util/macros.h>
 
 /* When using the embedded CrackLib, we need to provide our own prototype. */
-#ifdef HAVE_CRACK_H
-# include <crack.h>
-#else
+#ifdef HAVE_CRACKLIB
+#    ifdef HAVE_CRACK_H
+#        include <crack.h>
+#    else
 extern const char *FascistCheck(const char *password, const char *dict);
+#    endif
 #endif
 
 
+/*
+ * Stub for strength_init_cracklib if not built with CrackLib support.
+ */
+#ifndef HAVE_CRACKLIB
+krb5_error_code
+strength_init_cracklib(krb5_context ctx, krb5_pwqual_moddata data UNUSED,
+                       const char *dictionary UNUSED)
+{
+    char *path = NULL;
+
+    /* Get CDB dictionary path from krb5.conf. */
+    strength_config_string(ctx, "password_dictionary", &path);
+
+    /* If it was set, report an error, since we don't have CrackLib support. */
+    if (path == NULL)
+        return 0;
+    free(path);
+    krb5_set_error_message(ctx, KADM5_BAD_SERVER_PARAMS,
+                           "CrackLib dictionary requested but not built with"
+                           " CrackLib support");
+    return KADM5_BAD_SERVER_PARAMS;
+}
+#endif
+
+
+/* Skip the rest of this file if CrackLib is not available. */
+#ifdef HAVE_CRACKLIB
+
 /*
  * Initialize the CrackLib dictionary.  Ensure that the dictionary file exists
  * and is readable and store the path in the module context.  Returns 0 on
@@ -100,3 +133,5 @@ strength_check_cracklib(krb5_context ctx, krb5_pwqual_moddata data,
     else
         return 0;
 }
+
+#endif /* HAVE_CRACKLIB */
index ba51366736bc16adc0f8f56418a09895ef74e4ce..4c6541c76d19460b1266b8c513bc965c347cc706 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -50,20 +50,20 @@ set_error(krb5_context ctx, krb5_error_code code, const char *format,
  * and variable arguments and set the Kerberos error code and message,
  * returning the appropriate code.
  */
-#define ERROR_FUNC(name, code)                                          \
-    krb5_error_code                                                     \
-    strength_error_ ## name(krb5_context ctx, const char *format, ...)  \
-    {                                                                   \
-        va_list args;                                                   \
-        va_start(args, format);                                         \
-        set_error(ctx, code, format, args);                             \
-        va_end(args);                                                   \
-        return code;                                                    \
+#define ERROR_FUNC(name, code)                                     \
+    krb5_error_code strength_error_##name(krb5_context ctx,        \
+                                          const char *format, ...) \
+    {                                                              \
+        va_list args;                                              \
+        va_start(args, format);                                    \
+        set_error(ctx, code, format, args);                        \
+        va_end(args);                                              \
+        return code;                                               \
     }
-ERROR_FUNC(class,    KADM5_PASS_Q_CLASS)
-ERROR_FUNC(config,   KADM5_MISSING_KRB5_CONF_PARAMS)
-ERROR_FUNC(dict,     KADM5_PASS_Q_DICT)
-ERROR_FUNC(generic,  KADM5_PASS_Q_GENERIC)
+ERROR_FUNC(class, KADM5_PASS_Q_CLASS)
+ERROR_FUNC(config, KADM5_MISSING_KRB5_CONF_PARAMS)
+ERROR_FUNC(dict, KADM5_PASS_Q_DICT)
+ERROR_FUNC(generic, KADM5_PASS_Q_GENERIC)
 ERROR_FUNC(tooshort, KADM5_PASS_Q_TOOSHORT)
 
 
index 66f2d2da87f7a2462c402c6499822ce7a67bdc9c..4fb5f334516a5273288412815a28bc27ca992932 100644 (file)
@@ -9,10 +9,10 @@
  * Developed by Derrick Brashear and Ken Hornstein of Sine Nomine Associates,
  *     on behalf of Stanford University
  * Extensive modifications by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2012, 2013, 2014
+ * Copyright 2006-2007, 2009, 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
index 52c81975d808495cc663f5ea1fe114b6d55282b2..b6bd54710fdc40bd0969e207cab17bf0ca2ab3b0 100644 (file)
  * instead.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2009, 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -24,7 +25,7 @@
 
 #include <errno.h>
 #ifdef HAVE_KADM5_KADM5_PWCHECK_H
-# include <kadm5/kadm5-pwcheck.h>
+#    include <kadm5/kadm5-pwcheck.h>
 #endif
 
 #include <plugin/internal.h>
@@ -60,11 +61,11 @@ convert_error(krb5_context ctx, krb5_error_code code, const char *prefix,
  */
 static int
 heimdal_pwcheck(krb5_context ctx, krb5_principal principal,
-                krb5_data *password, const char *tuning UNUSED,
-                char *message, size_t length)
+                krb5_data *password, const char *tuning UNUSED, char *message,
+                size_t length)
 {
     krb5_pwqual_moddata data = NULL;
-    char *pastring = NULL;
+    char *pastring;
     char *name = NULL;
     krb5_error_code code;
 
@@ -107,15 +108,18 @@ done:
 }
 
 /* The public symbol that Heimdal looks for. */
+/* clang-format off */
 static struct kadm5_pw_policy_check_func functions[] = {
-    { "krb5-strength", heimdal_pwcheck },
-    { NULL, NULL }
+    {"krb5-strength", heimdal_pwcheck},
+    {NULL, NULL}
 };
+extern struct kadm5_pw_policy_verifier kadm5_password_verifier;
 struct kadm5_pw_policy_verifier kadm5_password_verifier = {
     "krb5-strength",
     KADM5_PASSWD_VERSION_V1,
     "Russ Allbery",
     functions
 };
+/* clang-format on */
 
 #endif /* HAVE_KRB5_REALM */
index 011bbb6cd6a31aff6f20d0f29964d43d54d30678..7132de0f2ca770bb57c3ba18b653d9b11fd338af 100644 (file)
@@ -4,10 +4,10 @@
  * Developed by Derrick Brashear and Ken Hornstein of Sine Nomine Associates,
  *     on behalf of Stanford University
  * Extensive modifications by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2012, 2013, 2014
+ * Copyright 2006-2007, 2009, 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef PLUGIN_INTERNAL_H
 #include <portable/macros.h>
 
 #ifdef HAVE_CDB_H
-# include <cdb.h>
+#    include <cdb.h>
 #endif
 #ifdef HAVE_SQLITE3_H
-# include <sqlite3.h>
+#    include <sqlite3.h>
 #endif
 #include <stddef.h>
 
 #ifdef HAVE_KRB5_PWQUAL_PLUGIN_H
-# include <krb5/pwqual_plugin.h>
+#    include <krb5/pwqual_plugin.h>
 #else
 typedef struct krb5_pwqual_moddata_st *krb5_pwqual_moddata;
 #endif
 
 /* Error strings returned (and displayed to the user) for various failures. */
-#define ERROR_ASCII        "Password contains non-ASCII or control characters"
-#define ERROR_CLASS_LOWER  "Password must contain a lowercase letter"
-#define ERROR_CLASS_UPPER  "Password must contain an uppercase letter"
-#define ERROR_CLASS_DIGIT  "Password must contain a number"
+#define ERROR_ASCII       "Password contains non-ASCII or control characters"
+#define ERROR_CLASS_LOWER "Password must contain a lowercase letter"
+#define ERROR_CLASS_UPPER "Password must contain an uppercase letter"
+#define ERROR_CLASS_DIGIT "Password must contain a number"
 #define ERROR_CLASS_SYMBOL \
     "Password must contain a space or punctuation character"
-#define ERROR_CLASS_MIN \
+#define ERROR_CLASS_MIN                                                    \
     "Password must contain %lu types of characters (lowercase, uppercase," \
     " numbers, symbols)"
-#define ERROR_DICT         "Password found in list of common passwords"
-#define ERROR_LETTER       "Password is only letters and spaces"
-#define ERROR_MINDIFF      "Password does not contain enough unique characters"
-#define ERROR_SHORT        "Password is too short"
-#define ERROR_USERNAME     "Password based on username or principal"
+#define ERROR_DICT     "Password found in list of common passwords"
+#define ERROR_LETTER   "Password is only letters and spaces"
+#define ERROR_MINDIFF  "Password does not contain enough unique characters"
+#define ERROR_SHORT    "Password is too short"
+#define ERROR_USERNAME "Password based on username or principal"
 
 /*
  * A character class rule, which consists of a minimum length to which the
@@ -78,17 +78,17 @@ struct vector {
  * checking for at least the MIT plugin.
  */
 struct krb5_pwqual_moddata_st {
-    long minimum_different;     /* Minimum number of different characters */
-    long minimum_length;        /* Minimum password length */
-    bool ascii;                 /* Whether to require printable ASCII */
-    bool nonletter;             /* Whether to require a non-letter */
-    struct class_rule *rules;   /* Linked list of character class rules */
-    char *dictionary;           /* Base path to CrackLib dictionary */
-    long cracklib_maxlen;       /* Longer passwords skip CrackLib checks */
-    bool have_cdb;              /* Whether we have a CDB dictionary */
-    int cdb_fd;                 /* File descriptor of CDB dictionary */
+    long minimum_different;   /* Minimum number of different characters */
+    long minimum_length;      /* Minimum password length */
+    bool ascii;               /* Whether to require printable ASCII */
+    bool nonletter;           /* Whether to require a non-letter */
+    struct class_rule *rules; /* Linked list of character class rules */
+    char *dictionary;         /* Base path to CrackLib dictionary */
+    long cracklib_maxlen;     /* Longer passwords skip CrackLib checks */
+    bool have_cdb;            /* Whether we have a CDB dictionary */
+    int cdb_fd;               /* File descriptor of CDB dictionary */
 #ifdef HAVE_CDB_H
-    struct cdb cdb;             /* Open CDB dictionary data */
+    struct cdb cdb; /* Open CDB dictionary data */
 #endif
 #ifdef HAVE_SQLITE3_H
     sqlite3 *sqlite;            /* Open SQLite database handle */
@@ -131,19 +131,27 @@ krb5_error_code strength_check_cdb(krb5_context, krb5_pwqual_moddata,
                                    const char *password);
 void strength_close_cdb(krb5_context, krb5_pwqual_moddata);
 #else
-# define strength_check_cdb(c, d, p) 0
-# define strength_close_cdb(c, d)    /* empty */
+#    define strength_check_cdb(c, d, p) 0
+#    define strength_close_cdb(c, d)    /* empty */
 #endif
 
 /*
  * CrackLib handling.  strength_init_cracklib gets the dictionary
  * configuration does some sanity checks on it, and strength_check_cracklib
  * checks the password against CrackLib.
+ *
+ * If not built with CrackLib support, provide a stub for check.  init is
+ * always a real function, which reports an error if CrackLib is requested and
+ * not availble.
  */
 krb5_error_code strength_init_cracklib(krb5_context, krb5_pwqual_moddata,
                                        const char *dictionary);
+#ifdef HAVE_CRACKLIB
 krb5_error_code strength_check_cracklib(krb5_context, krb5_pwqual_moddata,
                                         const char *password);
+#else
+#    define strength_check_cracklib(c, d, p) 0
+#endif
 
 /*
  * SQLite handling.  strength_init_sqlite gets the database configuration and
@@ -160,8 +168,8 @@ krb5_error_code strength_check_sqlite(krb5_context, krb5_pwqual_moddata,
                                       const char *password);
 void strength_close_sqlite(krb5_context, krb5_pwqual_moddata);
 #else
-# define strength_check_sqlite(c, d, p) 0
-# define strength_close_sqlite(c, d)    /* empty */
+#    define strength_check_sqlite(c, d, p) 0
+#    define strength_close_sqlite(c, d)    /* empty */
 #endif
 
 /* Check whether the password statisfies character class requirements. */
@@ -177,8 +185,7 @@ krb5_error_code strength_check_principal(krb5_context, krb5_pwqual_moddata,
  * Manage vectors, which are counted lists of strings.  The functions that
  * return a boolean return false if memory allocation fails.
  */
-struct vector *strength_vector_new(void)
-    __attribute__((__malloc__));
+struct vector *strength_vector_new(void) __attribute__((__malloc__));
 bool strength_vector_add(struct vector *, const char *string)
     __attribute__((__nonnull__));
 void strength_vector_free(struct vector *);
index d68ad574f6708cefbdde7099b1cc064cfc96f574..06a351cd59ec70defaba203b4da205e2bb858fbb 100644 (file)
@@ -9,7 +9,7 @@
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -19,7 +19,7 @@
 
 #include <errno.h>
 #ifdef HAVE_KRB5_PWQUAL_PLUGIN_H
-# include <krb5/pwqual_plugin.h>
+#    include <krb5/pwqual_plugin.h>
 #endif
 
 #include <plugin/internal.h>
index fd19cd489ffa466cc1474e8c47db40b090d5c4c5..18d5e78ce9f0fe949898e22cb600cb17d9a48be1 100644 (file)
@@ -8,10 +8,11 @@
  * Developed by Derrick Brashear and Ken Hornstein of Sine Nomine Associates,
  *     on behalf of Stanford University
  * Extensive modifications by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2012, 2013, 2014
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2007, 2009, 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -56,7 +57,7 @@ check_component(krb5_context ctx, const char *component, const char *password)
             copy[j] = c;
         }
         if (strcasecmp(copy, password) == 0) {
-            memset(copy, 0, strlen(copy));
+            explicit_bzero(copy, strlen(copy));
             free(copy);
             return strength_error_generic(ctx, ERROR_USERNAME);
         }
@@ -159,7 +160,7 @@ strength_check_principal(krb5_context ctx, krb5_pwqual_moddata data UNUSED,
         if (i != 0) {
             code = check_component(ctx, copy + i, password);
             if (code != 0) {
-                memset(copy, 0, strlen(copy));
+                explicit_bzero(copy, strlen(copy));
                 free(copy);
                 return code;
             }
@@ -176,7 +177,7 @@ strength_check_principal(krb5_context ctx, krb5_pwqual_moddata data UNUSED,
         /* Check the current component. */
         code = check_component(ctx, start, password);
         if (code != 0) {
-            memset(copy, 0, strlen(copy));
+            explicit_bzero(copy, strlen(copy));
             free(copy);
             return code;
         }
@@ -187,7 +188,7 @@ strength_check_principal(krb5_context ctx, krb5_pwqual_moddata data UNUSED,
     } while (i < length);
 
     /* Password does not appear to be based on the principal. */
-    memset(copy, 0, strlen(copy));
+    explicit_bzero(copy, strlen(copy));
     free(copy);
     return 0;
 }
index 30bc9a5ab7b8a349c672717a4c167b627b41a6ef..fc91e5bf97926578eb36818696527016ce97a2cb 100644 (file)
  *
  * Written by Russ Allbery <eagle@eyrie.org>
  * Based on work by David Mazières
- * Copyright 2016 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -42,7 +42,7 @@
 #include <portable/system.h>
 
 #ifdef HAVE_SQLITE3_H
-# include <sqlite3.h>
+#    include <sqlite3.h>
 #endif
 
 #include <plugin/internal.h>
  * prefix and the prefix with the last character incremented; the suffix query
  * gets the same, but the suffix should be reversed.
  */
+/* clang-format off */
 #define PREFIX_QUERY \
     "SELECT password, drowssap FROM passwords WHERE password BETWEEN ? AND ?;"
 #define SUFFIX_QUERY \
     "SELECT password, drowssap FROM passwords WHERE drowssap BETWEEN ? AND ?;"
+/* clang-format on */
 
 
 /*
@@ -72,12 +74,13 @@ strength_init_sqlite(krb5_context ctx, krb5_pwqual_moddata data UNUSED)
     /* Get CDB dictionary path from krb5.conf. */
     strength_config_string(ctx, "password_dictionary_sqlite", &path);
 
-    /* If it was set, report an error, since we don't have CDB support. */
+    /* If it was set, report an error, since we don't have SQLite support. */
     if (path == NULL)
         return 0;
     free(path);
-    krb5_set_error_message(ctx, KADM5_BAD_SERVER_PARAMS, "SQLite dictionary"
-                           " requested but not built with SQLite support");
+    krb5_set_error_message(ctx, KADM5_BAD_SERVER_PARAMS,
+                           "SQLite dictionary requested but not built with"
+                           " SQLite support");
     return KADM5_BAD_SERVER_PARAMS;
 }
 #endif
@@ -100,7 +103,7 @@ error_sqlite(krb5_context ctx, krb5_pwqual_moddata data, const char *format,
     ssize_t length;
     char *message;
     const char *errmsg;
-    
+
     errmsg = sqlite3_errmsg(data->sqlite);
     va_start(args, format);
     length = vasprintf(&message, format, args);
@@ -163,10 +166,10 @@ common_prefix_length(const char *a, const char *b)
  *
  * To see why the sum of the prefix and suffix length can be longer than the
  * length of the password when the password doesn't match the word, consider
- * the password "aaaa" and the word "aaaaaaaaa"
- * (The prefix length plus the
+ * the password "aaaa" and the word "aaaaaaaaa".  The prefix length plus the
  * suffix length may be greater than the length of the password if the
- * password is an exact match for the word or 
+ * password is an exact match for the word or an initial or final substring of
+ * the word.
  */
 static bool
 match(size_t length, const char *password, const char *drowssap,
@@ -255,7 +258,8 @@ strength_check_sqlite(krb5_context ctx, krb5_pwqual_moddata data,
                       const char *password)
 {
     krb5_error_code code;
-    size_t length, prefix_length, suffix_length;
+    size_t length;
+    int prefix_length, suffix_length;
     char *prefix = NULL;
     char *drowssap = NULL;
     bool found = false;
@@ -269,13 +273,14 @@ strength_check_sqlite(krb5_context ctx, krb5_pwqual_moddata data,
      * Determine the length of the prefix and suffix into which we'll divide
      * the string.  Passwords shorter than two characters cannot be
      * meaningfully checked using this method and cause boundary condition
-     * problems.
+     * problems.  Passwords longer than INT_MAX cannot be passed to the SQLite
+     * library.
      */
     length = strlen(password);
-    if (length < 2)
+    if (length < 2 || length > INT_MAX)
         return 0;
-    prefix_length = length / 2;
-    suffix_length = length - prefix_length;
+    prefix_length = (int) length / 2;
+    suffix_length = (int) length - prefix_length;
 
     /* Obtain the reversed password, used for suffix checks. */
     drowssap = reverse_string(password);
@@ -295,8 +300,8 @@ strength_check_sqlite(krb5_context ctx, krb5_pwqual_moddata data,
         goto fail;
     }
     prefix[prefix_length - 1]++;
-    status = sqlite3_bind_text(data->prefix_query, 2, prefix, prefix_length,
-                               NULL);
+    status =
+        sqlite3_bind_text(data->prefix_query, 2, prefix, prefix_length, NULL);
     if (status != SQLITE_OK) {
         code = error_sqlite(ctx, data, "cannot bind prefix end");
         goto fail;
@@ -363,8 +368,8 @@ strength_check_sqlite(krb5_context ctx, krb5_pwqual_moddata data,
         goto found;
 
     /* No match.  Clean up and return success. */
-    memset(prefix, 0, length);
-    memset(drowssap, 0, length);
+    explicit_bzero(prefix, length);
+    explicit_bzero(drowssap, length);
     free(prefix);
     free(drowssap);
     return 0;
@@ -374,8 +379,9 @@ found:
     code = strength_error_dict(ctx, ERROR_DICT);
 
 fail:
-    memset(prefix, 0, length);
-    memset(drowssap, 0, length);
+    if (prefix != NULL)
+        explicit_bzero(prefix, length);
+    explicit_bzero(drowssap, length);
     free(prefix);
     free(drowssap);
     return code;
index b7895beb02315318f812670932ccc1e449af7503..9c432077cdc58f57e467461a5cae094252f2dd8e 100644 (file)
@@ -22,7 +22,7 @@
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -181,7 +181,7 @@ split_multi_count(const char *string, const char *seps)
  */
 struct vector *
 strength_vector_split_multi(const char *string, const char *seps,
-                        struct vector *vector)
+                            struct vector *vector)
 {
     const char *p, *start;
     size_t i, count;
@@ -206,7 +206,7 @@ strength_vector_split_multi(const char *string, const char *seps,
     for (start = string, p = string, i = 0; *p != '\0'; p++)
         if (strchr(seps, *p) != NULL) {
             if (start != p) {
-                vector->strings[i] = strndup(start, (size_t) (p - start));
+                vector->strings[i] = strndup(start, (size_t)(p - start));
                 if (vector->strings[i] == NULL)
                     goto fail;
                 i++;
@@ -217,7 +217,7 @@ strength_vector_split_multi(const char *string, const char *seps,
 
     /* If there is anything left in the string, we have one more component. */
     if (start != p) {
-        vector->strings[i] = strndup(start, (size_t) (p - start));
+        vector->strings[i] = strndup(start, (size_t)(p - start));
         if (vector->strings[i] == NULL)
             goto fail;
         vector->count++;
index 83fdaa78c33e36aeb9ebcc876baa2e3f1782a321..0451a03ed190ea84356ddc288668a866afbd8403 100644 (file)
@@ -8,14 +8,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006, 2015 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008-2009, 2011, 2013
+ *     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 <config.h>
  * with the system versions.
  */
 #if TESTING
-# undef asprintf
-# undef vasprintf
-# define asprintf test_asprintf
-# define vasprintf test_vasprintf
+#    undef asprintf
+#    undef vasprintf
+#    define asprintf  test_asprintf
+#    define vasprintf test_vasprintf
 int test_asprintf(char **, const char *, ...)
     __attribute__((__format__(printf, 2, 3)));
 int test_vasprintf(char **, const char *, va_list)
index 953e16d569e9365be988eb08671eda2b319f6094..121a7343edd00619ecfcb6c5eacd4eb1f686a7aa 100644 (file)
@@ -9,20 +9,22 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008, 2011, 2013
+ *     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 <portable/macros.h>
 
 /* Prototype to avoid gcc warnings and set visibility. */
-int portable_dummy(void) __attribute__((__visibility__("hidden")));
+int portable_dummy(void) __attribute__((__const__, __visibility__("hidden")));
 
 int
 portable_dummy(void)
index 6acb3a8e3add68a749d441f98e07ee6044612e76..45527cdfbb2243b416d3caf70075744263d47371 100644 (file)
@@ -9,14 +9,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2011, 2013
+ *     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
  */
 
 #ifndef PORTABLE_KADMIN_H
@@ -26,9 +28,9 @@
 
 #include <kadm5/admin.h>
 #ifdef HAVE_KADM5_KADM5_ERR_H
-# include <kadm5/kadm5_err.h>
+#    include <kadm5/kadm5_err.h>
 #else
-# include <kadm5/kadm_err.h>
+#    include <kadm5/kadm_err.h>
 #endif
 
 /*
  * general just in case.)
  */
 #ifndef KADM5_API_VERSION
-# ifdef KADM5_API_VERSION_3
-#  define KADM5_API_VERSION KADM5_API_VERSION_3
-# else
-#  define KADM5_API_VERSION KADM5_API_VERSION_2
-# endif
+#    ifdef KADM5_API_VERSION_3
+#        define KADM5_API_VERSION KADM5_API_VERSION_3
+#    else
+#        define KADM5_API_VERSION KADM5_API_VERSION_2
+#    endif
 #endif
 
 /* Heimdal doesn't define KADM5_PASS_Q_GENERIC. */
 #ifndef KADM5_PASS_Q_GENERIC
-# define KADM5_PASS_Q_GENERIC KADM5_PASS_Q_DICT
+#    define KADM5_PASS_Q_GENERIC KADM5_PASS_Q_DICT
 #endif
 
 /* Heimdal doesn't define KADM5_MISSING_KRB5_CONF_PARAMS. */
 #ifndef KADM5_MISSING_KRB5_CONF_PARAMS
-# define KADM5_MISSING_KRB5_CONF_PARAMS KADM5_MISSING_CONF_PARAMS
+#    define KADM5_MISSING_KRB5_CONF_PARAMS KADM5_MISSING_CONF_PARAMS
 #endif
 
 #endif /* !PORTABLE_KADMIN_H */
index 01993711e142033a1c67b21378dca0a335bb50b6..3632f8b255223f556ca78b531e357ffb0947162e 100644 (file)
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015-2016, 2018 Russ Allbery <eagle@eyrie.org>
+ * 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 <config.h>
 
 /* Figure out what header files to include for error reporting. */
 #if !defined(HAVE_KRB5_GET_ERROR_MESSAGE) && !defined(HAVE_KRB5_GET_ERR_TEXT)
-# if !defined(HAVE_KRB5_GET_ERROR_STRING)
-#  if defined(HAVE_IBM_SVC_KRB5_SVC_H)
-#   include <ibm_svc/krb5_svc.h>
-#  elif defined(HAVE_ET_COM_ERR_H)
-#   include <et/com_err.h>
-#  elif defined(HAVE_KERBEROSV5_COM_ERR_H)
-#   include <kerberosv5/com_err.h>
-#  else
-#   include <com_err.h>
-#  endif
-# endif
+#    if !defined(HAVE_KRB5_GET_ERROR_STRING)
+#        if defined(HAVE_IBM_SVC_KRB5_SVC_H)
+#            include <ibm_svc/krb5_svc.h>
+#        elif defined(HAVE_ET_COM_ERR_H)
+#            include <et/com_err.h>
+#        elif defined(HAVE_KERBEROSV5_COM_ERR_H)
+#            include <kerberosv5/com_err.h>
+#        else
+#            include <com_err.h>
+#        endif
+#    endif
 #endif
 
 /* Used for unused parameters to silence gcc warnings. */
@@ -65,17 +67,17 @@ 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)
+#    if defined(HAVE_KRB5_GET_ERROR_STRING)
     msg = krb5_get_error_string(ctx);
-# elif defined(HAVE_KRB5_GET_ERR_TEXT)
+#    elif defined(HAVE_KRB5_GET_ERR_TEXT)
     msg = krb5_get_err_text(ctx, code);
-# elif defined(HAVE_KRB5_SVC_GET_MSG)
+#    elif defined(HAVE_KRB5_SVC_GET_MSG)
     krb5_svc_get_msg(code, (char **) &msg);
-# else
+#    else
     msg = error_message(code);
-# endif
+#    endif
     if (msg == NULL)
         return error_unknown;
     else
@@ -98,11 +100,11 @@ krb5_free_error_message(krb5_context ctx UNUSED, const char *msg)
 {
     if (msg == error_unknown)
         return;
-# if defined(HAVE_KRB5_GET_ERROR_STRING)
+#    if defined(HAVE_KRB5_GET_ERROR_STRING)
     krb5_free_error_string(ctx, (char *) msg);
-# elif defined(HAVE_KRB5_SVC_GET_MSG)
+#    elif defined(HAVE_KRB5_SVC_GET_MSG)
     krb5_free_string(ctx, (char *) msg);
-# endif
+#    endif
 }
 #endif /* !HAVE_KRB5_FREE_ERROR_MESSAGE */
 
diff --git a/portable/krb5-profile.c b/portable/krb5-profile.c
new file mode 100644 (file)
index 0000000..582e7ac
--- /dev/null
@@ -0,0 +1,237 @@
+/*
+ * Kerberos compatibility functions for AIX's NAS libraries.
+ *
+ * AIX for some reason doesn't provide the krb5_appdefault_* functions, but
+ * does provide the underlying profile library functions (as a separate
+ * libk5profile with a separate k5profile.h header file).
+ *
+ * This file is therefore (apart from the includes, opening and closing
+ * comments, and the spots marked with an rra-c-util comment) a verbatim copy
+ * of src/lib/krb5/krb/appdefault.c from MIT Kerberos 1.4.4.
+ *
+ * The canonical version of this file is maintained in the rra-c-util package,
+ * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
+ *
+ * Copyright 1985-2005 by the Massachusetts Institute of Technology.
+ * For license information, see the end of this file.
+ */
+
+#include <config.h>
+
+#include <krb5.h>
+#ifdef HAVE_K5PROFILE_H
+# include <k5profile.h>
+#endif
+#ifdef HAVE_PROFILE_H
+# include <profile.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+
+ /*xxx Duplicating this is annoying; try to work on a better way.*/
+static const char *const conf_yes[] = {
+       "y", "yes", "true", "t", "1", "on",
+       0,
+};
+
+static const char *const conf_no[] = {
+       "n", "no", "false", "nil", "0", "off",
+       0,
+};
+
+static int conf_boolean(char *s)
+{
+       const char * const *p;
+       for(p=conf_yes; *p; p++) {
+               if (!strcasecmp(*p,s))
+                       return 1;
+       }
+       for(p=conf_no; *p; p++) {
+               if (!strcasecmp(*p,s))
+               return 0;
+       }
+       /* Default to "no" */
+       return 0;
+}
+
+static krb5_error_code appdefault_get(krb5_context context, const char *appname, const krb5_data *realm, const char *option, char **ret_value)
+{
+        profile_t profile;
+        const char *names[5];
+       char **nameval = NULL;
+       krb5_error_code retval;
+       const char * realmstr =  realm?realm->data:NULL;
+
+        /*
+         * rra-c-util: The magic values are internal, so a magic check for the
+         * context struct was removed here.  Call krb5_get_profile if it's
+         * available since the krb5_context struct may be opaque.
+         */
+           if (!context) 
+           return KV5M_CONTEXT;
+
+#ifdef HAVE_KRB5_GET_PROFILE
+            krb5_get_profile(context, &profile);
+#else
+           profile = context->profile;
+#endif
+           
+       /*
+        * Try number one:
+        *
+        * [appdefaults]
+        *      app = {
+        *              SOME.REALM = {
+        *                      option = <boolean>
+        *              }
+        *      }
+        */
+
+       names[0] = "appdefaults";
+       names[1] = appname;
+
+       if (realmstr) {
+               names[2] = realmstr;
+               names[3] = option;
+               names[4] = 0;
+               retval = profile_get_values(profile, names, &nameval);
+               if (retval == 0 && nameval && nameval[0]) {
+                       *ret_value = strdup(nameval[0]);
+                       goto goodbye;
+               }
+       }
+
+       /*
+        * Try number two:
+        *
+        * [appdefaults]
+        *      app = {
+        *              option = <boolean>
+        *      }
+        */
+
+       names[2] = option;
+       names[3] = 0;
+       retval = profile_get_values(profile, names, &nameval);
+       if (retval == 0 && nameval && nameval[0]) {
+               *ret_value = strdup(nameval[0]);
+               goto goodbye;
+       }
+
+       /*
+        * Try number three:
+        *
+        * [appdefaults]
+        *      realm = {
+        *              option = <boolean>
+        */
+       
+       if (realmstr) {
+               names[1] = realmstr;
+               names[2] = option;
+               names[3] = 0;
+               retval = profile_get_values(profile, names, &nameval);
+               if (retval == 0 && nameval && nameval[0]) {
+                       *ret_value = strdup(nameval[0]);
+                       goto goodbye;
+               }
+       }
+
+       /*
+        * Try number four:
+        *
+        * [appdefaults]
+        *      option = <boolean>
+        */
+
+       names[1] = option;
+       names[2] = 0;
+       retval = profile_get_values(profile, names, &nameval);
+       if (retval == 0 && nameval && nameval[0]) {
+               *ret_value = strdup(nameval[0]);
+       } else {
+               return retval;
+       }
+
+goodbye:
+       if (nameval) {
+               char **cpp;
+               for (cpp = nameval; *cpp; cpp++)
+                       free(*cpp);
+               free(nameval);
+       }
+       return 0;
+}
+
+void KRB5_CALLCONV 
+krb5_appdefault_boolean(krb5_context context, const char *appname, const krb5_data *realm, const char *option, int default_value, int *ret_value)
+{
+       char *string = NULL;
+       krb5_error_code retval;
+
+       retval = appdefault_get(context, appname, realm, option, &string);
+
+       if (! retval && string) {
+               *ret_value = conf_boolean(string);
+               free(string);
+       } else
+               *ret_value = default_value;
+}
+
+void KRB5_CALLCONV 
+krb5_appdefault_string(krb5_context context, const char *appname, const krb5_data *realm, const char *option, const char *default_value, char **ret_value)
+{
+       krb5_error_code retval;
+       char *string;
+
+       retval = appdefault_get(context, appname, realm, option, &string);
+
+       if (! retval && string) {
+               *ret_value = string;
+       } else {
+               *ret_value = strdup(default_value);
+       }
+}
+
+/*
+ * Copyright (C) 1985-2005 by the Massachusetts Institute of Technology.
+ * All rights reserved.
+ * 
+ * Export of this software from the United States of America may require
+ * a specific license from the United States Government.  It is the
+ * responsibility of any person or organization contemplating export to
+ * obtain such a license before exporting.
+ * 
+ * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
+ * distribute this software and its documentation for any purpose and
+ * without fee is hereby granted, provided that the above copyright
+ * notice appear in all copies and that both that copyright notice and
+ * this permission notice appear in supporting documentation, and that
+ * the name of M.I.T. not be used in advertising or publicity pertaining
+ * to distribution of the software without specific, written prior
+ * permission.  Furthermore if you modify this software you must label
+ * your software as modified software and not distribute it in such a
+ * fashion that it might be confused with the original MIT software.
+ * M.I.T. makes no representations about the suitability of this software
+ * for any purpose.  It is provided "as is" without express or implied
+ * warranty.
+ * 
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ * 
+ * Individual source code files are copyright MIT, Cygnus Support,
+ * OpenVision, Oracle, Sun Soft, FundsXpress, and others.
+ * 
+ * Project Athena, Athena, Athena MUSE, Discuss, Hesiod, Kerberos, Moira,
+ * and Zephyr are trademarks of the Massachusetts Institute of Technology
+ * (MIT).  No commercial use of these trademarks may be made without
+ * prior written permission of MIT.
+ * 
+ * "Commercial use" means use of a name in a product or other for-profit
+ * manner.  It does NOT prevent a commercial firm from referring to the
+ * MIT trademarks in order to convey information (although in doing so,
+ * recognition of their trademark status should be given).
+ *
+ * There is no SPDX-License-Identifier registered for this license.
+ */
index 59562721651cbab78315665540f4edb14485d69e..73ae433a0e7460e2591cb3b6990c7f0c12796b58 100644 (file)
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015, 2017, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2010-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
  */
 
 #ifndef PORTABLE_KRB5_H
  * stripped-down version of config.h with a different name.
  */
 #ifndef CONFIG_H_INCLUDED
-# include <config.h>
+#    include <config.h>
 #endif
 #include <portable/macros.h>
 
 #if defined(HAVE_KRB5_H)
-# include <krb5.h>
+#    include <krb5.h>
 #elif defined(HAVE_KERBEROSV5_KRB5_H)
-# include <kerberosv5/krb5.h>
+#    include <kerberosv5/krb5.h>
 #else
-# include <krb5/krb5.h>
+#    include <krb5/krb5.h>
 #endif
 #include <stdlib.h>
 
@@ -56,13 +58,25 @@ BEGIN_DECLS
 /* Default to a hidden visibility for all portability functions. */
 #pragma GCC visibility push(hidden)
 
+/*
+ * AIX included Kerberos includes the profile library but not the
+ * krb5_appdefault functions, so we provide replacements that we have to
+ * prototype.
+ */
+#ifndef HAVE_KRB5_APPDEFAULT_STRING
+void krb5_appdefault_boolean(krb5_context, const char *, const krb5_data *,
+                             const char *, int, int *);
+void krb5_appdefault_string(krb5_context, const char *, const krb5_data *,
+                            const char *, const char *, char **);
+#endif
+
 /*
  * MIT-specific.  The Heimdal documentation says to use free(), but that
  * doesn't actually make sense since the memory is allocated inside the
  * Kerberos library.  Use krb5_xfree instead.
  */
 #ifndef HAVE_KRB5_FREE_DEFAULT_REALM
-# define krb5_free_default_realm(c, r) krb5_xfree(r)
+#    define krb5_free_default_realm(c, r) krb5_xfree(r)
 #endif
 
 /*
@@ -73,16 +87,16 @@ BEGIN_DECLS
  * really do about it.
  */
 #ifndef HAVE_KRB5_FREE_STRING
-# ifdef HAVE_KRB5_XFREE
-#  define krb5_free_string(c, s) krb5_xfree(s)
-# else
-#  define krb5_free_string(c, s) free(s)
-# endif
+#    ifdef HAVE_KRB5_XFREE
+#        define krb5_free_string(c, s) krb5_xfree(s)
+#    else
+#        define krb5_free_string(c, s) free(s)
+#    endif
 #endif
 
 /* Heimdal: krb5_xfree, MIT: krb5_free_unparsed_name. */
 #ifdef HAVE_KRB5_XFREE
-# define krb5_free_unparsed_name(c, p) krb5_xfree(p)
+#    define krb5_free_unparsed_name(c, p) krb5_xfree(p)
 #endif
 
 /*
@@ -111,16 +125,17 @@ krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context,
                                               krb5_get_init_creds_opt **);
 #endif
 #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE
-# ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS
-#  define krb5_get_init_creds_opt_free(c, o) krb5_get_init_creds_opt_free(o)
-# endif
+#    ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS
+#        define krb5_get_init_creds_opt_free(c, o) \
+            krb5_get_init_creds_opt_free(o)
+#    endif
 #else
-# define krb5_get_init_creds_opt_free(c, o) free(o)
+#    define krb5_get_init_creds_opt_free(c, o) free(o)
 #endif
 
 /* Heimdal-specific. */
 #ifndef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_DEFAULT_FLAGS
-# define krb5_get_init_creds_opt_set_default_flags(c, p, r, o) /* empty */
+#    define krb5_get_init_creds_opt_set_default_flags(c, p, r, o) /* empty */
 #endif
 
 /*
@@ -129,7 +144,7 @@ krb5_error_code krb5_get_init_creds_opt_alloc(krb5_context,
  * present in older MIT Kerberos libraries but not prototyped.
  */
 #if !HAVE_DECL_KRB5_KT_FREE_ENTRY
-# define krb5_kt_free_entry(c, e) krb5_free_keytab_entry_contents((c), (e))
+#    define krb5_kt_free_entry(c, e) krb5_free_keytab_entry_contents((c), (e))
 #endif
 
 /*
index 810a1f8b10fe961b456d0df2f65a50f3713e2a48..5d77fb75af7bd8465308dc4cac47d4f53a9ab08f 100644 (file)
@@ -5,14 +5,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2015 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008, 2011-2012
+ *     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
  */
 
 #ifndef PORTABLE_MACROS_H
@@ -24,9 +26,9 @@
  * (to avoid confusion with other macros).
  */
 #ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __attribute__(spec)   /* empty */
-# endif
+#    if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#        define __attribute__(spec) /* empty */
+#    endif
 #endif
 
 /*
  * variadic macro support.
  */
 #if !defined(__attribute__) && !defined(__alloc_size__)
-# if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)) \
-    && !defined(__clang__)
-#  define __alloc_size__(spec, args...) /* empty */
-# endif
+#    if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)) \
+        && !defined(__clang__)
+#        define __alloc_size__(spec, args...) /* empty */
+#    endif
 #endif
 
 /*
@@ -50,7 +52,7 @@
  * compilation context, but there's no push and pop available.
  */
 #if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__))
-# pragma GCC diagnostic ignored "-Wattributes"
+#    pragma GCC diagnostic ignored "-Wattributes"
 #endif
 
 /*
 #undef BEGIN_DECLS
 #undef END_DECLS
 #ifdef __cplusplus
-# define BEGIN_DECLS    extern "C" {
-# define END_DECLS      }
+#    define BEGIN_DECLS extern "C" {
+#    define END_DECLS   }
 #else
-# define BEGIN_DECLS    /* empty */
-# define END_DECLS      /* empty */
+#    define BEGIN_DECLS /* empty */
+#    define END_DECLS   /* empty */
 #endif
 
 #endif /* !PORTABLE_MACROS_H */
index 2d4268180815a5d144a31d1f2320ba37fc40980b..ebaefc1b5ee6ebd91732b364124654edde962251 100644 (file)
@@ -8,14 +8,15 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009, 2011, 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 <config.h>
@@ -24,7 +25,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+#    include <sys/time.h>
 #endif
 #include <time.h>
 
@@ -34,8 +35,8 @@
  * another name.
  */
 #if TESTING
-# undef mkstemp
-# define mkstemp test_mkstemp
+#    undef mkstemp
+#    define mkstemp test_mkstemp
 int test_mkstemp(char *);
 #endif
 
index bfa85e79ec350f5716afb2da40092a5d653ea063..635041ebe22beb8e3ce3842670ead1e3c2684812 100644 (file)
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 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 <config.h>
@@ -31,8 +33,8 @@
  * it to another name.
  */
 #if TESTING
-# undef reallocarray
-# define reallocarray test_reallocarray
+#    undef reallocarray
+#    define reallocarray test_reallocarray
 void *test_reallocarray(void *, size_t, size_t);
 #endif
 
@@ -52,5 +54,11 @@ reallocarray(void *ptr, size_t nmemb, size_t size)
             errno = ENOMEM;
             return NULL;
         }
+
+    /* Avoid a zero-size allocation. */
+    if (nmemb == 0 || size == 0) {
+        nmemb = 1;
+        size = 1;
+    }
     return realloc(ptr, nmemb * size);
 }
index 3aaf3fd224714f78d820ac337fc2482467db4c10..a22e4e47d24757d9443d850a4057699db588c720 100644 (file)
 # define vsnprintf test_vsnprintf
 #endif
 
+/*
+ * __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7
+ * could you use the __format__ form of the attributes, which is what we use
+ * (to avoid confusion with other macros).
+ */
+#ifndef __attribute__
+#    if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#        define __attribute__(spec) /* empty */
+#    endif
+#endif
+
+/*
+ * Older Clang doesn't support __attribute__((fallthrough)) properly and
+ * complains about the empty statement that it is decorating.  Suppress that
+ * warning.  Also suppress warnings about unknown attributes to handle older
+ * Clang versions.
+ */
+#if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__))
+#    pragma GCC diagnostic ignored "-Wattributes"
+#    pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
+/* Specific to rra-c-util, but only when debugging is enabled. */
+#ifdef DEBUG_SNPRINTF
+# include <util/messages.h>
+#endif
+
 /*
  * Copyright Patrick Powell 1995
  * This code is based on code written by Patrick Powell (papowell@astart.com)
  * It may be used for any purpose as long as this notice remains intact
  * on all source code distributions
+ *
+ * There is no SPDX-License-Identifier registered for this license.
  */
 
 /**************************************************************
@@ -57,7 +86,7 @@
  *    probably requires libm on most operating systems.  Don't yet
  *    support the exponent (e,E) and sigfig (g,G).  Also, fmtint()
  *    was pretty badly broken, it just wasn't being exercised in ways
- *    which showed it, so that's been fixed.  Also, formated the code
+ *    which showed it, so that's been fixed.  Also, formatted the code
  *    to mutt conventions, and removed dead code left over from the
  *    original.  Also, there is now a builtin-test, just compile with:
  *           gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
  *    fixed return value to comply with C99
  *    fixed handling of snprintf(NULL, ...)
  *    added explicit casts for double to long long int conversion
+ *    fixed various warnings with GCC 7
+ *    fixed various warnings with Clang
  *
- *  Hrvoje Niksic <hniksic@arsdigita.com> 2000-11-04
+ *  Hrvoje Niksic <hniksic@xemacs.org> 2000-11-04
+ *    include <config.h> instead of "config.h".
+ *    moved TEST_SNPRINTF stuff out of HAVE_SNPRINTF ifdef.
  *    include <stdio.h> for NULL.
- *    added support for long long.
+ *    added support and test cases for long long.
  *    don't declare argument types to (v)snprintf if stdarg is not used.
+ *    use int instead of short int as 2nd arg to va_arg.
+ *
+ *  alexk (INN) 2002-08-21
+ *    use LLONG in fmtfp to handle more characters during floating
+ *    point conversion.
+ *
+ *  herb (Samba) 2002-12-19
+ *    actually print args for %g and %e
  *
  *  Hrvoje Niksic <hniksic@xemacs.org> 2005-04-15
  *    use the PARAMS macro to handle prototypes.
 /* varargs declarations: */
 
 #include <stdarg.h>
-#define HAVE_STDARGS    /* let's hope that works everywhere (mj) */
-#define VA_LOCAL_DECL   va_list ap
-#define VA_START(f)     va_start(ap, f)
-#define VA_SHIFT(v,t)  ;   /* no-op for ANSI */
-#define VA_END          va_end(ap)
 
 /* Assume all compilers support long double, per Autoconf documentation. */
 #define LDOUBLE long double
@@ -352,6 +388,8 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
        break;
       case 'X':
        flags |= DP_F_UP;
+        __attribute__((fallthrough));
+        /* fall through */
       case 'x':
        flags |= DP_F_UNSIGNED;
        if (cflags == DP_C_SHORT)
@@ -368,33 +406,38 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
        if (cflags == DP_C_LDOUBLE)
          fvalue = va_arg (args, LDOUBLE);
        else
-         fvalue = va_arg (args, double);
+         fvalue = (LDOUBLE) va_arg (args, double);
        total += fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
        break;
       case 'E':
        flags |= DP_F_UP;
+        __attribute__((fallthrough));
+        /* fall through */
       case 'e':
        if (cflags == DP_C_LDOUBLE)
          fvalue = va_arg (args, LDOUBLE);
        else
-         fvalue = va_arg (args, double);
+         fvalue = (LDOUBLE) va_arg (args, double);
         total += fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
        break;
       case 'G':
        flags |= DP_F_UP;
+        __attribute__((fallthrough));
+        /* fall through */
       case 'g':
         flags |= DP_F_FP_G;
        if (cflags == DP_C_LDOUBLE)
          fvalue = va_arg (args, LDOUBLE);
        else
-         fvalue = va_arg (args, double);
+         fvalue = (LDOUBLE) va_arg (args, double);
        if (max == 0)
          /* C99 says: if precision [for %g] is zero, it is taken as one */
          max = 1;
        total += fmtfp (buffer, &currlen, maxlen, fvalue, min, max, flags);
        break;
       case 'c':
-       total += dopr_outch (buffer, &currlen, maxlen, va_arg (args, int));
+       total += dopr_outch (buffer, &currlen, maxlen,
+                            (char) va_arg (args, int));
        break;
       case 's':
        strvalue = va_arg (args, char *);
@@ -410,7 +453,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
        {
          short int *num;
          num = va_arg (args, short int *);
-         *num = currlen;
+         *num = (short) currlen;
         } 
        else if (cflags == DP_C_LONG) 
        {
@@ -428,7 +471,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
        {
          int *num;
          num = va_arg (args, int *);
-         *num = currlen;
+         *num = (int) currlen;
         }
        break;
       case '%':
@@ -477,7 +520,7 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
   }
 
   if (max < 0)
-    strln = strlen (value);
+    strln = (int) strlen (value);
   else
     /* When precision is specified, don't read VALUE past precision. */
     /*strln = strnlen (value, max);*/
@@ -511,7 +554,7 @@ static int fmtstr (char *buffer, size_t *currlen, size_t maxlen,
 static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
                   LLONG value, int base, int min, int max, int flags)
 {
-  int signvalue = 0;
+  char signvalue = 0;
   unsigned LLONG uvalue;
   char convert[24];
   unsigned int place = 0;
@@ -565,8 +608,8 @@ static int fmtint (char *buffer, size_t *currlen, size_t maxlen,
     spadlen = -spadlen; /* Left Justifty */
 
 #ifdef DEBUG_SNPRINTF
-  dprint (1, (debugfile, "zpad: %d, spad: %d, min: %d, max: %d, place: %d\n",
-      zpadlen, spadlen, min, max, place));
+  debug ("zpad: %d, spad: %d, min: %d, max: %d, place: %u\n",
+         zpadlen, spadlen, min, max, place);
 #endif
 
   /* Spaces */
@@ -613,7 +656,7 @@ static LDOUBLE abs_val (LDOUBLE value)
   return result;
 }
 
-static LLONG pow10_int (int exp)
+static LLONG pow10_int (unsigned int exp)
 {
   LDOUBLE result = 1;
 
@@ -632,23 +675,31 @@ static LLONG round_int (LDOUBLE value)
 
   intpart = (LLONG) value;
   value = value - intpart;
-  if (value >= 0.5)
+  if (value >= (LDOUBLE) 0.5)
     intpart++;
 
   return intpart;
 }
 
+/*
+ * GCC 7.1 issues this warning at the point of the function definition header
+ * (not in any actual code), and I can't figure out what's triggering it since
+ * the comparison form doesn't appear anywhere in this code.  Since this is
+ * rarely-used portability code, suppress the warning.
+ */
+#pragma GCC diagnostic ignored "-Wstrict-overflow"
+
 static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
                  LDOUBLE fvalue, int min, int max, int flags)
 {
-  int signvalue = 0;
+  char signvalue = 0;
   LDOUBLE ufvalue;
   char iconvert[24];
   char fconvert[24];
   size_t iplace = 0;
   size_t fplace = 0;
-  int padlen = 0; /* amount to pad */
-  int zpadlen = 0; 
+  long padlen = 0; /* amount to pad */
+  long zpadlen = 0; 
   int total = 0;
   LLONG intpart;
   LLONG fracpart;
@@ -688,7 +739,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
       if (intpart != 0)
        {
          /* For each digit of INTPART, print one less fractional digit. */
-         LLONG temp = intpart;
+         LLONG temp;
          for (temp = intpart; temp != 0; temp /= 10)
            --max;
          if (max < 0)
@@ -700,7 +751,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
             fractional digit. */
          LDOUBLE temp;
          if (ufvalue > 0)
-           for (temp = ufvalue; temp < 0.1; temp *= 10)
+           for (temp = ufvalue; temp < (LDOUBLE) 0.1; temp *= 10)
              ++max;
        }
     }
@@ -747,12 +798,16 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
       }
 
 #ifdef DEBUG_SNPRINTF
-  dprint (1, (debugfile, "fmtfp: %f =? %d.%d\n", fvalue, intpart, fracpart));
+# ifdef HAVE_LONG_LONG_INT
+  debug ("fmtfp: %Lf =? %lld.%lld\n", fvalue, intpart, fracpart);
+# else
+  debug ("fmtfp: %Lf =? %ld.%ld\n", fvalue, intpart, fracpart);
+# endif
 #endif
 
   /* Convert integer part */
   do {
-    iconvert[iplace++] = '0' + intpart % 10;
+    iconvert[iplace++] = (char) ('0' + (intpart % 10));
     intpart = (intpart / 10);
   } while(intpart && (iplace < sizeof(iconvert)));
   if (iplace == sizeof(iconvert)) iplace--;
@@ -760,7 +815,7 @@ static int fmtfp (char *buffer, size_t *currlen, size_t maxlen,
 
   /* Convert fractional part */
   do {
-    fconvert[fplace++] = '0' + fracpart % 10;
+    fconvert[fplace++] = (char) ('0' + (fracpart % 10));
     fracpart = (fracpart / 10);
   } while(fracpart && (fplace < sizeof(fconvert)));
   while (leadingfrac0s-- > 0 && fplace < sizeof(fconvert))
@@ -848,27 +903,14 @@ int vsnprintf (char *str, size_t count, const char *fmt, va_list args)
   return dopr(str, count, fmt, args);
 }
 
-/* VARARGS3 */
-#ifdef HAVE_STDARGS
-int snprintf (char *str,size_t count,const char *fmt,...)
-#else
-int snprintf (va_alist) va_dcl
-#endif
+int snprintf (char *str, size_t count, const char *fmt,...)
 {
-#ifndef HAVE_STDARGS
-  char *str;
-  size_t count;
-  char *fmt;
-#endif
-  VA_LOCAL_DECL;
+  va_list ap;
   int total;
     
-  VA_START (fmt);
-  VA_SHIFT (str, char *);
-  VA_SHIFT (count, size_t );
-  VA_SHIFT (fmt, char *);
+  va_start(ap, fmt);
   total = vsnprintf(str, count, fmt, ap);
-  VA_END;
+  va_end(ap);
   return total;
 }
 
@@ -945,5 +987,6 @@ int main (void)
       num++;
     }
   printf ("%d tests failed out of %d.\n", fail, num);
+  return 0;
 }
-#endif /* SNPRINTF_TEST */
+#endif /* TEST_SNPRINTF */
index fb317a90d8c8c9752b25b963e50bb3e7bf734ed8..749052a61aa9a47c9f2682f27f9173807b7d12fd 100644 (file)
@@ -9,14 +9,15 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008, 2011
+ *     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
  */
 
 #ifndef PORTABLE_STDBOOL_H
  * stripped-down version of config.h with a different name.
  */
 #ifndef CONFIG_H_INCLUDED
-# include <config.h>
+#    include <config.h>
 #endif
 
 #if HAVE_STDBOOL_H
-# include <stdbool.h>
+#    include <stdbool.h>
 #else
-# if HAVE__BOOL
-#  define bool _Bool
-# else
-#  ifdef __cplusplus
+#    if HAVE__BOOL
+#        define bool _Bool
+#    else
+#        ifdef __cplusplus
 typedef bool _Bool;
-#  elif _WIN32
-#   include <windef.h>
-#   define bool BOOL
-#  else
+#        elif _WIN32
+#            include <windef.h>
+#            define bool BOOL
+#        else
 typedef unsigned char _Bool;
-#   define bool _Bool
-#  endif
-# endif
-# define false 0
-# define true  1
-# define __bool_true_false_are_defined 1
+#            define bool _Bool
+#        endif
+#    endif
+#    define false 0
+#    define true 1
+#    define __bool_true_false_are_defined 1
 #endif
 
 /*
@@ -56,7 +57,7 @@ typedef unsigned char _Bool;
  * fail.  Only of interest for programs that also include Perl headers.
  */
 #ifndef HAS_BOOL
-# define HAS_BOOL 1
+#    define HAS_BOOL 1
 #endif
 
 #endif /* !PORTABLE_STDBOOL_H */
index 1a0c8166130b614e1ccd5cff7f26ed3f88e0e7a0..9ddcbc130c3360f3465a3202821a7e9aff67b328 100644 (file)
@@ -5,14 +5,15 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2011-2012
+ *     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 <config.h>
@@ -25,8 +26,8 @@
  * with the system versions.
  */
 #if TESTING
-# undef strndup
-# define strndup test_strndup
+#    undef strndup
+#    define strndup test_strndup
 char *test_strndup(const char *, size_t);
 #endif
 
@@ -43,7 +44,7 @@ strndup(const char *s, size_t n)
     }
 
     /* Don't assume that the source string is nul-terminated. */
-    for (p = s; (size_t) (p - s) < n && *p != '\0'; p++)
+    for (p = s; (size_t)(p - s) < n && *p != '\0'; p++)
         ;
     length = p - s;
     copy = malloc(length + 1);
index a35df767d26381e21cfbb89c28488a946130726c..e98d5642a2ddc14f80b6f724f6a08fd98813425a 100644 (file)
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2014, 2016, 2018, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2011, 2013-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
  */
 
 #ifndef PORTABLE_SYSTEM_H
 
 /* A set of standard ANSI C headers.  We don't care about pre-ANSI systems. */
 #if HAVE_INTTYPES_H
-# include <inttypes.h>
+#    include <inttypes.h>
 #endif
 #include <limits.h>
 #include <stdarg.h>
 #include <stddef.h>
 #if HAVE_STDINT_H
-# include <stdint.h>
+#    include <stdint.h>
 #endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #if HAVE_STRINGS_H
-# include <strings.h>
+#    include <strings.h>
 #endif
 #include <sys/types.h>
 #if HAVE_UNISTD_H
-# include <unistd.h>
+#    include <unistd.h>
 #endif
 
 /* SCO OpenServer gets int32_t from here. */
 #if HAVE_SYS_BITYPES_H
-# include <sys/bitypes.h>
+#    include <sys/bitypes.h>
 #endif
 
 /* Get the bool type. */
@@ -75,7 +77,7 @@
 
 /* Windows provides snprintf under a different name. */
 #ifdef _WIN32
-# define snprintf _snprintf
+#    define snprintf _snprintf
 #endif
 
 /* Windows does not define ssize_t. */
@@ -88,9 +90,9 @@ typedef ptrdiff_t ssize_t;
  * been defined, all the rest almost certainly have.
  */
 #ifndef STDIN_FILENO
-# define STDIN_FILENO  0
-# define STDOUT_FILENO 1
-# define STDERR_FILENO 2
+#    define STDIN_FILENO  0
+#    define STDOUT_FILENO 1
+#    define STDERR_FILENO 2
 #endif
 
 /*
@@ -98,11 +100,21 @@ typedef ptrdiff_t ssize_t;
  * Autoconf manual, memcpy is a generally portable fallback.
  */
 #ifndef va_copy
-# ifdef __va_copy
-#  define va_copy(d, s) __va_copy((d), (s))
-# else
-#  define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
-# endif
+#    ifdef __va_copy
+#        define va_copy(d, s) __va_copy((d), (s))
+#    else
+#        define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list))
+#    endif
+#endif
+
+/*
+ * If explicit_bzero is not available, fall back on memset.  This does NOT
+ * provide any of the security guarantees of explicit_bzero and will probably
+ * be optimized away by the compiler.  It just ensures that code will compile
+ * and function on systems without explicit_bzero.
+ */
+#if !HAVE_EXPLICIT_BZERO
+#    define explicit_bzero(s, n) memset((s), 0, (n))
 #endif
 
 BEGIN_DECLS
@@ -118,14 +130,16 @@ BEGIN_DECLS
 #if !HAVE_ASPRINTF
 extern int asprintf(char **, const char *, ...)
     __attribute__((__format__(printf, 2, 3)));
-extern int vasprintf(char **, const char *, va_list);
+extern int vasprintf(char **, const char *, va_list)
+    __attribute__((__format__(printf, 2, 0)));
 #endif
 #if !HAVE_DECL_SNPRINTF
 extern int snprintf(char *, size_t, const char *, ...)
     __attribute__((__format__(printf, 3, 4)));
 #endif
 #if !HAVE_DECL_VSNPRINTF
-extern int vsnprintf(char *, size_t, const char *, va_list);
+extern int vsnprintf(char *, size_t, const char *, va_list)
+    __attribute__((__format__(printf, 3, 0)));
 #endif
 #if !HAVE_MKSTEMP
 extern int mkstemp(char *);
index e31a47d80d14a592f1943fc686dd5f99f5a2db59..186d2d5699b173f0f1e4f9f53fb00c274beedd76 100644 (file)
@@ -248,3 +248,5 @@ License
     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
index b2ff5f621c5ebc6b26ea84684fb957d8efbeaca2..a596aa97015a7c2190263a069f80b800be5e9eca 100644 (file)
@@ -1,20 +1,36 @@
+# Test list for krb5-strength.  -*- conf -*-
+#
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
+# Copyright 2009-2010, 2013-2014
+#     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.
+#
+# SPDX-License-Identifier: FSFAP
+
 docs/pod
 docs/pod-spelling
-docs/urls
-plugin/heimdal
-plugin/mit
+docs/spdx-license
+plugin/heimdal          valgrind
+plugin/mit              valgrind
 perl/critic
 perl/minimum-version
 perl/strict
-portable/asprintf
-portable/mkstemp
-portable/snprintf
-portable/strndup
+portable/asprintf       valgrind
+portable/mkstemp        valgrind
+portable/snprintf       valgrind
+portable/strndup        valgrind
+style/obsolete-strings
 tools/heimdal-history
 tools/heimdal-strength
 tools/wordlist
 tools/wordlist-cdb
 tools/wordlist-sqlite
-util/messages
-util/messages-krb5
+util/messages           valgrind
+util/messages-krb5      valgrind
 util/xmalloc
+valgrind/logs
diff --git a/tests/data/cppcheck.supp b/tests/data/cppcheck.supp
new file mode 100644 (file)
index 0000000..442c431
--- /dev/null
@@ -0,0 +1,55 @@
+// Suppressions file for cppcheck.  -*- conf -*-
+//
+// This includes suppressions for all of my projects, including files that
+// aren't in rra-c-util, for ease of sharing between projects.  The ones that
+// don't apply to a particular project should hopefully be harmless.
+//
+// To determine the correct suppression to add for a new error, run cppcheck
+// with the --xml flag and then add a suppression for the error id, file
+// location, and line.
+//
+// Copyright 2018-2020 Russ Allbery <eagle@eyrie.org>
+//
+// 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
+
+// I like declaring variables at the top of a function rather than cluttering
+// every if and loop body with declarations.
+variableScope
+
+// strlen of a constant string is more maintainable code than hard-coding the
+// string length.
+constArgument:tests/runtests.c:804
+
+// False positive due to recursive function.
+knownConditionTrueFalse:portable/getopt.c:146
+
+// False positive since the string comes from a command-line define.
+knownConditionTrueFalse:tests/tap/remctl.c:79
+
+// Stored in the returned ai struct, but cppcheck can't see the assignment
+// because of the struct sockaddr * cast.
+memleak:portable/getaddrinfo.c:236
+
+// Bug in cppcheck 1.89.  The address of this variable is passed to a Windows
+// function (albeit through a cast).
+nullPointer:portable/winsock.c:61
+
+// Setting the variable to NULL explicitly after deallocation.
+redundantAssignment:tests/pam-util/options-t.c
+
+// (remctl) Bug in cppcheck 1.89.  The address of these variables are passed
+// to a PHP function.
+uninitvar:php/php_remctl.c:119
+uninitvar:php/php_remctl.c:123
+uninitvar:php/php_remctl.c:315
+uninitvar:php/php5_remctl.c:125
+uninitvar:php/php5_remctl.c:129
+uninitvar:php/php5_remctl.c:321
+
+// (pam-krb5) cppcheck doesn't recognize the unused attribute on labels.
+unusedLabel:module/auth.c:895
index abff6d11a1a0e2ccbdf67ef77eaab9a0874b11e1..32655c2e61a05c987e4bb4c2a14ced645d6b0a91 100755 (executable)
@@ -8,7 +8,7 @@
 # Copyright 2009, 2013
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 set -e
 
index 90da89d895a760c2e96204fcae3696dfea39137d..127c8237d55649abfe4f604385943aaf6225e6ec 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test cdb_tests[];
 const struct password_test cdb_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test cdb_tests[] = {
         "known good password",
         0,
         NULL,
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test cdb_tests[] = {
         "password",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test cdb_tests[] = {
         "bitterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test cdb_tests[] = {
         "1bitterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test cdb_tests[] = {
         "bitterbane1",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test cdb_tests[] = {
         "abbitterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test cdb_tests[] = {
         "bitterbane12",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test cdb_tests[] = {
         "'bitterbane'",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -85,5 +96,6 @@ const struct password_test cdb_tests[] = {
         "bitterbane123",
         0,
         NULL,
+        0,
     },
 };
index 7f028af4c459fffbd71e109c8ae8b5712a05312f..6b70a0fd73b400f3634e049f05a6ba816cebeebf 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test classes_tests[];
 const struct password_test classes_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test classes_tests[] = {
         "PASSWORD98!",
         KADM5_PASS_Q_CLASS,
         "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test classes_tests[] = {
         "password98!",
         KADM5_PASS_Q_CLASS,
         "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!",
         KADM5_PASS_Q_CLASS,
         "Password must contain a number",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9",
         KADM5_PASS_Q_CLASS,
         "Password must contain a space or punctuation character",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!",
         0,
         NULL,
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9",
         0,
         NULL,
+        0,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test classes_tests[] = {
         "PASSWORD98!WORD",
         KADM5_PASS_Q_CLASS,
         "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test classes_tests[] = {
         "password98!word",
         KADM5_PASS_Q_CLASS,
         "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -85,6 +96,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!word",
         KADM5_PASS_Q_CLASS,
         "Password must contain a number",
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9w",
         0,
         NULL,
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -109,6 +123,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -117,6 +132,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9word",
         0,
         NULL,
+        0,
     },
     {
 
@@ -125,6 +141,7 @@ const struct password_test classes_tests[] = {
         "PASSWORD98!WORDWORD",
         KADM5_PASS_Q_CLASS,
         "Password must contain a lowercase letter",
+        0,
     },
     {
 
@@ -133,6 +150,7 @@ const struct password_test classes_tests[] = {
         "password98!wordword",
         KADM5_PASS_Q_CLASS,
         "Password must contain an uppercase letter",
+        0,
     },
     {
 
@@ -141,6 +159,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -149,6 +168,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -157,6 +177,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -165,6 +186,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -173,6 +195,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9wordword",
         0,
         NULL,
+        0,
     },
     {
 
@@ -181,6 +204,7 @@ const struct password_test classes_tests[] = {
         "PASSWORD98!WORDWORDW",
         0,
         NULL,
+        0,
     },
     {
 
@@ -189,6 +213,7 @@ const struct password_test classes_tests[] = {
         "password98!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -197,6 +222,7 @@ const struct password_test classes_tests[] = {
         "passwordXX!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -205,6 +231,7 @@ const struct password_test classes_tests[] = {
         "passwordXX9wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -213,6 +240,7 @@ const struct password_test classes_tests[] = {
         "passwordX9!wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -221,6 +249,7 @@ const struct password_test classes_tests[] = {
         "pass wordX9wordwordw",
         0,
         NULL,
+        0,
     },
     {
 
@@ -229,6 +258,7 @@ const struct password_test classes_tests[] = {
         "alllowercasewithclassreq",
         KADM5_PASS_Q_CLASS,
         "Password must contain 3 types of characters (lowercase, uppercase, numbers, symbols)",
+        0,
     },
     {
 
@@ -237,6 +267,7 @@ const struct password_test classes_tests[] = {
         "LowerUprcasewithclassreq",
         KADM5_PASS_Q_CLASS,
         "Password must contain 3 types of characters (lowercase, uppercase, numbers, symbols)",
+        0,
     },
     {
 
@@ -245,6 +276,7 @@ const struct password_test classes_tests[] = {
         "LowerUp!casewithclassreq",
         0,
         NULL,
+        0,
     },
     {
 
@@ -253,5 +285,6 @@ const struct password_test classes_tests[] = {
         "alllowercasewithclassreqr",
         0,
         NULL,
+        0,
     },
 };
index de92292c18b32fe3806fff91b243049b34db9240..c974cf772132234650a27c63fee1241d643690bc 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test cracklib_tests[];
 const struct password_test cracklib_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test cracklib_tests[] = {
         "known good password",
         0,
         NULL,
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test cracklib_tests[] = {
         "password",
         KADM5_PASS_Q_GENERIC,
         "it is based on a dictionary word",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test cracklib_tests[] = {
         "bitterbane",
         KADM5_PASS_Q_GENERIC,
         "it is based on a dictionary word",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test cracklib_tests[] = {
         "stanfordstanford",
         KADM5_PASS_Q_GENERIC,
         "it is based on a (duplicated) dictionary word",
+        1,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test cracklib_tests[] = {
         "enabrettib",
         KADM5_PASS_Q_GENERIC,
         "it is based on a (reversed) dictionary word",
+        1,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test cracklib_tests[] = {
         "dfareas",
         KADM5_PASS_Q_GENERIC,
         "it is too short",
+        1,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test cracklib_tests[] = {
         "food",
         KADM5_PASS_Q_GENERIC,
         "it is too short",
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test cracklib_tests[] = {
         "foo",
         KADM5_PASS_Q_GENERIC,
         "it is WAY too short",
+        0,
     },
     {
 
@@ -85,6 +96,7 @@ const struct password_test cracklib_tests[] = {
         "",
         KADM5_PASS_Q_GENERIC,
         "it is WAY too short",
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test cracklib_tests[] = {
         "                        ",
         KADM5_PASS_Q_GENERIC,
         "it does not contain enough DIFFERENT characters",
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test cracklib_tests[] = {
         "abcdefghi",
         KADM5_PASS_Q_GENERIC,
         "it is too simplistic/systematic",
+        0,
     },
     {
 
@@ -109,6 +123,7 @@ const struct password_test cracklib_tests[] = {
         "22413411",
         KADM5_PASS_Q_GENERIC,
         "it does not contain enough DIFFERENT characters",
+        0,
     },
     {
 
@@ -117,5 +132,6 @@ const struct password_test cracklib_tests[] = {
         "OwenDericksegregationistshumiliatemeningitis'smainmast",
         0,
         NULL,
+        0,
     },
 };
index b69e7005820a142475b679bdb6d0a7421a024b86..c88a8435f4ff79c4fd0fd3d099b3c9e1660c2026 100644 (file)
     {
         "name": "in dictionary (repeated)",
         "principal": "test@EXAMPLE.ORG",
-        "password": "stanfordstanford"
+        "password": "stanfordstanford",
+        "code": "KADM5_PASS_Q_GENERIC",
+        "error": "it is based on a (duplicated) dictionary word",
+        "skip_for_system_cracklib": true
     },
     {
         "name": "in dictionary (reversed)",
         "principal": "test@EXAMPLE.ORG",
         "password": "enabrettib",
         "code": "KADM5_PASS_Q_GENERIC",
-        "error": "it is based on a (reversed) dictionary word"
+        "error": "it is based on a (reversed) dictionary word",
+        "skip_for_system_cracklib": true
     },
     {
         "name": "seven characters",
         "principal": "test@EXAMPLE.ORG",
-        "password": "dfareas"
+        "password": "dfareas",
+        "code": "KADM5_PASS_Q_GENERIC",
+        "error": "it is too short",
+        "skip_for_system_cracklib": true
     },
     {
         "name": "four characters",
index e8f8d5781f924034addd8625034bc660200f2f9f..844f2c10963e56653cf04299e6dae8fee7eaf850 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test history_tests[];
 const struct password_test history_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test history_tests[] = {
         "password",
         0,
         NULL,
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test history_tests[] = {
         "password",
         0,
         "Password was previously used",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test history_tests[] = {
         "password2",
         0,
         NULL,
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test history_tests[] = {
         "password2",
         0,
         "Password was previously used",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test history_tests[] = {
         "password",
         0,
         "Password was previously used",
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test history_tests[] = {
         "password",
         0,
         NULL,
+        0,
     },
     {
 
@@ -69,5 +78,6 @@ const struct password_test history_tests[] = {
         "someuser",
         0,
         "Password based on username or principal",
+        0,
     },
 };
index dc34041fecdd076973f876f4d935b388ee957843..911887e367abae011cc54bac1ab9a89772241e63 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test length_tests[];
 const struct password_test length_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test length_tests[] = {
         "vUCZ2aX$Y.e",
         KADM5_PASS_Q_TOOSHORT,
         "Password is too short",
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test length_tests[] = {
         "vUCZ2aX$Y.e1",
         0,
         NULL,
+        0,
     },
     {
 
@@ -37,5 +42,6 @@ const struct password_test length_tests[] = {
         "happenstance",
         0,
         NULL,
+        0,
     },
 };
index ea4d4f6b2f0285eb0d205dbd4acf6449d8bac256..0f91714825a8216ceebdea7415f592c25c84260d 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test letter_tests[];
 const struct password_test letter_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test letter_tests[] = {
         "عربى",
         KADM5_PASS_Q_GENERIC,
         "Password contains non-ASCII or control characters",
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test letter_tests[] = {
         "ouchD\ 1artetch",
         KADM5_PASS_Q_GENERIC,
         "Password contains non-ASCII or control characters",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test letter_tests[] = {
         "      ouchDartetch",
         KADM5_PASS_Q_GENERIC,
         "Password contains non-ASCII or control characters",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test letter_tests[] = {
         "ouchDartetch",
         KADM5_PASS_Q_CLASS,
         "Password is only letters and spaces",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test letter_tests[] = {
         "the perils of all good dogs",
         KADM5_PASS_Q_CLASS,
         "Password is only letters and spaces",
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test letter_tests[] = {
         "the perils of all good dogs!",
         0,
         NULL,
+        0,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test letter_tests[] = {
         "the perils 0of all good dogs",
         0,
         NULL,
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test letter_tests[] = {
         "11111111111111111111",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -85,6 +96,7 @@ const struct password_test letter_tests[] = {
         "1b1b1b1b1b1b1b1b1b1b",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test letter_tests[] = {
         "1bc1bc1bc1bc1bc1bc1b",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test letter_tests[] = {
         "1bcd1bcd1bcd1bcd1bcd",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -109,6 +123,7 @@ const struct password_test letter_tests[] = {
         "1bcde1bcde1bcde1bcde",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -117,6 +132,7 @@ const struct password_test letter_tests[] = {
         "1bcdef1bcdef1bcdef1b",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -125,6 +141,7 @@ const struct password_test letter_tests[] = {
         "1cdbfge1cdbeg1fcdbef",
         KADM5_PASS_Q_CLASS,
         "Password does not contain enough unique characters",
+        0,
     },
     {
 
@@ -133,6 +150,7 @@ const struct password_test letter_tests[] = {
         "1dbegchf1cdbfgh1ebcd",
         0,
         NULL,
+        0,
     },
     {
 
@@ -141,5 +159,6 @@ const struct password_test letter_tests[] = {
         "bcd1fgei1bhdefchig1b",
         0,
         NULL,
+        0,
     },
 };
index 471a05025aa347c0afd3d6da47e0298807c4e3ca..d525c0a998b47647277c2bbcb539bc67cf8d0524 100755 (executable)
@@ -5,6 +5,8 @@
 # The canonical representation of our password tests is in JSON, but I don't
 # want to require a JSON parser for the C tests to run.  This script reads the
 # JSON input and generates a C data structure that holds all of the tests.
+#
+# SPDX-License-Identifier: MIT
 
 use 5.010;
 use autodie;
@@ -31,10 +33,12 @@ Readonly my $HEADER => <<'END_HEADER';
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
@@ -42,12 +46,17 @@ Readonly my $HEADER => <<'END_HEADER';
 END_HEADER
 
 # The list of attributes, in order, whose values go into the C struct.
-Readonly my @ATTRIBUTES => qw(name principal password code error);
+Readonly my @ATTRIBUTES => qw(
+  name principal password code error skip_for_system_cracklib
+);
 
 # A hash of attributes that should be put in the C struct as they literally
 # appear in the JSON, rather than as strings.  (In other words, attributes
-# that are numbers or C constants.)  Only the keys are of interest.
-Readonly my %IS_LITERAL_ATTRIBUTE => (code => 1);
+# that are numbers, booleans, or C constants.)  Only the keys are of interest.
+Readonly my %IS_LITERAL_ATTRIBUTE => (
+    code                     => 1,
+    skip_for_system_cracklib => 1
+);
 
 ##############################################################################
 # Functions
@@ -135,6 +144,7 @@ my $tests_ref = load_password_tests($datafile);
 my $name = basename($datafile);
 $name =~ s{ [.]json \z }{}xms;
 print_fh(\*STDOUT, $HEADER);
+say_fh(\*STDOUT, "extern const struct password_test ${name}_tests[];");
 say_fh(\*STDOUT, "const struct password_test ${name}_tests[] = {");
 
 # Print out the test data.
@@ -176,6 +186,7 @@ struct is expected to have the following definition:
         const char *name;
         const char *principal;
         const char *password;
+        bool skip_for_system_cracklib;
         krb5_error_code code;
         const char *error;
     };
@@ -195,6 +206,8 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
+Copyright 2020 Russ Allbery <eagle@eyrie.org>
+
 Copyright 2013 The Board of Trustees of the Leland Stanford Junior
 University
 
index 715921aff59bf62e32dcc132b33815f41aebd90f..c36146ba62e13934f0bdbe2fa9d5bc7c6968a1b8 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test principal_tests[];
 const struct password_test principal_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test principal_tests[] = {
         "someuser",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test principal_tests[] = {
         "resuemos",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test principal_tests[] = {
         "someuser123",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test principal_tests[] = {
         "test@EXAMPLE.ORG",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test principal_tests[] = {
         "123someuser",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test principal_tests[] = {
         "1someuser2",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test principal_tests[] = {
         "newexample",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test principal_tests[] = {
         "newexample123",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -85,6 +96,7 @@ const struct password_test principal_tests[] = {
         "123newexample",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test principal_tests[] = {
         "ELPMAXEWEN",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test principal_tests[] = {
         "ORG1791520",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
     {
 
@@ -109,5 +123,6 @@ const struct password_test principal_tests[] = {
         "NewExample.Org",
         KADM5_PASS_Q_GENERIC,
         "Password based on username or principal",
+        0,
     },
 };
index 6459d0b3138e05d5b341afc87bf3fd48ac312c99..64482df385f9c36baac2648e6e058d6a2a0c102f 100644 (file)
@@ -5,14 +5,17 @@
  * for the use in C test programs.  To make changes, modify the original
  * JSON source or (more rarely) the make-c-data script and run it again.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <tests/data/passwords/tests.h>
 
+extern const struct password_test sqlite_tests[];
 const struct password_test sqlite_tests[] = {
     {
 
@@ -21,6 +24,7 @@ const struct password_test sqlite_tests[] = {
         "known good password",
         0,
         NULL,
+        0,
     },
     {
 
@@ -29,6 +33,7 @@ const struct password_test sqlite_tests[] = {
         "password",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -37,6 +42,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -45,6 +51,7 @@ const struct password_test sqlite_tests[] = {
         "1bitterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -53,6 +60,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbane1",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -61,6 +69,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbane123",
         0,
         NULL,
+        0,
     },
     {
 
@@ -69,6 +78,7 @@ const struct password_test sqlite_tests[] = {
         "ab",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -77,6 +87,7 @@ const struct password_test sqlite_tests[] = {
         "one",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -85,6 +96,7 @@ const struct password_test sqlite_tests[] = {
         "a",
         0,
         NULL,
+        0,
     },
     {
 
@@ -93,6 +105,7 @@ const struct password_test sqlite_tests[] = {
         "itterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -101,6 +114,7 @@ const struct password_test sqlite_tests[] = {
         "btterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -109,6 +123,7 @@ const struct password_test sqlite_tests[] = {
         "biterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -117,6 +132,7 @@ const struct password_test sqlite_tests[] = {
         "bittrbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -125,6 +141,7 @@ const struct password_test sqlite_tests[] = {
         "bittebane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -133,6 +150,7 @@ const struct password_test sqlite_tests[] = {
         "bitterane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -141,6 +159,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbne",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -149,6 +168,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbae",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -157,6 +177,7 @@ const struct password_test sqlite_tests[] = {
         "bitterban",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -165,6 +186,7 @@ const struct password_test sqlite_tests[] = {
         "Citterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -173,6 +195,7 @@ const struct password_test sqlite_tests[] = {
         "b7tterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -181,6 +204,7 @@ const struct password_test sqlite_tests[] = {
         "bi#terbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -189,6 +213,7 @@ const struct password_test sqlite_tests[] = {
         "bit*erbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -197,6 +222,7 @@ const struct password_test sqlite_tests[] = {
         "bittgrbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -205,6 +231,7 @@ const struct password_test sqlite_tests[] = {
         "bitte.bane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -213,6 +240,7 @@ const struct password_test sqlite_tests[] = {
         "bitter ane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -221,6 +249,7 @@ const struct password_test sqlite_tests[] = {
         "bitterb-ne",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -229,6 +258,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbame",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -237,6 +267,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbanq",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -245,6 +276,7 @@ const struct password_test sqlite_tests[] = {
         "b7itterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -253,6 +285,7 @@ const struct password_test sqlite_tests[] = {
         "bi#tterbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -261,6 +294,7 @@ const struct password_test sqlite_tests[] = {
         "bit*terbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -269,6 +303,7 @@ const struct password_test sqlite_tests[] = {
         "bit*terbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -277,6 +312,7 @@ const struct password_test sqlite_tests[] = {
         "bittgerbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -285,6 +321,7 @@ const struct password_test sqlite_tests[] = {
         "bitte.rbane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -293,6 +330,7 @@ const struct password_test sqlite_tests[] = {
         "bitter bane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -301,6 +339,7 @@ const struct password_test sqlite_tests[] = {
         "bitterb-ane",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -309,6 +348,7 @@ const struct password_test sqlite_tests[] = {
         "bitterbamne",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
     {
 
@@ -317,5 +357,6 @@ const struct password_test sqlite_tests[] = {
         "bitterbanqe",
         KADM5_PASS_Q_DICT,
         "Password found in list of common passwords",
+        0,
     },
 };
index dd38bdee6b1e23c969f5fef943bfffd9b4c70f3d..f1ce2f9cf9e77484c561bd3695e70329b1a3c2dc 100644 (file)
@@ -5,10 +5,11 @@
  * out by make-c-data.  It's included by the test data files.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TESTS_DATA_PASSWORD_TESTS_H
@@ -17,6 +18,7 @@
 #include <config.h>
 #include <portable/kadmin.h>
 #include <portable/krb5.h>
+#include <portable/stdbool.h>
 
 struct password_test {
     const char *name;
@@ -24,6 +26,7 @@ struct password_test {
     const char *password;
     krb5_error_code code;
     const char *error;
+    bool skip_for_system_cracklib;
 };
 
 #endif /* !TESTS_DATA_PASSWORD_TESTS_H */
index cf333762e49e79301565bf7637d60bf37f021cbe..60210a9e17fb5402095e3745e56e52b2f97458df 100644 (file)
@@ -4,13 +4,14 @@
 # for packages that run perlcritic tests automatically during the build for
 # reproducible test results.
 #
-# This file has been updated to match perlcritic 1.118.
+# This file has been updated to match perlcritic 1.134.
 #
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2011, 2012, 2013
+# Copyright 2018-2019 Russ Allbery <eagle@eyrie.org>
+# Copyright 2011-2013
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -30,6 +31,8 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
 severity = 1
 verbose  = %f:%l:%c: [%p] %m (%e, Severity: %s)\n
@@ -49,9 +52,6 @@ allow = unless
 # This is handled with a separate test case that uses Test::Spelling.
 [-Documentation::PodSpelling]
 
-# Pod::Man and Pod::Text fixed this bug years ago.  I know, I maintain them.
-[-Documentation::RequirePodLinksIncludeText]
-
 # The POD sections Perl::Critic wants are incompatible with the POD template
 # from perlpodstyle, which is what I use for my POD documentation.
 [-Documentation::RequirePodSections]
@@ -75,6 +75,10 @@ lines = 25
 # off.
 [-RegularExpressions::ProhibitComplexRegexes]
 
+# Produces false positives currently with postfix dereferencing (introduced in
+# Perl 5.20).  See https://github.com/Perl-Critic/Perl-Critic/issues/578.
+[-References::ProhibitDoubleSigils]
+
 # I generally don't want to require Readonly as a prerequisite for all my Perl
 # modules.
 [-ValuesAndExpressions::ProhibitConstantPragma]
@@ -89,9 +93,10 @@ lines = 25
 [ValuesAndExpressions::RequireNumberSeparators]
 min_value = 100000
 
+# IO::Uncompress::Gunzip puts the error message in a package variable.
 # Text::Wrap has a broken interface that requires use of package variables.
 [Variables::ProhibitPackageVars]
-add_packages = Text::Wrap
+add_packages = IO::Uncompress::Gunzip Text::Wrap
 
 # use English was one of the worst ideas in the history of Perl.  It makes the
 # code slightly more readable for amateurs at the cost of confusing
index e35e8a8fe2144a7bab20cab26f52b94c008f19e7..c2d0e40f04e06214fd6421a49cdccf6186bd16ce 100644 (file)
@@ -4,6 +4,17 @@
 #
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
+#
+# Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-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.
+#
+# SPDX-License-Identifier: FSFAP
 
 -bbao           # put line breaks before any operator
 -nbbc           # don't force blank lines before comments (bad for else blocks)
index c5a2e5dbef43dde1ac2ef332d61bdca9f9915650..5c1005445f2605a2c95ecd4f1cb3f335af8d9f91 100644 (file)
@@ -11,7 +11,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2011, 2012, 2013, 2014
+# Copyright 2017-2018 Russ Allbery <eagle@eyrie.org>
+# Copyright 2011-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
@@ -31,6 +32,8 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
 {
    dlopen-dlerror
    fun:calloc
    fun:_dlerror_run
 }
+{
+   fakeroot-msgsnd
+   Memcheck:Param
+   msgsnd(msgp->mtext)
+   fun:msgsnd
+   fun:send_fakem
+   fun:send_get_fakem
+   obj:*/libfakeroot-sysv.so
+}
+{
+   heimdal-base-once
+   Memcheck:Leak
+   fun:*alloc
+   ...
+   fun:heim_base_once_f
+}
 {
    heimdal-gss-config
    Memcheck:Leak
    ...
    fun:krb5_gss_save_error_string
 }
+{
+   mit-gss-mechs
+   Memcheck:Leak
+   fun:glob
+   fun:loadConfigFiles
+   fun:updateMechList
+   fun:build_mechSet
+   fun:gss_indicate_mechs
+}
+{
+   mit-kadmin-ovku-error
+   Memcheck:Leak
+   fun:*alloc*
+   fun:initialize_ovku_error_table_r
+}
+{
+   mit-krb5-changepw
+   Memcheck:Leak
+   fun:*alloc
+   fun:change_set_password
+   fun:krb5_change_password
+   fun:krb5_get_init_creds_password
+}
 {
    mit-krb5-pkinit-openssl-init
    Memcheck:Leak
    ...
    fun:krb5_preauth_request_context_init
 }
+{
+   mit-krb5-pkinit-openssl-request-2
+   Memcheck:Leak
+   fun:*alloc
+   ...
+   fun:k5_preauth_request_context_init
+}
 {
    mit-krb5-plugin-dirs
    Memcheck:Leak
    fun:strdup
    fun:register_module.isra.1
 }
+{
+   mit-krb5-preauth-init
+   Memcheck:Leak
+   fun:*alloc
+   ...
+   fun:k5_init_preauth_context
+}
+{
+   mit-krb5-preauth-init
+   Memcheck:Leak
+   fun:strdup
+   fun:add_to_list
+   fun:profile_get_values
+   ...
+   fun:clpreauth_prep_questions
+}
+{
+   mit-krb5-preauth-init-2
+   Memcheck:Leak
+   fun:*alloc
+   fun:init_list
+   fun:profile_get_values
+   ...
+   fun:clpreauth_prep_questions
+}
+{
+   mit-krb5-profile
+   Memcheck:Leak
+   fun:*alloc
+   ...
+   fun:profile_open_file
+}
 {
    portable-setenv
    Memcheck:Leak
index b613f6649ccf65db39c10e2aff54a38b71f35025..f03fa42fd7747ef4bc1aa0fa689a748806bc995e 100644 (file)
Binary files a/tests/data/wordlist.sqlite and b/tests/data/wordlist.sqlite differ
index 729d96e757abfd78e9d3741d64e7eee4151c83a6..04a89e5bc80a5206f2a966508fd6cb6e77709968 100755 (executable)
@@ -6,8 +6,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013, 2014
+# Copyright 2016, 2019 Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use Test::More;
 use Test::RRA qw(skip_unless_author use_prereq);
 use Test::RRA::Automake qw(automake_setup perl_dirs);
 
+use Test::More;
+
 # Only run this test for the module author since the required stopwords are
 # too sensitive to the exact spell-checking program and dictionary.
 skip_unless_author('Spelling tests');
index 0bd5b430e7eeed997c10504ce14406725415ad06..7b53dda341ea5fe4e79628850087ee79ef88c2b5 100755 (executable)
@@ -7,8 +7,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013, 2014
+# Copyright 2016, 2019 Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use Test::More;
 use Test::RRA qw(skip_unless_automated use_prereq);
 use Test::RRA::Automake qw(automake_setup perl_dirs);
 
+use Test::More;
+
 # Skip this test for normal user installs, since we normally pre-generate all
 # of the documentation and the end user doesn't care.
 skip_unless_automated('POD syntax tests');
diff --git a/tests/docs/spdx-license-t b/tests/docs/spdx-license-t
new file mode 100755 (executable)
index 0000000..24e4db0
--- /dev/null
@@ -0,0 +1,149 @@
+#!/usr/bin/perl
+#
+# Check source files for SPDX-License-Identifier fields.
+#
+# Examine all source files in a distribution to check that they contain an
+# SPDX-License-Identifier field.  This does not check the syntax or whether
+# the identifiers are valid.
+#
+# The canonical version of this file is maintained in the rra-c-util package,
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
+#
+# Copyright 2018-2020 Russ Allbery <eagle@eyrie.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
+
+use 5.008;
+use strict;
+use warnings;
+
+use lib "$ENV{C_TAP_SOURCE}/tap/perl";
+
+use Test::RRA qw(skip_unless_automated);
+use Test::RRA::Automake qw(all_files automake_setup);
+
+use File::Basename qw(basename);
+use Test::More;
+
+# File name (the file without any directory component) and path patterns to
+# skip for this check.
+## no critic (RegularExpressions::ProhibitFixedStringMatches)
+my @IGNORE = (
+    qr{ \A LICENSE \z }xms,             # Generated file with no license itself
+    qr{ \A (NEWS|THANKS|TODO) \z }xms,  # Package license should be fine
+    qr{ \A README ( [.] .* )? \z }xms,  # Package license should be fine
+    qr{ \A (Makefile|libtool) \z }xms,  # Generated file
+    qr{ [.] json \z }xms,               # Data files without comment support
+    qr{ [.] output \z }xms,             # Test data
+);
+my @IGNORE_PATHS = (
+    qr{ \A cracklib/ }xms,                     # Special case for krb5-strength
+    qr{ \A debian/ }xms,                       # Found in debian/* branches
+    qr{ \A docs/metadata/ }xms,                # Package license should be fine
+    qr{ \A docs/protocol[.](html|txt) \z }xms, # Generated by xml2rfc
+    qr{ \A m4/ (libtool|lt.*) [.] m4 \z }xms,  # Files from Libtool
+    qr{ \A perl/Build \z }xms,                 # Perl build files
+    qr{ \A perl/MANIFEST \z }xms,              # Perl build files
+    qr{ \A perl/MYMETA [.] }xms,               # Perl build files
+    qr{ \A perl/blib/ }xms,                    # Perl build files
+    qr{ \A perl/cover_db/ }xms,                # Perl test files
+    qr{ \A perl/_build }xms,                   # Perl build files
+    qr{ \A php/Makefile [.] global \z }xms,    # Created by phpize
+    qr{ \A php/autom4te [.] cache/ }xms,       # Created by phpize
+    qr{ \A php/acinclude [.] m4 \z }xms,       # Created by phpize
+    qr{ \A php/build/ }xms,                    # Created by phpize
+    qr{ \A php/config [.] (guess|sub) \z }xms, # Created by phpize
+    qr{ \A php/configure [.] (ac|in) \z }xms,  # Created by phpize
+    qr{ \A php/ltmain [.] sh \z }xms,          # Created by phpize
+    qr{ \A php/run-tests [.] php \z }xms,      # Created by phpize
+    qr{ \A python/ .* [.] egg-info/ }xms,      # Python build files
+    qr{ \A tests/config/ (?!README) }xms,      # Test configuration
+    qr{ [.] l?a \z }xms,                       # Created by libtool
+    qr{ [.] o \z }xms,                         # Compiler objects
+);
+## use critic
+
+# Only run this test during automated testing, since failure doesn't indicate
+# any user-noticable flaw in the package itself.
+skip_unless_automated('SPDX identifier tests');
+
+# Set up Automake testing.
+automake_setup();
+
+# Check a single file for an occurrence of the string.
+#
+# $path - Path to the file
+#
+# Returns: undef
+sub check_file {
+    my ($path) = @_;
+    my $filename = basename($path);
+
+    # Ignore files in the whitelist and binary files.
+    for my $pattern (@IGNORE) {
+        return if $filename =~ $pattern;
+    }
+    for my $pattern (@IGNORE_PATHS) {
+        return if $path =~ $pattern;
+    }
+    return if !-T $path;
+
+    # Scan the file.
+    my ($saw_legacy_notice, $saw_spdx, $skip_spdx);
+    open(my $file, '<', $path) or BAIL_OUT("Cannot open $path: $!");
+    while (defined(my $line = <$file>)) {
+        if ($line =~ m{ Generated [ ] by [ ] libtool [ ] }xms) {
+            close($file) or BAIL_OUT("Cannot close $path: $!");
+            return;
+        }
+        if ($line =~ m{ \b See \s+ LICENSE \s+ for \s+ licensing }xms) {
+            $saw_legacy_notice = 1;
+        }
+        if ($line =~ m{ \b SPDX-License-Identifier: \s+ \S+ }xms) {
+            $saw_spdx = 1;
+            last;
+        }
+        if ($line =~ m{ no \s SPDX-License-Identifier \s registered }xms) {
+            $skip_spdx = 1;
+            last;
+        }
+    }
+    close($file) or BAIL_OUT("Cannot close $path: $!");
+
+    # If there is a legacy license notice, report a failure regardless of file
+    # size.  Otherwise, skip files under 1KB.  They can be rolled up into the
+    # overall project license and the license notice may be a substantial
+    # portion of the file size.
+    if ($saw_legacy_notice) {
+        ok(!$saw_legacy_notice, "$path has legacy license notice");
+    } else {
+        ok($saw_spdx || $skip_spdx || -s $path < 1024, $path);
+    }
+    return;
+}
+
+# Scan every file.  We don't declare a plan since we skip a lot of files and
+# don't want to precalculate the file list.
+my @paths = all_files();
+for my $path (@paths) {
+    check_file($path);
+}
+done_testing();
index b5593e4caf591b24fc62609496a75dff3e4b105b..6f6e680ba3adc104de8657c8d84f618a1f7d07ac 100755 (executable)
@@ -6,8 +6,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013, 2014
+# Copyright 2016, 2019 Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use File::Spec;
-use Test::More;
 use Test::RRA qw(skip_unless_author use_prereq);
 use Test::RRA::Automake qw(automake_setup perl_dirs test_file_path);
 use Test::RRA::Config qw(@CRITIC_IGNORE);
 
+use File::Spec;
+use Test::More;
+
 # Skip tests unless we're running author tests since this test is too
 # sensitive to the exact version of Perl::Critic to be generally useful.
 skip_unless_author('Coding style tests');
index acdb13116783f42ec364f3a881089a697fa85f9c..420ce36d8406f8c75bfb91df263469c7698423f0 100755 (executable)
@@ -10,8 +10,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013, 2014
+# Copyright 2016, 2019-2020 Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use Test::More;
 use Test::RRA qw(skip_unless_automated use_prereq);
 use Test::RRA::Automake qw(automake_setup perl_dirs);
 use Test::RRA::Config qw($MINIMUM_VERSION %MINIMUM_VERSION);
 
+use Test::More;
+
 # Skip for normal user installs since this doesn't affect functionality.
 skip_unless_automated('Minimum version tests');
 
@@ -53,7 +56,7 @@ use_prereq('Test::MinimumVersion');
 automake_setup();
 
 # For each exception case in %MINIMUM_VERSION, check the files that should
-# have that minium version.  Sort for reproducible test order.  Also
+# have that minimum version.  Sort for reproducible test order.  Also
 # accumulate the list of directories we've already tested.
 my @tested;
 for my $version (sort keys %MINIMUM_VERSION) {
index 58a7cf7db5ac04035e9e3e38e5009c5f87ce6dea..6eae21654f8acc8da4f8909e1283cb6182bde0e0 100755 (executable)
@@ -10,8 +10,8 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2012, 2013, 2014
+# Copyright 2016, 2019 Russ Allbery <eagle@eyrie.org>
+# Copyright 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use Test::More;
 use Test::RRA qw(skip_unless_automated use_prereq);
 use Test::RRA::Automake qw(automake_setup perl_dirs);
 use Test::RRA::Config qw(@STRICT_IGNORE @STRICT_PREREQ);
 
+use Test::More;
+
 # Skip for normal user installs since this doesn't affect functionality.
 skip_unless_automated('Strictness tests');
 
index 1ec61f436905a692688638b33ce7f94b5e379494..0c0afa5b4b2ba286b18d2feea60c8e148f55e98a 100644 (file)
@@ -2,10 +2,10 @@
  * Test for the Heimdal shared module API.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2009, 20132014
+ * Copyright 2009, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -15,7 +15,7 @@
 #include <dlfcn.h>
 #include <errno.h>
 #ifdef HAVE_KADM5_KADM5_PWCHECK_H
-# include <kadm5/kadm5-pwcheck.h>
+#    include <kadm5/kadm5-pwcheck.h>
 #endif
 
 #include <tests/tap/basic.h>
@@ -168,16 +168,14 @@ main(void)
     /* Load the plugin. */
     verifier = load_plugin(&handle);
 
-    /* Set up our krb5.conf with the dictionary configuration. */
+    /* Set up our krb5.conf with a basic configuration. */
     setup_argv[0] = test_file_path("data/make-krb5-conf");
     if (setup_argv[0] == NULL)
         bail("cannot find data/make-krb5-conf in the test suite");
     tmpdir = test_tmpdir();
     setup_argv[1] = path;
     setup_argv[2] = tmpdir;
-    setup_argv[3] = (char *) "password_dictionary";
-    basprintf(&setup_argv[4], "%s/data/dictionary", getenv("BUILD"));
-    setup_argv[5] = NULL;
+    setup_argv[3] = NULL;
     run_setup((const char **) setup_argv);
 
     /* Point KRB5_CONFIG at the newly-generated krb5.conf file. */
@@ -185,12 +183,29 @@ main(void)
     putenv(krb5_config);
     free(krb5_config_empty);
 
-    /* Now, run all of the tests. */
-    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++)
-        is_password_test(verifier, &cracklib_tests[i]);
+    /* Run principal tests. */
     for (i = 0; i < ARRAY_SIZE(principal_tests); i++)
         is_password_test(verifier, &principal_tests[i]);
 
+#    ifdef HAVE_CRACKLIB
+
+    /* Add CrackLib tests. */
+    setup_argv[3] = (char *) "password_dictionary";
+    basprintf(&setup_argv[4], "%s/data/dictionary", getenv("BUILD"));
+    setup_argv[5] = NULL;
+    run_setup((const char **) setup_argv);
+
+    /* Now, run all of the tests. */
+    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++) {
+#        ifdef HAVE_SYSTEM_CRACKLIB
+        if (cracklib_tests[i].skip_for_system_cracklib) {
+            skip_block(2, "not built with embedded CrackLib");
+            continue;
+        }
+#        endif
+        is_password_test(verifier, &cracklib_tests[i]);
+    }
+
     /*
      * Add length restrictions and a maximum length for CrackLib.  This should
      * reject passwords as too short, but let through a password that's
@@ -207,14 +222,25 @@ main(void)
     for (i = 0; i < ARRAY_SIZE(length_tests); i++)
         is_password_test(verifier, &length_tests[i]);
 
+    /* Free the memory allocated for the CrackLib test. */
+    free(setup_argv[4]);
+
+#    else
+
+    /* Otherwise, mark the CrackLib tests as skipped. */
+    count = ARRAY_SIZE(cracklib_tests) + ARRAY_SIZE(length_tests);
+    skip_block(count * 2, "not built with CDB support");
+
+#    endif /* !HAVE_CRACKLIB */
+
     /* Add simple character class restrictions. */
-    setup_argv[5] = (char *) "minimum_different";
-    setup_argv[6] = (char *) "8";
-    setup_argv[7] = (char *) "require_ascii_printable";
+    setup_argv[3] = (char *) "minimum_different";
+    setup_argv[4] = (char *) "8";
+    setup_argv[5] = (char *) "require_ascii_printable";
+    setup_argv[6] = (char *) "true";
+    setup_argv[7] = (char *) "require_non_letter";
     setup_argv[8] = (char *) "true";
-    setup_argv[9] = (char *) "require_non_letter";
-    setup_argv[10] = (char *) "true";
-    setup_argv[11] = NULL;
+    setup_argv[9] = NULL;
     run_setup((const char **) setup_argv);
 
     /* Run the simple character class tests. */
@@ -222,7 +248,6 @@ main(void)
         is_password_test(verifier, &letter_tests[i]);
 
     /* Add complex character class restrictions and remove the dictionary. */
-    free(setup_argv[4]);
     setup_argv[3] = (char *) "require_classes";
     setup_argv[4] = (char *) "8-19:lower,upper 8-15:digit 8-11:symbol 24-24:3";
     setup_argv[5] = NULL;
@@ -242,7 +267,7 @@ main(void)
     for (i = 0; i < ARRAY_SIZE(length_tests); i++)
         is_password_test(verifier, &length_tests[i]);
 
-#ifdef HAVE_CDB
+#    ifdef HAVE_CDB
 
     /* If built with CDB, set up krb5.conf to use a CDB dictionary instead. */
     setup_argv[3] = (char *) "password_dictionary_cdb";
@@ -259,15 +284,15 @@ main(void)
     for (i = 0; i < ARRAY_SIZE(principal_tests); i++)
         is_password_test(verifier, &principal_tests[i]);
 
-#else /* !HAVE_CDB */
+#    else /* !HAVE_CDB */
 
     /* Otherwise, mark the CDB tests as skipped. */
     count = ARRAY_SIZE(cdb_tests) + ARRAY_SIZE(principal_tests);
     skip_block(count * 2, "not built with CDB support");
 
-#endif /* !HAVE_CDB */
+#    endif /* !HAVE_CDB */
 
-#ifdef HAVE_SQLITE
+#    ifdef HAVE_SQLITE
 
     /*
      * If built with SQLite, set up krb5.conf to use a SQLite dictionary
@@ -289,13 +314,13 @@ main(void)
     for (i = 0; i < ARRAY_SIZE(principal_tests); i++)
         is_password_test(verifier, &principal_tests[i]);
 
-#else /* !HAVE_SQLITE */
+#    else /* !HAVE_SQLITE */
 
     /* Otherwise, mark the SQLite tests as skipped. */
     count = ARRAY_SIZE(sqlite_tests) + ARRAY_SIZE(principal_tests);
     skip_block(count * 2, "not built with SQLite support");
 
-#endif /* !HAVE_SQLITE */
+#    endif /* !HAVE_SQLITE */
 
     /* Manually clean up after the results of make-krb5-conf. */
     basprintf(&path, "%s/krb5.conf", tmpdir);
index 4406e38796e8475c5517c35b8dd70ddc5378ed97..485ff75d686b0916a8475aedb4d66aba4ede31e4 100644 (file)
@@ -2,10 +2,11 @@
  * Test for the MIT Kerberos shared module API.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2010, 2013, 2014
+ * Copyright 2017, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2010, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -16,7 +17,7 @@
 #include <dlfcn.h>
 #include <errno.h>
 #ifdef HAVE_KRB5_PWQUAL_PLUGIN_H
-# include <krb5/pwqual_plugin.h>
+#    include <krb5/pwqual_plugin.h>
 #endif
 
 #include <tests/tap/basic.h>
@@ -70,7 +71,7 @@ load_plugin(krb5_context ctx, void **handle)
     char *path;
     krb5_error_code code;
     krb5_pwqual_vtable vtable = NULL;
-    krb5_error_code (*init)(krb5_context, int, int, krb5_plugin_vtable);
+    pwqual_strength_initvt *init;
 
     /* Load the module. */
     path = test_file_path("../plugin/.libs/strength.so");
@@ -82,7 +83,7 @@ load_plugin(krb5_context ctx, void **handle)
     test_file_path_free(path);
 
     /* Find the entry point function. */
-    init = dlsym(*handle, "pwqual_strength_initvt");
+    init = (pwqual_strength_initvt *) dlsym(*handle, "pwqual_strength_initvt");
     if (init == NULL)
         bail("cannot get pwqual_strength_initvt symbol: %s", dlerror());
 
@@ -150,7 +151,7 @@ main(void)
 {
     char *path, *dictionary, *krb5_config, *krb5_config_empty, *tmpdir;
     char *setup_argv[12];
-    const char*build;
+    const char *build;
     size_t i, count;
     krb5_context ctx;
     krb5_pwqual_vtable vtable;
@@ -201,34 +202,56 @@ main(void)
     if (code != 0)
         bail("cannot continue after plugin initialization failure");
 
-    /* Now, run all of the tests, with principal tests. */
-    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++)
-        is_password_test(ctx, vtable, data, &cracklib_tests[i]);
+    /* Run the principal tests. */
     for (i = 0; i < ARRAY_SIZE(principal_tests); i++)
         is_password_test(ctx, vtable, data, &principal_tests[i]);
 
+#    ifdef HAVE_CRACKLIB
+    /*
+     * Run the CrackLib tests if CrackLib is available, otherwise skip them.
+     * If built with the system CrackLib, skip tests that are marked as only
+     * working with the tougher rules of our embedded CrackLib.
+     */
+    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++) {
+#        ifdef HAVE_SYSTEM_CRACKLIB
+        if (cracklib_tests[i].skip_for_system_cracklib) {
+            skip_block(2, "not built with embedded CrackLib");
+            continue;
+        }
+#        endif
+        is_password_test(ctx, vtable, data, &cracklib_tests[i]);
+    }
+#    else
+    count = ARRAY_SIZE(cracklib_tests);
+    skip_block(count * 2, "not built with CrackLib support");
+#    endif
+
     /* Close that initialization of the plugin and destroy that context. */
     vtable->close(ctx, data);
     krb5_free_context(ctx);
     ctx = NULL;
 
-    /* Set up our krb5.conf with the dictionary configuration. */
+    /* Set up our krb5.conf with a base configuration. */
     tmpdir = test_tmpdir();
     setup_argv[0] = test_file_path("data/make-krb5-conf");
     if (setup_argv[0] == NULL)
         bail("cannot find data/make-krb5-conf in the test suite");
     setup_argv[1] = path;
     setup_argv[2] = tmpdir;
-    setup_argv[3] = (char *) "password_dictionary";
-    setup_argv[4] = dictionary;
-    setup_argv[5] = NULL;
-    run_setup((const char **) setup_argv);
 
     /* Point KRB5_CONFIG at the newly-generated krb5.conf file. */
     basprintf(&krb5_config, "KRB5_CONFIG=%s/krb5.conf", tmpdir);
     putenv(krb5_config);
     free(krb5_config_empty);
 
+#    ifdef HAVE_CRACKLIB
+
+    /* Add CrackLib configuration. */
+    setup_argv[3] = (char *) "password_dictionary";
+    setup_argv[4] = dictionary;
+    setup_argv[5] = NULL;
+    run_setup((const char **) setup_argv);
+
     /* Obtain a new Kerberos context with that krb5.conf file. */
     krb5_free_context(ctx);
     code = krb5_init_context(&ctx);
@@ -240,8 +263,15 @@ main(void)
     is_int(0, code, "Plugin initialization (krb5.conf dictionary)");
     if (code != 0)
         bail("cannot continue after plugin initialization failure");
-    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++)
+    for (i = 0; i < ARRAY_SIZE(cracklib_tests); i++) {
+#        ifdef HAVE_SYSTEM_CRACKLIB
+        if (cracklib_tests[i].skip_for_system_cracklib) {
+            skip_block(2, "not built with embedded CrackLib");
+            continue;
+        }
+#        endif
         is_password_test(ctx, vtable, data, &cracklib_tests[i]);
+    }
     vtable->close(ctx, data);
 
     /*
@@ -271,7 +301,15 @@ main(void)
         is_password_test(ctx, vtable, data, &length_tests[i]);
     vtable->close(ctx, data);
 
-    /* Add simple character class configuration to krb5.conf. */
+#    else
+
+    /* Otherwise mark the CrackLib tests as skipped. */
+    count = ARRAY_SIZE(cracklib_tests) + ARRAY_SIZE(length_tests);
+    skip_block(count * 2 + 2, "not built with CrackLib support");
+
+#    endif /* !HAVE_CRACKLIB */
+
+    /* Switch to simple character class configuration in krb5.conf. */
     setup_argv[3] = (char *) "minimum_different";
     setup_argv[4] = (char *) "8";
     setup_argv[5] = (char *) "require_ascii_printable";
@@ -296,10 +334,7 @@ main(void)
         is_password_test(ctx, vtable, data, &letter_tests[i]);
     vtable->close(ctx, data);
 
-    /*
-     * Add complex character class configuration to krb5.conf but drop
-     * the dictionary configuration.
-     */
+    /* Add complex character class configuration to krb5.conf. */
     setup_argv[3] = (char *) "require_classes";
     setup_argv[4] = (char *) "8-19:lower,upper 8-15:digit 8-11:symbol 24-24:3";
     setup_argv[5] = NULL;
@@ -341,7 +376,7 @@ main(void)
         is_password_test(ctx, vtable, data, &length_tests[i]);
     vtable->close(ctx, data);
 
-#ifdef HAVE_CDB
+#    ifdef HAVE_CDB
 
     /* If built with CDB, set up krb5.conf to use a CDB dictionary instead. */
     test_file_path_free(dictionary);
@@ -370,15 +405,15 @@ main(void)
         is_password_test(ctx, vtable, data, &principal_tests[i]);
     vtable->close(ctx, data);
 
-#else /* !HAVE_CDB */
+#    else /* !HAVE_CDB */
 
     /* Otherwise, mark the CDB tests as skipped. */
     count = ARRAY_SIZE(cdb_tests) + ARRAY_SIZE(principal_tests);
     skip_block(count * 2 + 1, "not built with CDB support");
 
-#endif /* !HAVE_CDB */
+#    endif /* !HAVE_CDB */
 
-#ifdef HAVE_SQLITE
+#    ifdef HAVE_SQLITE
 
     /*
      * If built with SQLite, set up krb5.conf to use a SQLite dictionary
@@ -412,13 +447,13 @@ main(void)
         is_password_test(ctx, vtable, data, &principal_tests[i]);
     vtable->close(ctx, data);
 
-#else /* !HAVE_SQLITE */
+#    else /* !HAVE_SQLITE */
 
     /* Otherwise, mark the SQLite tests as skipped. */
     count = ARRAY_SIZE(sqlite_tests) + ARRAY_SIZE(principal_tests);
     skip_block(count * 2 + 1, "not built with SQLite support");
 
-#endif /* !HAVE_SQLITE */
+#    endif /* !HAVE_SQLITE */
 
     /* Manually clean up after the results of make-krb5-conf. */
     basprintf(&path, "%s/krb5.conf", tmpdir);
index 4f7a6f617ae3262ba1ee5c6e56f361fa56bfefb8..3b10a6622c315d2457841e0bfdf8397a02990e7e 100644 (file)
@@ -5,14 +5,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2014, 2018 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2009, 2011
+ *     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 <config.h>
 
 int test_asprintf(char **, const char *, ...)
     __attribute__((__format__(printf, 2, 3)));
-int test_vasprintf(char **, const char *, va_list);
+int test_vasprintf(char **, const char *, va_list)
+    __attribute__((__format__(printf, 2, 0)));
 
-static int
+static int __attribute__((__format__(printf, 2, 3)))
 vatest(char **result, const char *format, ...)
 {
     va_list args;
index 5899a388c3d87ad9f2db41284c8346c0b69c32ac..dc268210f063d783e89f70f5cf7b5da8d594d902 100644 (file)
@@ -5,14 +5,15 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009, 2011
+ *     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 <config.h>
index 26db70a379d9d970a2623597c029873688daf604..30bcd3706596e6ddded64ca88fbdef23470087a8 100644 (file)
@@ -8,14 +8,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2014 Russ Allbery <eagle@eyrie.org>
+ * Copyright 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 <config.h>
index 601579bc3d4cc768eed7ceb4afc27d87f7e9576b..d14712f914d902ca78a788534f3caa6b982fb611 100644 (file)
@@ -5,9 +5,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
- *     Russ Allbery <eagle@eyrie.org>
- * Copyright 2009, 2010
+ * Copyright 2000-2006, 2018-2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2010
  *     The Board of Trustees of the Leland Stanford Junior University
  * Copyright 1995 Patrick Powell
  * Copyright 2001 Hrvoje Niksic
@@ -15,6 +14,8 @@
  * This code is based on code written by Patrick Powell (papowell@astart.com)
  * It may be used for any purpose as long as this notice remains intact
  * on all source code distributions
+ *
+ * There is no SPDX-License-Identifier registered for this license.
  */
 
 #include <config.h>
@@ -27,7 +28,7 @@
  * formats for easy testing.
  */
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__)
-# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#    pragma GCC diagnostic ignored "-Wformat-nonliteral"
 #endif
 
 /*
@@ -39,20 +40,12 @@ int test_vsnprintf(char *str, size_t count, const char *fmt, va_list args);
 
 static const char string[] = "abcdefghijklmnopqrstuvwxyz0123456789";
 
+/* clang-format off */
+
 static const char *const fp_formats[] = {
-    "%-1.5f",   "%1.5f",    "%31.9f",   "%10.5f",   "% 10.5f",  "%+22.9f",
-    "%+4.9f",   "%01.3f",   "%3.1f",    "%3.2f",    "%.0f",     "%.1f",
+    "%-1.5f",   "%1.5f",    "%31.6f",   "%10.5f",   "% 10.5f",  "%+22.6f",
+    "%+4.6f",   "%01.3f",   "%3.1f",    "%3.2f",    "%.0f",     "%.1f",
     "%f",
-
-    /* %e and %g formats aren't really implemented yet. */
-#if 0
-    "%-1.5e",   "%1.5e",    "%31.9e",   "%10.5e",   "% 10.5e",  "%+22.9e",
-    "%+4.9e",   "%01.3e",   "%3.1e",    "%3.2e",    "%.0e",     "%.1e",
-    "%e",
-    "%-1.5g",   "%1.5g",    "%31.9g",   "%10.5g",   "% 10.5g",  "%+22.9g",
-    "%+4.9g",   "%01.3g",   "%3.1g",    "%3.2g",    "%.0g",     "%.1g",
-    "%g",
-#endif
     NULL
 };
 static const char *const int_formats[] = {
@@ -98,10 +91,12 @@ static unsigned long long ullong_nums[] = {
     0
 };
 
+/* clang-format on */
+
 
 static void
-test_format(bool trunc, const char *expected, int count,
-            const char *format, ...)
+test_format(bool trunc, const char *expected, int count, const char *format,
+            ...)
 {
     char buf[128];
     int result;
@@ -123,12 +118,13 @@ main(void)
     long lcount;
     char lgbuf[128];
 
-    plan(8 +
-         (18 + (ARRAY_SIZE(fp_formats) - 1) * ARRAY_SIZE(fp_nums)
-          + (ARRAY_SIZE(int_formats) - 1) * ARRAY_SIZE(int_nums)
-          + (ARRAY_SIZE(uint_formats) - 1) * ARRAY_SIZE(uint_nums)
-          + (ARRAY_SIZE(llong_formats) - 1) * ARRAY_SIZE(llong_nums)
-          + (ARRAY_SIZE(ullong_formats) - 1) * ARRAY_SIZE(ullong_nums)) * 2);
+    plan(8
+         + (18 + (ARRAY_SIZE(fp_formats) - 1) * ARRAY_SIZE(fp_nums)
+            + (ARRAY_SIZE(int_formats) - 1) * ARRAY_SIZE(int_nums)
+            + (ARRAY_SIZE(uint_formats) - 1) * ARRAY_SIZE(uint_nums)
+            + (ARRAY_SIZE(llong_formats) - 1) * ARRAY_SIZE(llong_nums)
+            + (ARRAY_SIZE(ullong_formats) - 1) * ARRAY_SIZE(ullong_nums))
+               * 2);
 
     is_int(4, test_snprintf(NULL, 0, "%s", "abcd"), "simple string length");
     is_int(2, test_snprintf(NULL, 0, "%d", 20), "number length");
@@ -155,11 +151,11 @@ main(void)
                 string, -2.5);
     test_format(true, "abcdefghij4444", 14, "%.10s%n%d", string, &count, 4444);
     is_int(10, count, "correct output from %%n");
-    test_format(true, "abcdefghijklmnopqrstuvwxyz01234", 36, "%n%s%ln",
-                &count, string, &lcount);
+    test_format(true, "abcdefghijklmnopqrstuvwxyz01234", 36, "%n%s%ln", &count,
+                string, &lcount);
     is_int(0, count, "correct output from two %%n");
     is_int(31, lcount, "correct output from long %%ln");
-    test_format(true, "(null)", 6, "%s", NULL);
+    test_format(true, "(null)", 6, "%s", (char *) NULL);
 
     for (i = 0; fp_formats[i] != NULL; i++)
         for (j = 0; j < ARRAY_SIZE(fp_nums); j++) {
index c08786f9974a9e925417d4a927eee9f6a4d5f807..9bf28a31beec9b81325f76c56151b553abd48211 100644 (file)
@@ -5,14 +5,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2018 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2011-2012
+ *     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 <config.h>
@@ -29,7 +31,7 @@ int
 main(void)
 {
     char buffer[3];
-    char *result = NULL;
+    char *result;
 
     plan(7);
 
index ab9a4cb6bfa2ee0c9d9426bbcad70d8565a5ad71..1050120c7f084405b20ad02d584f1b1440a2ffcd 100644 (file)
@@ -1,6 +1,37 @@
 /*
  * Run a set of tests, reporting results.
  *
+ * Test suite driver that runs a set of tests implementing a subset of the
+ * Test Anything Protocol (TAP) and reports the results.
+ *
+ * Any bug reports, bug fixes, and improvements are very much welcome and
+ * should be sent to the e-mail address below.  This program is part of C TAP
+ * Harness <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
+ *
+ * Copyright 2000-2001, 2004, 2006-2019 Russ Allbery <eagle@eyrie.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+/*
  * Usage:
  *
  *      runtests [-hv] [-b <build-dir>] [-s <source-dir>] -l <test-list>
@@ -8,9 +39,10 @@
  *      runtests -o [-h] [-b <build-dir>] [-s <source-dir>] <test>
  *
  * In the first case, expects a list of executables located in the given file,
- * one line per executable.  For each one, runs it as part of a test suite,
- * reporting results.  In the second case, use the same infrastructure, but
- * run only the tests listed on the command line.
+ * one line per executable, possibly followed by a space-separated list of
+ * options.  For each one, runs it as part of a test suite, reporting results.
+ * In the second case, use the same infrastructure, but run only the tests
+ * listed on the command line.
  *
  * Test output should start with a line containing the number of tests
  * (numbered from 1 to this number), optionally preceded by "1..", although
  * If the -v option is given, or the C_TAP_VERBOSE environment variable is set,
  * display the full output of each test as it runs rather than showing a
  * summary of the results of each test.
- *
- * Any bug reports, bug fixes, and improvements are very much welcome and
- * should be sent to the e-mail address below.  This program is part of C TAP
- * Harness <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
- *
- * Copyright 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
- *     2014, 2015, 2016 Russ Allbery <eagle@eyrie.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
-*/
+ */
 
 /* Required for fdopen(), getopt(), and putenv(). */
 #if defined(__STRICT_ANSI__) || defined(PEDANTIC)
-# ifndef _XOPEN_SOURCE
-#  define _XOPEN_SOURCE 500
-# endif
+#    ifndef _XOPEN_SOURCE
+#        define _XOPEN_SOURCE 500
+#    endif
 #endif
 
 #include <ctype.h>
 
 /* AIX 6.1 (and possibly later) doesn't have WCOREDUMP. */
 #ifndef WCOREDUMP
-# define WCOREDUMP(status) ((unsigned)(status) & 0x80)
+#    define WCOREDUMP(status) ((unsigned) (status) &0x80)
 #endif
 
 /*
  * have.
  */
 #ifndef STDIN_FILENO
-# define STDIN_FILENO  0
-# define STDOUT_FILENO 1
-# define STDERR_FILENO 2
+#    define STDIN_FILENO  0
+#    define STDOUT_FILENO 1
+#    define STDERR_FILENO 2
 #endif
 
 /*
  * $(abs_top_builddir) respectively.
  */
 #ifndef C_TAP_SOURCE
-# define C_TAP_SOURCE NULL
+#    define C_TAP_SOURCE NULL
 #endif
 #ifndef C_TAP_BUILD
-# define C_TAP_BUILD NULL
+#    define C_TAP_BUILD NULL
 #endif
 
 /* Test status codes. */
-enum test_status {
-    TEST_FAIL,
-    TEST_PASS,
-    TEST_SKIP,
-    TEST_INVALID
-};
+enum test_status { TEST_FAIL, TEST_PASS, TEST_SKIP, TEST_INVALID };
 
 /* Really, just a boolean, but this is more self-documenting. */
-enum test_verbose {
-    CONCISE = 0,
-    VERBOSE = 1
-};
+enum test_verbose { CONCISE = 0, VERBOSE = 1 };
 
 /* Indicates the state of our plan. */
 enum plan_status {
-    PLAN_INIT,                  /* Nothing seen yet. */
-    PLAN_FIRST,                 /* Plan seen before any tests. */
-    PLAN_PENDING,               /* Test seen and no plan yet. */
-    PLAN_FINAL                  /* Plan seen after some tests. */
+    PLAN_INIT,    /* Nothing seen yet. */
+    PLAN_FIRST,   /* Plan seen before any tests. */
+    PLAN_PENDING, /* Test seen and no plan yet. */
+    PLAN_FINAL    /* Plan seen after some tests. */
 };
 
 /* Error exit statuses for test processes. */
-#define CHILDERR_DUP    100     /* Couldn't redirect stderr or stdout. */
-#define CHILDERR_EXEC   101     /* Couldn't exec child process. */
-#define CHILDERR_STDIN  102     /* Couldn't open stdin file. */
-#define CHILDERR_STDERR 103     /* Couldn't open stderr file. */
+#define CHILDERR_DUP    100 /* Couldn't redirect stderr or stdout. */
+#define CHILDERR_EXEC   101 /* Couldn't exec child process. */
+#define CHILDERR_STDIN  102 /* Couldn't open stdin file. */
+#define CHILDERR_STDERR 103 /* Couldn't open stderr file. */
 
 /* Structure to hold data for a set of tests. */
 struct testset {
-    char *file;                 /* The file name of the test. */
-    char *path;                 /* The path to the test program. */
-    enum plan_status plan;      /* The status of our plan. */
-    unsigned long count;        /* Expected count of tests. */
-    unsigned long current;      /* The last seen test number. */
-    unsigned int length;        /* The length of the last status message. */
-    unsigned long passed;       /* Count of passing tests. */
-    unsigned long failed;       /* Count of failing lists. */
-    unsigned long skipped;      /* Count of skipped tests (passed). */
-    unsigned long allocated;    /* The size of the results table. */
-    enum test_status *results;  /* Table of results by test number. */
-    unsigned int aborted;       /* Whether the set was aborted. */
-    int reported;               /* Whether the results were reported. */
-    int status;                 /* The exit status of the test. */
-    unsigned int all_skipped;   /* Whether all tests were skipped. */
-    char *reason;               /* Why all tests were skipped. */
+    char *file;                /* The file name of the test. */
+    char **command;            /* The argv vector to run the command. */
+    enum plan_status plan;     /* The status of our plan. */
+    unsigned long count;       /* Expected count of tests. */
+    unsigned long current;     /* The last seen test number. */
+    unsigned int length;       /* The length of the last status message. */
+    unsigned long passed;      /* Count of passing tests. */
+    unsigned long failed;      /* Count of failing lists. */
+    unsigned long skipped;     /* Count of skipped tests (passed). */
+    unsigned long allocated;   /* The size of the results table. */
+    enum test_status *results; /* Table of results by test number. */
+    unsigned int aborted;      /* Whether the set was aborted. */
+    unsigned int reported;     /* Whether the results were reported. */
+    int status;                /* The exit status of the test. */
+    unsigned int all_skipped;  /* Whether all tests were skipped. */
+    char *reason;              /* Why all tests were skipped. */
 };
 
 /* Structure to hold a linked list of test sets. */
@@ -239,11 +238,13 @@ Failed Set                 Fail/Total (%) Skip Stat  Failing Tests\n\
 -------------------------- -------------- ---- ----  ------------------------";
 
 /* Include the file name and line number in malloc failures. */
-#define xcalloc(n, size)      x_calloc((n), (size), __FILE__, __LINE__)
-#define xmalloc(size)         x_malloc((size), __FILE__, __LINE__)
-#define xstrdup(p)            x_strdup((p), __FILE__, __LINE__)
-#define xreallocarray(p, n, size) \
-    x_reallocarray((p), (n), (size), __FILE__, __LINE__)
+#define xcalloc(n, type) \
+    ((type *) x_calloc((n), sizeof(type), __FILE__, __LINE__))
+#define xmalloc(size)     ((char *) x_malloc((size), __FILE__, __LINE__))
+#define xstrdup(p)        x_strdup((p), __FILE__, __LINE__)
+#define xstrndup(p, size) x_strndup((p), (size), __FILE__, __LINE__)
+#define xreallocarray(p, n, type) \
+    ((type *) x_reallocarray((p), (n), sizeof(type), __FILE__, __LINE__))
 
 /*
  * __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7
@@ -251,9 +252,9 @@ Failed Set                 Fail/Total (%) Skip Stat  Failing Tests\n\
  * (to avoid confusion with other macros).
  */
 #ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-#  define __attribute__(spec)   /* empty */
-# endif
+#    if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+#        define __attribute__(spec) /* empty */
+#    endif
 #endif
 
 /*
@@ -264,11 +265,11 @@ Failed Set                 Fail/Total (%) Skip Stat  Failing Tests\n\
  * variadic macro support.
  */
 #if !defined(__attribute__) && !defined(__alloc_size__)
-# if defined(__GNUC__) && !defined(__clang__)
-#  if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
-#   define __alloc_size__(spec, args...) /* empty */
-#  endif
-# endif
+#    if defined(__GNUC__) && !defined(__clang__)
+#        if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#            define __alloc_size__(spec, args...) /* empty */
+#        endif
+#    endif
 #endif
 
 /*
@@ -278,10 +279,12 @@ Failed Set                 Fail/Total (%) Skip Stat  Failing Tests\n\
  * compilation context, but there's no push and pop available.
  */
 #if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__))
-# pragma GCC diagnostic ignored "-Wattributes"
+#    pragma GCC diagnostic ignored "-Wattributes"
 #endif
 
 /* Declare internal functions that benefit from compiler attributes. */
+static void die(const char *, ...)
+    __attribute__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
 static void sysdie(const char *, ...)
     __attribute__((__nonnull__, __noreturn__, __format__(printf, 1, 2)));
 static void *x_calloc(size_t, size_t, const char *, int)
@@ -292,6 +295,26 @@ static void *x_reallocarray(void *, size_t, size_t, const char *, int)
     __attribute__((__alloc_size__(2, 3), __malloc__, __nonnull__(4)));
 static char *x_strdup(const char *, const char *, int)
     __attribute__((__malloc__, __nonnull__));
+static char *x_strndup(const char *, size_t, const char *, int)
+    __attribute__((__malloc__, __nonnull__));
+
+
+/*
+ * Report a fatal error and exit.
+ */
+static void
+die(const char *format, ...)
+{
+    va_list args;
+
+    fflush(stdout);
+    fprintf(stderr, "runtests: ");
+    va_start(args, format);
+    vfprintf(stderr, format, args);
+    va_end(args);
+    fprintf(stderr, "\n");
+    exit(1);
+}
 
 
 /*
@@ -364,6 +387,9 @@ x_malloc(size_t size, const char *file, int line)
 static void *
 x_reallocarray(void *p, size_t n, size_t size, const char *file, int line)
 {
+    n = (n > 0) ? n : 1;
+    size = (size > 0) ? size : 1;
+
     if (n > 0 && UINT_MAX / n <= size)
         sysdie("realloc too large at %s line %d", file, line);
     p = realloc(p, n * size);
@@ -384,15 +410,44 @@ x_strdup(const char *s, const char *file, int line)
     size_t len;
 
     len = strlen(s) + 1;
-    p = malloc(len);
+    p = (char *) malloc(len);
     if (p == NULL)
-        sysdie("failed to strdup %lu bytes at %s line %d",
-               (unsigned long) len, file, line);
+        sysdie("failed to strdup %lu bytes at %s line %d", (unsigned long) len,
+               file, line);
     memcpy(p, s, len);
     return p;
 }
 
 
+/*
+ * Copy the first n characters of a string, reporting a fatal error and
+ * existing on failure.
+ *
+ * Avoid using the system strndup function since it may not exist (on Mac OS
+ * X, for example), and there's no need to introduce another portability
+ * requirement.
+ */
+char *
+x_strndup(const char *s, size_t size, const char *file, int line)
+{
+    const char *p;
+    size_t len;
+    char *copy;
+
+    /* Don't assume that the source string is nul-terminated. */
+    for (p = s; (size_t)(p - s) < size && *p != '\0'; p++)
+        ;
+    len = (size_t)(p - s);
+    copy = (char *) malloc(len + 1);
+    if (copy == NULL)
+        sysdie("failed to strndup %lu bytes at %s line %d",
+               (unsigned long) len, file, line);
+    memcpy(copy, s, len);
+    copy[len] = '\0';
+    return copy;
+}
+
+
 /*
  * Form a new string by concatenating multiple strings.  The arguments must be
  * terminated by (const char *) 0.
@@ -449,7 +504,7 @@ concat(const char *first, ...)
 static double
 tv_seconds(const struct timeval *tv)
 {
-    return difftime(tv->tv_sec, 0) + tv->tv_usec * 1e-6;
+    return difftime(tv->tv_sec, 0) + (double) tv->tv_usec * 1e-6;
 }
 
 
@@ -480,7 +535,20 @@ tv_sum(const struct timeval *tv1, const struct timeval *tv2)
 static const char *
 skip_whitespace(const char *p)
 {
-    while (isspace((unsigned char)(*p)))
+    while (isspace((unsigned char) (*p)))
+        p++;
+    return p;
+}
+
+
+/*
+ * Given a pointer to a string, skip any non-whitespace characters and return
+ * a pointer to the first whitespace character, or to the end of the string.
+ */
+static const char *
+skip_non_whitespace(const char *p)
+{
+    while (*p != '\0' && !isspace((unsigned char) (*p)))
         p++;
     return p;
 }
@@ -492,7 +560,7 @@ skip_whitespace(const char *p)
  * argument.  Returns the PID of the new process.  Errors are fatal.
  */
 static pid_t
-test_start(const char *path, int *fd)
+test_start(char *const *command, int *fd)
 {
     int fds[2], infd, errfd;
     pid_t child;
@@ -543,8 +611,9 @@ test_start(const char *path, int *fd)
         }
 
         /* Now, exec our process. */
-        if (execl(path, path, (char *) 0) == -1)
+        if (execv(command[0], command) == -1)
             _exit(CHILDERR_EXEC);
+        break;
 
     /* In parent.  Close the extra file descriptor. */
     default:
@@ -597,10 +666,10 @@ resize_results(struct testset *ts, unsigned long n)
      */
     if (ts->allocated == 0) {
         s = (n > 32) ? n : 32;
-        ts->results = xcalloc(s, sizeof(enum test_status));
+        ts->results = xcalloc(s, enum test_status);
     } else {
         s = (n > ts->allocated + 1024) ? n : ts->allocated + 1024;
-        ts->results = xreallocarray(ts->results, s, sizeof(enum test_status));
+        ts->results = xreallocarray(ts->results, s, enum test_status);
     }
 
     /* Set the results for the newly-allocated test array. */
@@ -714,8 +783,7 @@ test_plan(const char *line, struct testset *ts, enum test_verbose verbose)
  * reported status.
  */
 static void
-test_checkline(const char *line, struct testset *ts,
-               enum test_verbose verbose)
+test_checkline(const char *line, struct testset *ts, enum test_verbose verbose)
 {
     enum test_status status = TEST_PASS;
     const char *bail;
@@ -755,7 +823,7 @@ test_checkline(const char *line, struct testset *ts,
         return;
 
     /* If we haven't yet seen a plan, look for one. */
-    if (ts->plan == PLAN_INIT && isdigit((unsigned char)(*line))) {
+    if (ts->plan == PLAN_INIT && isdigit((unsigned char) (*line))) {
         if (!test_plan(line, ts, verbose))
             return;
     } else if (strncmp(line, "1..", 3) == 0) {
@@ -806,7 +874,7 @@ test_checkline(const char *line, struct testset *ts,
      * Handle directives.  We should probably do something more interesting
      * with unexpected passes of todo tests.
      */
-    while (isdigit((unsigned char)(*line)))
+    while (isdigit((unsigned char) (*line)))
         line++;
     line = skip_whitespace(line);
     if (*line == '#') {
@@ -829,10 +897,17 @@ test_checkline(const char *line, struct testset *ts,
 
     /* Good results.  Increment our various counters. */
     switch (status) {
-        case TEST_PASS: ts->passed++;   break;
-        case TEST_FAIL: ts->failed++;   break;
-        case TEST_SKIP: ts->skipped++;  break;
-        case TEST_INVALID:              break;
+    case TEST_PASS:
+        ts->passed++;
+        break;
+    case TEST_FAIL:
+        ts->failed++;
+        break;
+    case TEST_SKIP:
+        ts->skipped++;
+        break;
+    case TEST_INVALID:
+        break;
     }
     ts->current = current;
     ts->results[current - 1] = status;
@@ -1037,7 +1112,7 @@ test_run(struct testset *ts, enum test_verbose verbose)
     char buffer[BUFSIZ];
 
     /* Run the test program. */
-    testpid = test_start(ts->path, &outfd);
+    testpid = test_start(ts->command, &outfd);
     output = fdopen(outfd, "r");
     if (!output) {
         puts("ABORTED");
@@ -1099,6 +1174,7 @@ test_fail_summary(const struct testlist *fails)
     struct testset *ts;
     unsigned int chars;
     unsigned long i, first, last, total;
+    double failed;
 
     puts(header);
 
@@ -1107,8 +1183,9 @@ test_fail_summary(const struct testlist *fails)
     for (; fails; fails = fails->next) {
         ts = fails->ts;
         total = ts->count - ts->skipped;
+        failed = (double) ts->failed;
         printf("%-26.26s %4lu/%-4lu %3.0f%% %4lu ", ts->file, ts->failed,
-               total, total ? (ts->failed * 100.0) / total : 0,
+               total, total ? (failed * 100.0) / (double) total : 0,
                ts->skipped);
         if (WIFEXITED(ts->status))
             printf("%4d  ", WEXITSTATUS(ts->status));
@@ -1177,7 +1254,7 @@ find_test(const char *name, const char *source, const char *build)
     char *path = NULL;
     const char *bases[3], *suffix, *base;
     unsigned int i, j;
-    const char *suffixes[3] = { "-t", ".t", "" };
+    const char *suffixes[3] = {"-t", ".t", ""};
 
     /* Possible base directories. */
     bases[0] = ".";
@@ -1204,6 +1281,96 @@ find_test(const char *name, const char *source, const char *build)
 }
 
 
+/*
+ * Parse a single line of a test list and store the test name and command to
+ * execute it in the given testset struct.
+ *
+ * Normally, each line is just the name of the test, which is located in the
+ * test directory and turned into a command to run.  However, each line may
+ * have whitespace-separated options, which change the command that's run.
+ * Current supported options are:
+ *
+ * valgrind
+ *     Run the test under valgrind if C_TAP_VALGRIND is set.  The contents
+ *     of that environment variable are taken as the valgrind command (with
+ *     options) to run.  The command is parsed with a simple split on
+ *     whitespace and no quoting is supported.
+ *
+ * libtool
+ *     If running under valgrind, use libtool to invoke valgrind.  This avoids
+ *     running valgrind on the wrapper shell script generated by libtool.  If
+ *     set, C_TAP_LIBTOOL must be set to the full path to the libtool program
+ *     to use to run valgrind and thus the test.  Ignored if the test isn't
+ *     being run under valgrind.
+ */
+static void
+parse_test_list_line(const char *line, struct testset *ts, const char *source,
+                     const char *build)
+{
+    const char *p, *end, *option, *libtool;
+    const char *valgrind = NULL;
+    unsigned int use_libtool = 0;
+    unsigned int use_valgrind = 0;
+    size_t len, i;
+
+    /* Determine the name of the test. */
+    p = skip_non_whitespace(line);
+    ts->file = xstrndup(line, p - line);
+
+    /* Check if any test options are set. */
+    p = skip_whitespace(p);
+    while (*p != '\0') {
+        end = skip_non_whitespace(p);
+        if (strncmp(p, "libtool", end - p) == 0) {
+            use_libtool = 1;
+        } else if (strncmp(p, "valgrind", end - p) == 0) {
+            valgrind = getenv("C_TAP_VALGRIND");
+            use_valgrind = (valgrind != NULL);
+        } else {
+            option = xstrndup(p, end - p);
+            die("unknown test list option %s", option);
+        }
+        p = skip_whitespace(end);
+    }
+
+    /* Construct the argv to run the test.  First, find the length. */
+    len = 1;
+    if (use_valgrind && valgrind != NULL) {
+        p = skip_whitespace(valgrind);
+        while (*p != '\0') {
+            len++;
+            p = skip_whitespace(skip_non_whitespace(p));
+        }
+        if (use_libtool)
+            len += 2;
+    }
+
+    /* Now, build the command. */
+    ts->command = xcalloc(len + 1, char *);
+    i = 0;
+    if (use_valgrind && valgrind != NULL) {
+        if (use_libtool) {
+            libtool = getenv("C_TAP_LIBTOOL");
+            if (libtool == NULL)
+                die("valgrind with libtool requested, but C_TAP_LIBTOOL is not"
+                    " set");
+            ts->command[i++] = xstrdup(libtool);
+            ts->command[i++] = xstrdup("--mode=execute");
+        }
+        p = skip_whitespace(valgrind);
+        while (*p != '\0') {
+            end = skip_non_whitespace(p);
+            ts->command[i++] = xstrndup(p, end - p);
+            p = skip_whitespace(end);
+        }
+    }
+    if (i != len - 1)
+        die("internal error while constructing command line");
+    ts->command[i++] = find_test(ts->file, source, build);
+    ts->command[i] = NULL;
+}
+
+
 /*
  * Read a list of tests from a file, returning the list of tests as a struct
  * testlist, or NULL if there were no tests (such as a file containing only
@@ -1211,17 +1378,17 @@ find_test(const char *name, const char *source, const char *build)
  * tests cannot be read.
  */
 static struct testlist *
-read_test_list(const char *filename)
+read_test_list(const char *filename, const char *source, const char *build)
 {
     FILE *file;
     unsigned int line;
     size_t length;
     char buffer[BUFSIZ];
-    const char *testname;
+    const char *start;
     struct testlist *listhead, *current;
 
     /* Create the initial container list that will hold our results. */
-    listhead = xcalloc(1, sizeof(struct testlist));
+    listhead = xcalloc(1, struct testlist);
     current = NULL;
 
     /*
@@ -1242,22 +1409,24 @@ read_test_list(const char *filename)
         buffer[length] = '\0';
 
         /* Skip comments, leading spaces, and blank lines. */
-        testname = skip_whitespace(buffer);
-        if (strlen(testname) == 0)
+        start = skip_whitespace(buffer);
+        if (strlen(start) == 0)
             continue;
-        if (testname[0] == '#')
+        if (start[0] == '#')
             continue;
 
         /* Allocate the new testset structure. */
         if (current == NULL)
             current = listhead;
         else {
-            current->next = xcalloc(1, sizeof(struct testlist));
+            current->next = xcalloc(1, struct testlist);
             current = current->next;
         }
-        current->ts = xcalloc(1, sizeof(struct testset));
+        current->ts = xcalloc(1, struct testset);
         current->ts->plan = PLAN_INIT;
-        current->ts->file = xstrdup(testname);
+
+        /* Parse the line and store the results in the testset struct. */
+        parse_test_list_line(start, current->ts, source, build);
     }
     fclose(file);
 
@@ -1279,13 +1448,13 @@ read_test_list(const char *filename)
  * freeing.
  */
 static struct testlist *
-build_test_list(char *argv[], int argc)
+build_test_list(char *argv[], int argc, const char *source, const char *build)
 {
     int i;
     struct testlist *listhead, *current;
 
     /* Create the initial container list that will hold our results. */
-    listhead = xcalloc(1, sizeof(struct testlist));
+    listhead = xcalloc(1, struct testlist);
     current = NULL;
 
     /* Walk the list of arguments and create test sets for them. */
@@ -1293,12 +1462,15 @@ build_test_list(char *argv[], int argc)
         if (current == NULL)
             current = listhead;
         else {
-            current->next = xcalloc(1, sizeof(struct testlist));
+            current->next = xcalloc(1, struct testlist);
             current = current->next;
         }
-        current->ts = xcalloc(1, sizeof(struct testset));
+        current->ts = xcalloc(1, struct testset);
         current->ts->plan = PLAN_INIT;
         current->ts->file = xstrdup(argv[i]);
+        current->ts->command = xcalloc(2, char *);
+        current->ts->command[0] = find_test(current->ts->file, source, build);
+        current->ts->command[1] = NULL;
     }
 
     /* If there were no tests, current is still NULL. */
@@ -1316,8 +1488,12 @@ build_test_list(char *argv[], int argc)
 static void
 free_testset(struct testset *ts)
 {
+    size_t i;
+
     free(ts->file);
-    free(ts->path);
+    for (i = 0; ts->command[i] != NULL; i++)
+        free(ts->command[i]);
+    free(ts->command);
     free(ts->results);
     free(ts->reason);
     free(ts);
@@ -1332,8 +1508,7 @@ free_testset(struct testset *ts)
  * frees the test list that's passed in.
  */
 static int
-test_batch(struct testlist *tests, const char *source, const char *build,
-           enum test_verbose verbose)
+test_batch(struct testlist *tests, enum test_verbose verbose)
 {
     size_t length, i;
     size_t longest = 0;
@@ -1384,7 +1559,6 @@ test_batch(struct testlist *tests, const char *source, const char *build,
             fflush(stdout);
 
         /* Run the test. */
-        ts->path = find_test(ts->file, source, build);
         succeeded = test_run(ts, verbose);
         fflush(stdout);
         if (verbose)
@@ -1401,10 +1575,10 @@ test_batch(struct testlist *tests, const char *source, const char *build,
         /* If the test fails, we shuffle it over to the fail list. */
         if (!succeeded) {
             if (failhead == NULL) {
-                failhead = xmalloc(sizeof(struct testset));
+                failhead = xcalloc(1, struct testlist);
                 failtail = failhead;
             } else {
-                failtail->next = xmalloc(sizeof(struct testset));
+                failtail->next = xcalloc(1, struct testlist);
                 failtail = failtail->next;
             }
             failtail->ts = ts;
@@ -1443,12 +1617,11 @@ test_batch(struct testlist *tests, const char *source, const char *build,
         else
             printf("Aborted %lu test sets", aborted);
         printf(", passed %lu/%lu tests", passed, total);
-    }
-    else if (failed == 0)
+    } else if (failed == 0)
         fputs("All tests successful", stdout);
     else
         printf("Failed %lu/%lu tests, %.2f%% okay", failed, total,
-               (total - failed) * 100.0 / total);
+               (double) (total - failed) * 100.0 / (double) total);
     if (skipped != 0) {
         if (skipped == 1)
             printf(", %lu test skipped", skipped);
@@ -1458,8 +1631,8 @@ test_batch(struct testlist *tests, const char *source, const char *build,
     puts(".");
     printf("Files=%u,  Tests=%lu", count, total);
     printf(",  %.2f seconds", tv_diff(&end, &start));
-    printf(" (%.2f usr + %.2f sys = %.2f CPU)\n",
-           tv_seconds(&stats.ru_utime), tv_seconds(&stats.ru_stime),
+    printf(" (%.2f usr + %.2f sys = %.2f CPU)\n", tv_seconds(&stats.ru_utime),
+           tv_seconds(&stats.ru_stime),
            tv_sum(&stats.ru_utime, &stats.ru_stime));
     return (failed == 0 && aborted == 0);
 }
@@ -1574,11 +1747,11 @@ main(int argc, char *argv[])
         else
             shortlist++;
         printf(banner, shortlist);
-        tests = read_test_list(list);
-        status = test_batch(tests, source, build, verbose) ? 0 : 1;
+        tests = read_test_list(list, source, build);
+        status = test_batch(tests, verbose) ? 0 : 1;
     } else {
-        tests = build_test_list(argv, argc);
-        status = test_batch(tests, source, build, verbose) ? 0 : 1;
+        tests = build_test_list(argv, argc, source, build);
+        status = test_batch(tests, verbose) ? 0 : 1;
     }
 
     /* For valgrind cleanliness, free all our memory. */
similarity index 81%
rename from tests/docs/urls-t
rename to tests/style/obsolete-strings-t
index cad76d89c738e7eb5bdef53a553189be4ec717b9..02fd30c9bfc98ea014c84b4f4c2ac1c9aa503822 100755 (executable)
@@ -1,15 +1,15 @@
 #!/usr/bin/perl
 #
-# Check URLs in source files.
+# Check for obsolete strings in source files.
 #
-# Examine all source files in a distribution for bad URL patterns and report
-# on files that fail this check.  Currently, this just checks that all the
-# links to www.eyrie.org are https.
+# Examine all source files in a distribution for obsolete strings and report
+# on files that fail this check.  This catches various transitions I want to
+# do globally in all my packages, like changing my personal URLs to https.
 #
 # The canonical version of this file is maintained in the rra-c-util package,
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
+# Copyright 2016, 2018-2019 Russ Allbery <eagle@eyrie.org>
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # copy of this software and associated documentation files (the "Software"),
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
-use 5.006;
+use 5.008;
 use strict;
 use warnings;
 
 use lib "$ENV{C_TAP_SOURCE}/tap/perl";
 
-use File::Basename qw(basename);
-use Test::More;
 use Test::RRA qw(skip_unless_author);
 use Test::RRA::Automake qw(all_files automake_setup);
 
+use File::Basename qw(basename);
+use Test::More;
+
 # Bad patterns to search for.
 my @BAD_REGEXES = (qr{ http:// \S+ [.]eyrie[.]org }xms);
-my @BAD_STRINGS = qw(rra@stanford.edu);
+my @BAD_STRINGS = qw(rra@stanford.edu RRA_MAINTAINER_TESTS);
+
+# File names to exclude from this check.
+my %EXCLUDE = map { $_ => 1 } qw(NEWS obsolete-strings.t obsolete-strings-t);
 
 # Only run this test for the package author, since it doesn't indicate any
 # user-noticable flaw in the package itself.
-skip_unless_author('Documentation URL tests');
+skip_unless_author('Obsolete strings tests');
 
 # Set up Automake testing.
 automake_setup();
@@ -60,8 +66,8 @@ sub check_file {
     my ($path) = @_;
     my $filename = basename($path);
 
-    # Ignore this check itself (or the Perl version of it) and binary files.
-    return if ($filename eq 'urls.t' || $filename eq 'urls-t');
+    # Ignore excluded and binary files.
+    return if $EXCLUDE{$filename};
     return if !-T $path;
 
     # Scan the file.
index c244e05b197751024e0ef2f56419a1e3753e79f3..b5f42d0211a4f8bbb3ce50764e170a9c4bba9959 100644 (file)
@@ -12,9 +12,9 @@
  * This file is part of C TAP Harness.  The current version plus supporting
  * documentation is at <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
  *
- * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
- *     Russ Allbery <eagle@eyrie.org>
- * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2013, 2014
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2019 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2001-2002, 2004-2008, 2011-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -34,6 +34,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <errno.h>
@@ -43,9 +45,9 @@
 #include <stdlib.h>
 #include <string.h>
 #ifdef _WIN32
-# include <direct.h>
+#    include <direct.h>
 #else
-# include <sys/stat.h>
+#    include <sys/stat.h>
 #endif
 #include <sys/types.h>
 #include <unistd.h>
@@ -54,8 +56,8 @@
 
 /* Windows provides mkdir and rmdir under different names. */
 #ifdef _WIN32
-# define mkdir(p, m) _mkdir(p)
-# define rmdir(p)    _rmdir(p)
+#    define mkdir(p, m) _mkdir(p)
+#    define rmdir(p)    _rmdir(p)
 #endif
 
 /*
@@ -70,7 +72,7 @@ unsigned long testnum = 1;
  * We can get the highest test count from testnum.
  */
 static unsigned long _planned = 0;
-static unsigned long _failed  = 0;
+static unsigned long _failed = 0;
 
 /*
  * Store the PID of the process that called plan() and only summarize
@@ -99,6 +101,8 @@ static int _aborted = 0;
  */
 struct cleanup_func {
     test_cleanup_func func;
+    test_cleanup_func_with_data func_with_data;
+    void *data;
     struct cleanup_func *next;
 };
 static struct cleanup_func *cleanup_funcs = NULL;
@@ -124,16 +128,15 @@ static struct diag_file *diag_files = NULL;
  * print_desc, which has to be done in a macro.  Assumes that format is the
  * argument immediately before the variadic arguments.
  */
-#define PRINT_DESC(prefix, format)              \
-    do {                                        \
-        if (format != NULL) {                   \
-            va_list args;                       \
-            if (prefix != NULL)                 \
-                printf("%s", prefix);           \
-            va_start(args, format);             \
-            vprintf(format, args);              \
-            va_end(args);                       \
-        }                                       \
+#define PRINT_DESC(prefix, format)  \
+    do {                            \
+        if (format != NULL) {       \
+            va_list args;           \
+            printf("%s", prefix);   \
+            va_start(args, format); \
+            vprintf(format, args);  \
+            va_end(args);           \
+        }                           \
     } while (0)
 
 
@@ -170,7 +173,7 @@ concat(const char *first, ...)
     length++;
 
     /* Create the string. */
-    result = bmalloc(length);
+    result = bcalloc_type(length, char);
     va_start(args, first);
     offset = 0;
     for (string = first; string != NULL; string = va_arg(args, const char *)) {
@@ -183,6 +186,68 @@ concat(const char *first, ...)
 }
 
 
+/*
+ * Helper function for check_diag_files to handle a single line in a diag
+ * file.
+ *
+ * The general scheme here used is as follows: read one line of output.  If we
+ * get NULL, check for an error.  If there was one, bail out of the test
+ * program; otherwise, return, and the enclosing loop will check for EOF.
+ *
+ * If we get some data, see if it ends in a newline.  If it doesn't end in a
+ * newline, we have one of two cases: our buffer isn't large enough, in which
+ * case we resize it and try again, or we have incomplete data in the file, in
+ * which case we rewind the file and will try again next time.
+ *
+ * Returns a boolean indicating whether the last line was incomplete.
+ */
+static int
+handle_diag_file_line(struct diag_file *file, fpos_t where)
+{
+    int size;
+    size_t length;
+
+    /* Read the next line from the file. */
+    size = file->bufsize > INT_MAX ? INT_MAX : (int) file->bufsize;
+    if (fgets(file->buffer, size, file->file) == NULL) {
+        if (ferror(file->file))
+            sysbail("cannot read from %s", file->name);
+        return 0;
+    }
+
+    /*
+     * See if the line ends in a newline.  If not, see which error case we
+     * have.
+     */
+    length = strlen(file->buffer);
+    if (file->buffer[length - 1] != '\n') {
+        int incomplete = 0;
+
+        /* Check whether we ran out of buffer space and resize if so. */
+        if (length < file->bufsize - 1)
+            incomplete = 1;
+        else {
+            file->bufsize += BUFSIZ;
+            file->buffer =
+                breallocarray_type(file->buffer, file->bufsize, char);
+        }
+
+        /*
+         * On either incomplete lines or too small of a buffer, rewind
+         * and read the file again (on the next pass, if incomplete).
+         * It's simpler than trying to double-buffer the file.
+         */
+        if (fsetpos(file->file, &where) < 0)
+            sysbail("cannot set position in %s", file->name);
+        return incomplete;
+    }
+
+    /* We saw a complete line.  Print it out. */
+    printf("# %s", file->buffer);
+    return 0;
+}
+
+
 /*
  * Check all registered diag_files for any output.  We only print out the
  * output if we see a complete line; otherwise, we wait for the next newline.
@@ -192,20 +257,10 @@ check_diag_files(void)
 {
     struct diag_file *file;
     fpos_t where;
-    size_t length;
-    int size, incomplete;
+    int incomplete;
 
     /*
-     * Walk through each file and read each line of output available.  The
-     * general scheme here used is as follows: try to read a line of output at
-     * a time.  If we get NULL, check for EOF; on EOF, advance to the next
-     * file.
-     *
-     * If we get some data, see if it ends in a newline.  If it doesn't end in
-     * a newline, we have one of two cases: our buffer isn't large enough, in
-     * which case we resize it and try again, or we have incomplete data in
-     * the file, in which case we rewind the file and will try again next
-     * time.
+     * Walk through each file and read each line of output available.
      */
     for (file = diag_files; file != NULL; file = file->next) {
         clearerr(file->file);
@@ -217,41 +272,7 @@ check_diag_files(void)
         /* Continue until we get EOF or an incomplete line of data. */
         incomplete = 0;
         while (!feof(file->file) && !incomplete) {
-            size = file->bufsize > INT_MAX ? INT_MAX : (int) file->bufsize;
-            if (fgets(file->buffer, size, file->file) == NULL) {
-                if (ferror(file->file))
-                    sysbail("cannot read from %s", file->name);
-                continue;
-            }
-
-            /*
-             * See if the line ends in a newline.  If not, see which error
-             * case we have.  Use UINT_MAX as a substitute for SIZE_MAX (see
-             * the comment for breallocarray).
-             */
-            length = strlen(file->buffer);
-            if (file->buffer[length - 1] != '\n') {
-                if (length < file->bufsize - 1)
-                    incomplete = 1;
-                else {
-                    if (file->bufsize >= UINT_MAX - BUFSIZ)
-                        sysbail("line too long in %s", file->name);
-                    file->bufsize += BUFSIZ;
-                    file->buffer = brealloc(file->buffer, file->bufsize);
-                }
-
-                /*
-                 * On either incomplete lines or too small of a buffer, rewind
-                 * and read the file again (on the next pass, if incomplete).
-                 * It's simpler than trying to double-buffer the file.
-                 */
-                if (fsetpos(file->file, &where) < 0)
-                    sysbail("cannot set position in %s", file->name);
-                continue;
-            }
-
-            /* We saw a complete line.  Print it out. */
-            printf("# %s", file->buffer);
+            incomplete = handle_diag_file_line(file, where);
         }
     }
 }
@@ -304,7 +325,13 @@ finish(void)
      */
     primary = (_process == 0 || getpid() == _process);
     while (cleanup_funcs != NULL) {
-        cleanup_funcs->func(success, primary);
+        if (cleanup_funcs->func_with_data) {
+            void *data = cleanup_funcs->data;
+
+            cleanup_funcs->func_with_data(success, primary, data);
+        } else {
+            cleanup_funcs->func(success, primary);
+        }
         current = cleanup_funcs;
         cleanup_funcs = cleanup_funcs->next;
         free(current);
@@ -489,22 +516,81 @@ skip_block(unsigned long count, const char *reason, ...)
 
 
 /*
- * Takes an expected integer and a seen integer and assumes the test passes
- * if those two numbers match.
+ * Takes two boolean values and requires the truth value of both match.
+ */
+int
+is_bool(int left, int right, const char *format, ...)
+{
+    int success;
+
+    fflush(stderr);
+    check_diag_files();
+    success = (!!left == !!right);
+    if (success)
+        printf("ok %lu", testnum++);
+    else {
+        diag(" left: %s", !!left ? "true" : "false");
+        diag("right: %s", !!right ? "true" : "false");
+        printf("not ok %lu", testnum++);
+        _failed++;
+    }
+    PRINT_DESC(" - ", format);
+    putchar('\n');
+    return success;
+}
+
+
+/*
+ * Takes two integer values and requires they match.
+ */
+int
+is_int(long left, long right, const char *format, ...)
+{
+    int success;
+
+    fflush(stderr);
+    check_diag_files();
+    success = (left == right);
+    if (success)
+        printf("ok %lu", testnum++);
+    else {
+        diag(" left: %ld", left);
+        diag("right: %ld", right);
+        printf("not ok %lu", testnum++);
+        _failed++;
+    }
+    PRINT_DESC(" - ", format);
+    putchar('\n');
+    return success;
+}
+
+
+/*
+ * Takes two strings and requires they match (using strcmp).  NULL arguments
+ * are permitted and handled correctly.
  */
 int
-is_int(long wanted, long seen, const char *format, ...)
+is_string(const char *left, const char *right, const char *format, ...)
 {
     int success;
 
     fflush(stderr);
     check_diag_files();
-    success = (wanted == seen);
+
+    /* Compare the strings, being careful of NULL. */
+    if (left == NULL)
+        success = (right == NULL);
+    else if (right == NULL)
+        success = 0;
+    else
+        success = (strcmp(left, right) == 0);
+
+    /* Report the results. */
     if (success)
         printf("ok %lu", testnum++);
     else {
-        diag("wanted: %ld", wanted);
-        diag("  seen: %ld", seen);
+        diag(" left: %s", left == NULL ? "(null)" : left);
+        diag("right: %s", right == NULL ? "(null)" : right);
         printf("not ok %lu", testnum++);
         _failed++;
     }
@@ -515,26 +601,22 @@ is_int(long wanted, long seen, const char *format, ...)
 
 
 /*
- * Takes a string and what the string should be, and assumes the test passes
- * if those strings match (using strcmp).
+ * Takes two unsigned longs and requires they match.  On failure, reports them
+ * in hex.
  */
 int
-is_string(const char *wanted, const char *seen, const char *format, ...)
+is_hex(unsigned long left, unsigned long right, const char *format, ...)
 {
     int success;
 
-    if (wanted == NULL)
-        wanted = "(null)";
-    if (seen == NULL)
-        seen = "(null)";
     fflush(stderr);
     check_diag_files();
-    success = (strcmp(wanted, seen) == 0);
+    success = (left == right);
     if (success)
         printf("ok %lu", testnum++);
     else {
-        diag("wanted: %s", wanted);
-        diag("  seen: %s", seen);
+        diag(" left: %lx", (unsigned long) left);
+        diag("right: %lx", (unsigned long) right);
         printf("not ok %lu", testnum++);
         _failed++;
     }
@@ -545,22 +627,30 @@ is_string(const char *wanted, const char *seen, const char *format, ...)
 
 
 /*
- * Takes an expected unsigned long and a seen unsigned long and assumes the
- * test passes if the two numbers match.  Otherwise, reports them in hex.
+ * Takes pointers to a regions of memory and requires that len bytes from each
+ * match.  Otherwise reports any bytes which didn't match.
  */
 int
-is_hex(unsigned long wanted, unsigned long seen, const char *format, ...)
+is_blob(const void *left, const void *right, size_t len, const char *format,
+        ...)
 {
     int success;
+    size_t i;
 
     fflush(stderr);
     check_diag_files();
-    success = (wanted == seen);
+    success = (memcmp(left, right, len) == 0);
     if (success)
         printf("ok %lu", testnum++);
     else {
-        diag("wanted: %lx", (unsigned long) wanted);
-        diag("  seen: %lx", (unsigned long) seen);
+        const unsigned char *left_c = (const unsigned char *) left;
+        const unsigned char *right_c = (const unsigned char *) right;
+
+        for (i = 0; i < len; i++) {
+            if (left_c[i] != right_c[i])
+                diag("offset %lu: left %02x, right %02x", (unsigned long) i,
+                     left_c[i], right_c[i]);
+        }
         printf("not ok %lu", testnum++);
         _failed++;
     }
@@ -664,12 +754,12 @@ diag_file_add(const char *name)
 {
     struct diag_file *file, *prev;
 
-    file = bcalloc(1, sizeof(struct diag_file));
+    file = bcalloc_type(1, struct diag_file);
     file->name = bstrdup(name);
     file->file = fopen(file->name, "r");
     if (file->file == NULL)
         sysbail("cannot open %s", name);
-    file->buffer = bmalloc(BUFSIZ);
+    file->buffer = bcalloc_type(BUFSIZ, char);
     file->bufsize = BUFSIZ;
     if (diag_files == NULL)
         diag_files = file;
@@ -717,7 +807,7 @@ bcalloc(size_t n, size_t size)
 
     p = calloc(n, size);
     if (p == NULL)
-        sysbail("failed to calloc %lu", (unsigned long)(n * size));
+        sysbail("failed to calloc %lu", (unsigned long) (n * size));
     return p;
 }
 
@@ -769,6 +859,8 @@ breallocarray(void *p, size_t n, size_t size)
 {
     if (n > 0 && UINT_MAX / n <= size)
         bail("reallocarray too large");
+    if (n == 0)
+        n = 1;
     p = realloc(p, n * size);
     if (p == NULL)
         sysbail("failed to realloc %lu bytes", (unsigned long) (n * size));
@@ -786,7 +878,7 @@ bstrdup(const char *s)
     size_t len;
 
     len = strlen(s) + 1;
-    p = malloc(len);
+    p = (char *) malloc(len);
     if (p == NULL)
         sysbail("failed to strdup %lu bytes", (unsigned long) len);
     memcpy(p, s, len);
@@ -807,11 +899,11 @@ bstrndup(const char *s, size_t n)
     size_t length;
 
     /* Don't assume that the source string is nul-terminated. */
-    for (p = s; (size_t) (p - s) < n && *p != '\0'; p++)
+    for (p = s; (size_t)(p - s) < n && *p != '\0'; p++)
         ;
-    length = (size_t) (p - s);
-    copy = malloc(length + 1);
-    if (p == NULL)
+    length = (size_t)(p - s);
+    copy = (char *) malloc(length + 1);
+    if (copy == NULL)
         sysbail("failed to strndup %lu bytes", (unsigned long) length);
     memcpy(copy, s, length);
     copy[length] = '\0';
@@ -830,7 +922,7 @@ test_file_path(const char *file)
 {
     char *base;
     char *path = NULL;
-    const char *envs[] = { "C_TAP_BUILD", "C_TAP_SOURCE", NULL };
+    const char *envs[] = {"C_TAP_BUILD", "C_TAP_SOURCE", NULL};
     int i;
 
     for (i = 0; envs[i] != NULL; i++) {
@@ -899,21 +991,39 @@ test_tmpdir_free(char *path)
     free(path);
 }
 
-
-/*
- * Register a cleanup function that is called when testing ends.  All such
- * registered functions will be run by finish.
- */
-void
-test_cleanup_register(test_cleanup_func func)
+static void
+register_cleanup(test_cleanup_func func,
+                 test_cleanup_func_with_data func_with_data, void *data)
 {
     struct cleanup_func *cleanup, **last;
 
-    cleanup = bmalloc(sizeof(struct cleanup_func));
+    cleanup = bcalloc_type(1, struct cleanup_func);
     cleanup->func = func;
+    cleanup->func_with_data = func_with_data;
+    cleanup->data = data;
     cleanup->next = NULL;
     last = &cleanup_funcs;
     while (*last != NULL)
         last = &(*last)->next;
     *last = cleanup;
 }
+
+/*
+ * Register a cleanup function that is called when testing ends.  All such
+ * registered functions will be run by finish.
+ */
+void
+test_cleanup_register(test_cleanup_func func)
+{
+    register_cleanup(func, NULL, NULL);
+}
+
+/*
+ * Same as above, but also allows an opaque pointer to be passed to the cleanup
+ * function.
+ */
+void
+test_cleanup_register_with_data(test_cleanup_func_with_data func, void *data)
+{
+    register_cleanup(NULL, func, data);
+}
index a4b1a61dd88a1880e950a42e9b2db4f747ca61be..45f15f2892a72e6843b96b8e133f3baf94b41af8 100644 (file)
@@ -4,9 +4,9 @@
  * This file is part of C TAP Harness.  The current version plus supporting
  * documentation is at <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
  *
- * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016
- *     Russ Allbery <eagle@eyrie.org>
- * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2011, 2012, 2014
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2019 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2001-2002, 2004-2008, 2011-2012, 2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TAP_BASIC_H
 #define TAP_BASIC_H 1
 
+#include <stdarg.h> /* va_list */
+#include <stddef.h> /* size_t */
 #include <tests/tap/macros.h>
-#include <stdarg.h>             /* va_list */
-#include <stddef.h>             /* size_t */
 
 /*
  * Used for iterating through arrays.  ARRAY_SIZE returns the number of
@@ -41,8 +43,8 @@
  * ARRAY_END returns a pointer to the element past the end (ISO C99 makes it
  * legal to refer to such a pointer as long as it's never dereferenced).
  */
-#define ARRAY_SIZE(array)       (sizeof(array) / sizeof((array)[0]))
-#define ARRAY_END(array)        (&(array)[ARRAY_SIZE(array)])
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
+#define ARRAY_END(array)  (&(array)[ARRAY_SIZE(array)])
 
 BEGIN_DECLS
 
@@ -75,8 +77,7 @@ int ok(int success, const char *format, ...)
     __attribute__((__format__(printf, 2, 3)));
 int okv(int success, const char *format, va_list args)
     __attribute__((__format__(printf, 2, 0)));
-void skip(const char *reason, ...)
-    __attribute__((__format__(printf, 1, 2)));
+void skip(const char *reason, ...) __attribute__((__format__(printf, 1, 2)));
 
 /*
  * Report the same status on, or skip, the next count tests.  ok_block()
@@ -88,15 +89,21 @@ void skip_block(unsigned long count, const char *reason, ...)
     __attribute__((__format__(printf, 2, 3)));
 
 /*
- * Check an expected value against a seen value.  Returns true if the test
- * passes and false if it fails.
+ * Compare two values.  Returns true if the test passes and false if it fails.
+ * is_bool takes an int since the bool type isn't fully portable yet, but
+ * interprets both arguments for their truth value, not for their numeric
+ * value.
  */
-int is_int(long wanted, long seen, const char *format, ...)
+int is_bool(int, int, const char *format, ...)
+    __attribute__((__format__(printf, 3, 4)));
+int is_int(long, long, const char *format, ...)
     __attribute__((__format__(printf, 3, 4)));
-int is_string(const char *wanted, const char *seen, const char *format, ...)
+int is_string(const char *, const char *, const char *format, ...)
     __attribute__((__format__(printf, 3, 4)));
-int is_hex(unsigned long wanted, unsigned long seen, const char *format, ...)
+int is_hex(unsigned long, unsigned long, const char *format, ...)
     __attribute__((__format__(printf, 3, 4)));
+int is_blob(const void *, const void *, size_t, const char *format, ...)
+    __attribute__((__format__(printf, 4, 5)));
 
 /* Bail out with an error.  sysbail appends strerror(errno). */
 void bail(const char *format, ...)
@@ -117,10 +124,8 @@ int sysdiag(const char *format, ...)
  * diag().  Nul characters are not supported in these files and will result in
  * truncated output.
  */
-void diag_file_add(const char *file)
-    __attribute__((__nonnull__));
-void diag_file_remove(const char *file)
-    __attribute__((__nonnull__));
+void diag_file_add(const char *file) __attribute__((__nonnull__));
+void diag_file_remove(const char *file) __attribute__((__nonnull__));
 
 /* Allocate memory, reporting a fatal error with bail on failure. */
 void *bcalloc(size_t, size_t)
@@ -136,6 +141,14 @@ char *bstrdup(const char *)
 char *bstrndup(const char *, size_t)
     __attribute__((__malloc__, __nonnull__, __warn_unused_result__));
 
+/*
+ * Macros that cast the return value from b* memory functions, making them
+ * usable in C++ code and providing some additional type safety.
+ */
+#define bcalloc_type(n, type) ((type *) bcalloc((n), sizeof(type)))
+#define breallocarray_type(p, n, type) \
+    ((type *) breallocarray((p), (n), sizeof(type)))
+
 /*
  * Find a test file under C_TAP_BUILD or C_TAP_SOURCE, returning the full
  * path.  The returned path should be freed with test_file_path_free().
@@ -148,8 +161,7 @@ void test_file_path_free(char *path);
  * Create a temporary directory relative to C_TAP_BUILD and return the path.
  * The returned path should be freed with test_tmpdir_free().
  */
-char *test_tmpdir(void)
-    __attribute__((__malloc__, __warn_unused_result__));
+char *test_tmpdir(void) __attribute__((__malloc__, __warn_unused_result__));
 void test_tmpdir_free(char *path);
 
 /*
@@ -160,10 +172,19 @@ void test_tmpdir_free(char *path);
  * The function must return void and will be passed two arguments: an int that
  * will be true if the test completed successfully and false otherwise, and an
  * int that will be true if the cleanup function is run in the primary process
- * (the one that called plan or plan_lazy) and false otherwise.
+ * (the one that called plan or plan_lazy) and false otherwise.  If
+ * test_cleanup_register_with_data is used instead, a generic pointer can be
+ * provided and will be passed to the cleanup function as a third argument.
+ *
+ * test_cleanup_register_with_data is the better API and should have been the
+ * only API.  test_cleanup_register was an API error preserved for backward
+ * cmpatibility.
  */
 typedef void (*test_cleanup_func)(int, int);
-void test_cleanup_register(test_cleanup_func)
+typedef void (*test_cleanup_func_with_data)(int, int, void *);
+
+void test_cleanup_register(test_cleanup_func) __attribute__((__nonnull__));
+void test_cleanup_register_with_data(test_cleanup_func_with_data, void *)
     __attribute__((__nonnull__));
 
 END_DECLS
index 5551fbc8d35776e1b640440054e8adeadff438e6..765d80290a64082b8bd38373b608545b705e9932 100644 (file)
@@ -15,7 +15,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2010, 2011, 2012, 2013, 2014
+ * Copyright 2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2007, 2009-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
 #ifdef HAVE_KRB5
-# include <portable/krb5.h>
+#    include <portable/krb5.h>
 #endif
 #include <portable/system.h>
 
@@ -56,7 +59,7 @@
  * to handle the possible patterns for kinit commands as an array.
  */
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__)
-# pragma GCC diagnostic ignored "-Wformat-nonliteral"
+#    pragma GCC diagnostic ignored "-Wformat-nonliteral"
 #endif
 
 
@@ -155,12 +158,11 @@ kerberos_kinit(void)
 static void
 kerberos_kinit(void)
 {
-    static const char * const format[] = {
+    static const char *const format[] = {
         "kinit --no-afslog -k -t %s %s >/dev/null 2>&1 </dev/null",
         "kinit -k -t %s %s >/dev/null 2>&1 </dev/null",
         "kinit -t %s %s >/dev/null 2>&1 </dev/null",
-        "kinit -k -K %s %s >/dev/null 2>&1 </dev/null"
-    };
+        "kinit -k -K %s %s >/dev/null 2>&1 </dev/null"};
     FILE *file;
     char *path;
     char principal[BUFSIZ], *command;
@@ -361,7 +363,7 @@ kerberos_setup(enum kerberos_needs needs)
     path = test_file_path("config/pkinit-principal");
     if (path != NULL)
         file = fopen(path, "r");
-    if (file != NULL) {
+    if (path != NULL && file != NULL) {
         if (fgets(buffer, sizeof(buffer), file) == NULL)
             bail("cannot read %s", path);
         if (buffer[strlen(buffer) - 1] != '\n')
@@ -457,17 +459,19 @@ kerberos_generate_conf(const char *realm)
 
 
 /*
- * Report a Kerberos error and bail out.
+ * Report a Kerberos error and bail out.  Takes a long instead of a
+ * krb5_error_code because it can also handle a kadm5_ret_t (which may be a
+ * different size).
  */
 void
-bail_krb5(krb5_context ctx, krb5_error_code code, const char *format, ...)
+bail_krb5(krb5_context ctx, long code, const char *format, ...)
 {
     const char *k5_msg = NULL;
     char *message;
     va_list args;
 
     if (ctx != NULL)
-        k5_msg = krb5_get_error_message(ctx, code);
+        k5_msg = krb5_get_error_message(ctx, (krb5_error_code) code);
     va_start(args, format);
     bvasprintf(&message, format, args);
     va_end(args);
@@ -479,17 +483,19 @@ bail_krb5(krb5_context ctx, krb5_error_code code, const char *format, ...)
 
 
 /*
- * Report a Kerberos error as a diagnostic to stderr.
+ * Report a Kerberos error as a diagnostic to stderr.  Takes a long instead of
+ * a krb5_error_code because it can also handle a kadm5_ret_t (which may be a
+ * different size).
  */
 void
-diag_krb5(krb5_context ctx, krb5_error_code code, const char *format, ...)
+diag_krb5(krb5_context ctx, long code, const char *format, ...)
 {
     const char *k5_msg = NULL;
     char *message;
     va_list args;
 
     if (ctx != NULL)
-        k5_msg = krb5_get_error_message(ctx, code);
+        k5_msg = krb5_get_error_message(ctx, (krb5_error_code) code);
     va_start(args, format);
     bvasprintf(&message, format, args);
     va_end(args);
@@ -524,14 +530,12 @@ kerberos_keytab_principal(krb5_context ctx, const char *path)
     if (status != 0)
         bail_krb5(ctx, status, "error reading %s", path);
     status = krb5_kt_next_entry(ctx, keytab, &entry, &cursor);
-    if (status == 0) {
-        status = krb5_copy_principal(ctx, entry.principal, &princ);
-        if (status != 0)
-            bail_krb5(ctx, status, "error copying principal from %s", path);
-        krb5_kt_free_entry(ctx, &entry);
-    }
     if (status != 0)
         bail("no principal found in keytab file %s", path);
+    status = krb5_copy_principal(ctx, entry.principal, &princ);
+    if (status != 0)
+        bail_krb5(ctx, status, "error copying principal from %s", path);
+    krb5_kt_free_entry(ctx, &entry);
     krb5_kt_end_seq_get(ctx, keytab, &cursor);
     krb5_kt_close(ctx, keytab);
     return princ;
index c0e7a1bd363edf41b9052bb385145a4482965cc1..066490509df2c9db0bfbd36ce6852cb13dab1f26 100644 (file)
@@ -5,7 +5,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2009, 2011, 2012, 2013, 2014
+ * Copyright 2017, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2006-2007, 2009, 2011-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,6 +26,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TAP_KERBEROS_H
 #include <tests/tap/macros.h>
 
 #ifdef HAVE_KRB5
-# include <portable/krb5.h>
+#    include <portable/krb5.h>
 #endif
 
 /* Holds the information parsed from the Kerberos test configuration. */
 struct kerberos_config {
-    char *keytab;               /* Path to the keytab. */
-    char *principal;            /* Principal whose keys are in the keytab. */
-    char *cache;                /* Path to the Kerberos ticket cache. */
-    char *userprinc;            /* The fully-qualified principal. */
-    char *username;             /* The local (non-realm) part of principal. */
-    char *realm;                /* The realm part of the principal. */
-    char *password;             /* The password. */
-    char *pkinit_principal;     /* Principal for PKINIT authentication. */
-    char *pkinit_cert;          /* Path to certificates for PKINIT. */
+    char *keytab;           /* Path to the keytab. */
+    char *principal;        /* Principal whose keys are in the keytab. */
+    char *cache;            /* Path to the Kerberos ticket cache. */
+    char *userprinc;        /* The fully-qualified principal. */
+    char *username;         /* The local (non-realm) part of principal. */
+    char *realm;            /* The realm part of the principal. */
+    char *password;         /* The password. */
+    char *pkinit_principal; /* Principal for PKINIT authentication. */
+    char *pkinit_cert;      /* Path to certificates for PKINIT. */
 };
 
 /*
@@ -56,11 +59,13 @@ struct kerberos_config {
  * tests require both keytab and password, but PKINIT is not required.
  */
 enum kerberos_needs {
+    /* clang-format off */
     TAP_KRB_NEEDS_NONE     = 0x00,
     TAP_KRB_NEEDS_KEYTAB   = 0x01,
     TAP_KRB_NEEDS_PASSWORD = 0x02,
     TAP_KRB_NEEDS_BOTH     = 0x01 | 0x02,
     TAP_KRB_NEEDS_PKINIT   = 0x04
+    /* clang-format on */
 };
 
 BEGIN_DECLS
@@ -103,15 +108,15 @@ void kerberos_cleanup(void);
 void kerberos_generate_conf(const char *realm);
 void kerberos_cleanup_conf(void);
 
-/* Thes interfaces are only available with native Kerberos support. */
+/* These interfaces are only available with native Kerberos support. */
 #ifdef HAVE_KRB5
 
 /* Bail out with an error, appending the Kerberos error message. */
-void bail_krb5(krb5_context, krb5_error_code, const char *format, ...)
+void bail_krb5(krb5_context, long, const char *format, ...)
     __attribute__((__noreturn__, __nonnull__(3), __format__(printf, 3, 4)));
 
 /* Report a diagnostic with Kerberos error to stderr prefixed with #. */
-void diag_krb5(krb5_context, krb5_error_code, const char *format, ...)
+void diag_krb5(krb5_context, long, const char *format, ...)
     __attribute__((__nonnull__(3), __format__(printf, 3, 4)));
 
 /*
index a7aee0fef31293cb1695de32c83e72be0b6185b6..1827a689e380ee9af32e4c51407c98af1d97f334 100644 (file)
@@ -10,8 +10,8 @@
 # <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2009, 2010, 2011, 2012, 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2006, 2007, 2008, 2013
+# Copyright 2009-2012, 2016 Russ Allbery <eagle@eyrie.org>
+# Copyright 2006-2008, 2013
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,6 +31,8 @@
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
 # Print out the number of test cases we expect to run.
 plan () {
index 2cd1e87a127edd4cc30bcb61dc69cbeab79b33cf..c2c8b5c7315ddf43ca9e99532c0f61d0f95d25ef 100644 (file)
@@ -8,7 +8,7 @@
  * This file is part of C TAP Harness.  The current version plus supporting
  * documentation is at <https://www.eyrie.org/~eagle/software/c-tap-harness/>.
  *
- * Copyright 2008, 20122013, 2015 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008, 2012-2013, 2015 Russ Allbery <eagle@eyrie.org>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -27,6 +27,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TAP_MACROS_H
@@ -40,9 +42,9 @@
  * the other attributes to work with GCC versions between 2.7 and 2.96.
  */
 #ifndef __attribute__
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-#  define __attribute__(spec)   /* empty */
-# endif
+#    if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+#        define __attribute__(spec) /* empty */
+#    endif
 #endif
 
 /*
  * variadic macro support.
  */
 #if !defined(__attribute__) && !defined(__alloc_size__)
-# if defined(__GNUC__) && !defined(__clang__)
-#  if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
-#   define __alloc_size__(spec, args...) /* empty */
-#  endif
-# endif
+#    if defined(__GNUC__) && !defined(__clang__)
+#        if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+#            define __alloc_size__(spec, args...) /* empty */
+#        endif
+#    endif
 #endif
 
 /* Suppress __warn_unused_result__ if gcc is too old. */
 #if !defined(__attribute__) && !defined(__warn_unused_result__)
-# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
-#  define __warn_unused_result__ /* empty */
-# endif
+#    if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4)
+#        define __warn_unused_result__ /* empty */
+#    endif
 #endif
 
 /*
@@ -74,7 +76,7 @@
  * compilation context, but there's no push and pop available.
  */
 #if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__))
-# pragma GCC diagnostic ignored "-Wattributes"
+#    pragma GCC diagnostic ignored "-Wattributes"
 #endif
 
 /* Used for unused parameters to silence gcc warnings. */
 #undef BEGIN_DECLS
 #undef END_DECLS
 #ifdef __cplusplus
-# define BEGIN_DECLS    extern "C" {
-# define END_DECLS      }
+#    define BEGIN_DECLS extern "C" {
+#    define END_DECLS   }
 #else
-# define BEGIN_DECLS    /* empty */
-# define END_DECLS      /* empty */
+#    define BEGIN_DECLS /* empty */
+#    define END_DECLS   /* empty */
 #endif
 
 #endif /* TAP_MACROS_H */
index bcd653240f4676ae102f4694385450db00dc81bf..cd106d03e272cbcfb59eae8550e21489347d7715 100644 (file)
@@ -5,28 +5,46 @@
 # by both C packages with Automake and by stand-alone Perl modules.  See
 # Test::RRA::Automake for additional functions specifically for C Automake
 # distributions.
+#
+# SPDX-License-Identifier: MIT
 
 package Test::RRA;
 
-use 5.006;
+use 5.008;
+use base qw(Exporter);
 use strict;
 use warnings;
 
-use Exporter;
+use Carp qw(croak);
 use File::Temp;
-use Test::More;
 
-# For Perl 5.006 compatibility.
-## no critic (ClassHierarchies::ProhibitExplicitISA)
+# Abort if Test::More was loaded before Test::RRA to be sure that we get the
+# benefits of the Test::More probing below.
+if ($INC{'Test/More.pm'}) {
+    croak('Test::More loaded before Test::RRA');
+}
+
+# Red Hat's base perl package doesn't include Test::More (one has to install
+# the perl-core package in addition).  Try to detect this and skip any Perl
+# tests if Test::More is not present.  This relies on Test::RRA being included
+# before Test::More.
+eval {
+    require Test::More;
+    Test::More->import();
+};
+if ($@) {
+    print "1..0 # SKIP Test::More required for test\n"
+      or croak('Cannot write to stdout');
+    exit 0;
+}
 
 # Declare variables that should be set in BEGIN for robustness.
-our (@EXPORT_OK, @ISA, $VERSION);
+our (@EXPORT_OK, $VERSION);
 
 # Set $VERSION and everything export-related in a BEGIN block for robustness
 # against circular module loading (not that we load any modules, but
 # consistency is good).
 BEGIN {
-    @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
       is_file_contents skip_unless_author skip_unless_automated use_prereq
     );
@@ -34,7 +52,7 @@ BEGIN {
     # This version should match the corresponding rra-c-util release, but with
     # two digits for the minor version, including a leading zero if necessary,
     # so that it will sort properly.
-    $VERSION = '6.02';
+    $VERSION = '8.02';
 }
 
 # Compare a string to the contents of a file, similar to the standard is()
@@ -59,22 +77,27 @@ sub is_file_contents {
         return;
     }
 
-    # Otherwise, we show a diff, but only if we have IPC::System::Simple.
-    eval { require IPC::System::Simple };
+    # Otherwise, we show a diff, but only if we have IPC::System::Simple and
+    # diff succeeds.  Otherwise, we fall back on showing the full expected and
+    # seen output.
+    eval {
+        require IPC::System::Simple;
+
+        my $tmp     = File::Temp->new();
+        my $tmpname = $tmp->filename;
+        print {$tmp} $got or BAIL_OUT("Cannot write to $tmpname: $!\n");
+        my @command = ('diff', '-u', $expected, $tmpname);
+        my $diff    = IPC::System::Simple::capturex([0 .. 1], @command);
+        diag($diff);
+    };
     if ($@) {
-        ok(0, $message);
-        return;
+        diag('Expected:');
+        diag($expected);
+        diag('Seen:');
+        diag($data);
     }
 
-    # They're not equal.  Write out what we got so that we can run diff.
-    my $tmp     = File::Temp->new();
-    my $tmpname = $tmp->filename;
-    print {$tmp} $got or BAIL_OUT("Cannot write to $tmpname: $!\n");
-    my @command = ('diff', '-u', $expected, $tmpname);
-    my $diff = IPC::System::Simple::capturex([0 .. 1], @command);
-    diag($diff);
-
-    # Remove the temporary file and report failure.
+    # Report failure.
     ok(0, $message);
     return;
 }
@@ -89,7 +112,7 @@ sub is_file_contents {
 sub skip_unless_author {
     my ($description) = @_;
     if (!$ENV{AUTHOR_TESTING}) {
-        plan skip_all => "$description only run for author";
+        plan(skip_all => "$description only run for author");
     }
     return;
 }
@@ -108,7 +131,7 @@ sub skip_unless_automated {
     for my $env (qw(AUTOMATED_TESTING RELEASE_TESTING AUTHOR_TESTING)) {
         return if $ENV{$env};
     }
-    plan skip_all => "$description normally skipped";
+    plan(skip_all => "$description normally skipped");
     return;
 }
 
@@ -150,14 +173,14 @@ sub use_prereq {
             use $module $version \@imports;
             1;
         };
-        $error = $@;
+        $error  = $@;
         $sigdie = $SIG{__DIE__} || undef;
     }
 
     # If the use failed for any reason, skip the test.
     if (!$result || $error) {
         my $name = length($version) > 0 ? "$module $version" : $module;
-        plan skip_all => "$name required for test";
+        plan(skip_all => "$name required for test");
     }
 
     # If the module set $SIG{__DIE__}, we cleared that via local.  Restore it.
@@ -200,6 +223,14 @@ This module collects utility functions that are useful for Perl test scripts.
 It assumes Russ Allbery's Perl module layout and test conventions and will
 only be useful for other people if they use the same conventions.
 
+This module B<must> be loaded before Test::More or it will abort during
+import.  It will skip the test (by printing a skip message to standard output
+and exiting with status 0, equivalent to C<plan skip_all>) during import if
+Test::More is not available.  This allows tests written in Perl using this
+module to be skipped if run on a system with Perl but not Test::More, such as
+Red Hat systems with the C<perl> package but not the C<perl-core> package
+installed.
+
 =head1 FUNCTIONS
 
 None of these functions are imported by default.  The ones used by a script
@@ -244,7 +275,9 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2013, 2014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2016, 2018-2019 Russ Allbery <eagle@eyrie.org>
+
+Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -277,3 +310,7 @@ by the L<Lancaster
 Consensus|https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md>.
 
 =cut
+
+# Local Variables:
+# copyright-at-end-flag: t
+# End:
index 429666790eda6e148a5ff0970da7ca780a7cfc10..16c9b0153dbe502970196d1e7ef46aee5a23de94 100644 (file)
 # All the functions here assume that C_TAP_BUILD and C_TAP_SOURCE are set in
 # the environment.  This is normally done via the C TAP Harness runtests
 # wrapper.
+#
+# SPDX-License-Identifier: MIT
 
 package Test::RRA::Automake;
 
-use 5.006;
+use 5.008;
+use base qw(Exporter);
 use strict;
 use warnings;
 
-# For Perl 5.006 compatibility.
-## no critic (ClassHierarchies::ProhibitExplicitISA)
-
 use Exporter;
 use File::Find qw(find);
 use File::Spec;
@@ -52,13 +52,12 @@ use lib $PERL_BLIB_ARCH;
 use lib $PERL_BLIB_LIB;
 
 # Declare variables that should be set in BEGIN for robustness.
-our (@EXPORT_OK, @ISA, $VERSION);
+our (@EXPORT_OK, $VERSION);
 
 # Set $VERSION and everything export-related in a BEGIN block for robustness
 # against circular module loading (not that we load any modules, but
 # consistency is good).
 BEGIN {
-    @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
       all_files automake_setup perl_dirs test_file_path test_tmpdir
     );
@@ -66,17 +65,22 @@ BEGIN {
     # This version should match the corresponding rra-c-util release, but with
     # two digits for the minor version, including a leading zero if necessary,
     # so that it will sort properly.
-    $VERSION = '6.02';
+    $VERSION = '8.02';
 }
 
 # Directories to skip globally when looking for all files, or for directories
 # that could contain Perl files.
-my @GLOBAL_SKIP = qw(.git _build autom4te.cache build-aux);
+my @GLOBAL_SKIP = qw(
+  .git .pc _build autom4te.cache build-aux perl/_build perl/blib
+);
 
 # Additional paths to skip when building a list of all files in the
 # distribution.  This primarily skips build artifacts that aren't interesting
 # to any of the tests.  These match any path component.
-my @FILES_SKIP = qw(.deps .dirstamp .libs config.h.in~ configure);
+my @FILES_SKIP = qw(
+  .deps .dirstamp .libs aclocal.m4 config.h config.h.in config.h.in~ config.log
+  config.status configure
+);
 
 # The temporary directory created by test_tmpdir, if any.  If this is set,
 # attempt to remove the directory stored here on program exit (but ignore
@@ -99,7 +103,7 @@ sub all_files {
         my $file = $_;
         my $path = $File::Find::name;
         $path =~ s{ \A [.]/ }{}xms;
-        if ($skip{$path} or $files_skip{$file} or $file =~ m{ [.] lo \z }xms) {
+        if ($skip{$path} || $files_skip{$file} || $file =~ m{ [.] lo \z }xms) {
             $File::Find::prune = 1;
             return;
         }
@@ -182,7 +186,7 @@ sub automake_setup {
         @builddirs = File::Spec->splitdir($builddirs);
         pop(@builddirs);
         my $libdir = File::Spec->catdir(@builddirs, $LIBRARY_PATH);
-        my $path = File::Spec->catpath($buildvol, $libdir, q{});
+        my $path   = File::Spec->catpath($buildvol, $libdir, q{});
         if (-d "$path/.libs") {
             $path .= '/.libs';
         }
@@ -222,7 +226,7 @@ sub perl_dirs {
     }
 
     # Convert the skip lists into hashes for convenience.
-    my %skip = map { $_ => 1 } @skip, 'tests';
+    my %skip       = map { $_ => 1 } @skip, 'tests';
     my %skip_tests = map { $_ => 1 } @skip_tests;
 
     # Build the list of top-level directories to test.
@@ -444,7 +448,7 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2014, 2015 Russ Allbery <eagle@eyrie.org>
+Copyright 2014-2015, 2018-2020 Russ Allbery <eagle@eyrie.org>
 
 Copyright 2013 The Board of Trustees of the Leland Stanford Junior University
 
@@ -477,3 +481,7 @@ The C TAP Harness test driver and libraries for TAP-based C testing are
 available from L<https://www.eyrie.org/~eagle/software/c-tap-harness/>.
 
 =cut
+
+# Local Variables:
+# copyright-at-end-flag: t
+# End:
index bdb31e60c0f31513c49730ec9ee58834c40cc49d..70641405c6cd15352a5057e56a2d066ce9b97960 100644 (file)
@@ -4,27 +4,25 @@
 # configuration file to store some package-specific data.  This module loads
 # that configuration and provides the namespace for the configuration
 # settings.
+#
+# SPDX-License-Identifier: MIT
 
 package Test::RRA::Config;
 
-use 5.006;
+use 5.008;
+use base qw(Exporter);
 use strict;
 use warnings;
 
-# For Perl 5.006 compatibility.
-## no critic (ClassHierarchies::ProhibitExplicitISA)
-
-use Exporter;
 use Test::More;
 
 # Declare variables that should be set in BEGIN for robustness.
-our (@EXPORT_OK, @ISA, $VERSION);
+our (@EXPORT_OK, $VERSION);
 
 # Set $VERSION and everything export-related in a BEGIN block for robustness
 # against circular module loading (not that we load any modules, but
 # consistency is good).
 BEGIN {
-    @ISA       = qw(Exporter);
     @EXPORT_OK = qw(
       $COVERAGE_LEVEL @COVERAGE_SKIP_TESTS @CRITIC_IGNORE $LIBRARY_PATH
       $MINIMUM_VERSION %MINIMUM_VERSION @MODULE_VERSION_IGNORE
@@ -34,7 +32,7 @@ BEGIN {
     # This version should match the corresponding rra-c-util release, but with
     # two digits for the minor version, including a leading zero if necessary,
     # so that it will sort properly.
-    $VERSION = '6.02';
+    $VERSION = '8.02';
 }
 
 # If C_TAP_BUILD or C_TAP_SOURCE are set in the environment, look for
@@ -185,9 +183,9 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2015, 2016 Russ Allbery <eagle@eyrie.org>
+Copyright 2015-2016, 2019 Russ Allbery <eagle@eyrie.org>
 
-Copyright 20132014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -220,3 +218,7 @@ The C TAP Harness test driver and libraries for TAP-based C testing are
 available from L<https://www.eyrie.org/~eagle/software/c-tap-harness/>.
 
 =cut
+
+# Local Variables:
+# copyright-at-end-flag: t
+# End:
index 45bbe468e1d391c879ff58b6e8e95e48064f7f09..2f797f8f756728531124a4636c0301d4f9178a11 100644 (file)
@@ -14,8 +14,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2002, 2004, 2005, 2013, 2016 Russ Allbery <eagle@eyrie.org>
- * Copyright 2009, 2010, 2011, 2013, 2014
+ * Copyright 2002, 2004-2005, 2013, 2016-2017 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2011, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -35,6 +35,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
 #include <fcntl.h>
 #include <signal.h>
 #ifdef HAVE_SYS_SELECT_H
-# include <sys/select.h>
+#    include <sys/select.h>
 #endif
 #include <sys/stat.h>
 #ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+#    include <sys/time.h>
 #endif
 #include <sys/wait.h>
 #include <time.h>
@@ -59,7 +61,7 @@
 
 /* May be defined by the build system. */
 #ifndef PATH_FAKEROOT
-# define PATH_FAKEROOT ""
+#    define PATH_FAKEROOT ""
 #endif
 
 /* How long to wait for the process to start in seconds. */
  * everything required to stop the process and clean up after it.
  */
 struct process {
-    pid_t pid;                  /* PID of child process */
-    char *pidfile;              /* PID file to delete on process stop */
-    char *tmpdir;               /* Temporary directory for log file */
-    char *logfile;              /* Log file of process output */
-    bool is_child;              /* Whether we can waitpid for process */
-    struct process *next;       /* Next process in global list */
+    pid_t pid;            /* PID of child process */
+    char *pidfile;        /* PID file to delete on process stop */
+    char *tmpdir;         /* Temporary directory for log file */
+    char *logfile;        /* Log file of process output */
+    bool is_child;        /* Whether we can waitpid for process */
+    struct process *next; /* Next process in global list */
 };
 
 /*
@@ -366,7 +368,7 @@ process_stop_all(int success UNUSED, int primary)
  * Read the PID of a process from a file.  This is necessary when running
  * under fakeroot to get the actual PID of the remctld process.
  */
-static long
+static pid_t
 read_pidfile(const char *path)
 {
     FILE *file;
@@ -382,7 +384,7 @@ read_pidfile(const char *path)
     pid = strtol(buffer, NULL, 10);
     if (pid <= 0)
         bail("cannot read PID from %s", path);
-    return pid;
+    return (pid_t) pid;
 }
 
 
index 7e008bece9299f4c9144823b0e537e89fa558d0a..4210c209ed0b3e849c99cd9d056993921f016483 100644 (file)
@@ -5,7 +5,7 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 20092010, 2013
+ * Copyright 2009-2010, 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,6 +25,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TAP_PROCESS_H
@@ -60,8 +62,7 @@ void is_function_output(test_function_type, void *data, int status,
  * successfully, call bail, with the error message being the output from the
  * program.
  */
-void run_setup(const char *const argv[])
-    __attribute__((__nonnull__));
+void run_setup(const char *const argv[]) __attribute__((__nonnull__));
 
 /*
  * process_start starts a process in the background, returning an opaque data
index 56450294ddebdcd33813fd2a5b94e77ec9104aba..71cf571e6f03b0389ceff3799bc72d56ba71d4ce 100644 (file)
@@ -7,7 +7,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Copyright 20112012 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2011-2012 Russ Allbery <eagle@eyrie.org>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -26,6 +26,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
index 73e34eef7c92778ebc28d540522793998b13ba2e..651c38a26f0639360d52ddf8693dfe6ed69fed84 100644 (file)
@@ -7,7 +7,7 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Copyright 20112012 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2011-2012 Russ Allbery <eagle@eyrie.org>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -26,6 +26,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef TAP_STRING_H
@@ -34,7 +36,7 @@
 #include <config.h>
 #include <tests/tap/macros.h>
 
-#include <stdarg.h>             /* va_list */
+#include <stdarg.h> /* va_list */
 
 BEGIN_DECLS
 
index e00190088dfe2e52fd13f39cb45f01199a23809d..f52467c10fc229c93d8ee5bc3b409d9332ea3276 100755 (executable)
@@ -3,10 +3,11 @@
 # Test suite for Heimdal per-principal history.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2020 Russ Allbery <eagle@eyrie.org>
 # Copyright 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 use 5.006;
 use strict;
@@ -14,11 +15,12 @@ use warnings;
 
 use lib "$ENV{SOURCE}/tap/perl";
 
-use Fcntl qw(O_CREAT O_RDWR);
-use Test::More;
 use Test::RRA qw(use_prereq);
 use Test::RRA::Automake qw(test_file_path test_tmpdir);
 
+use Fcntl qw(O_CREAT O_RDWR);
+use Test::More;
+
 # Not all of these are used by the test suite, but the rest are required to
 # run the program we're testing, so make sure they can all be loaded.
 use_prereq('DB_File::Lock');
@@ -37,11 +39,12 @@ use_prereq('Readonly');
 #
 # $principal - Principal to pass to the command
 # $password  - Password to pass to the command
+# @extra     - Additional options to pass to heimdal-history
 #
 # Returns: The exit status, standard output, and standard error as a list
 #  Throws: Text exception on failure to run the test program
 sub run_heimdal_history {
-    my ($principal, $password) = @_;
+    my ($principal, $password, @extra) = @_;
 
     # Build the input to the strength checking program.
     my $in = "principal: $principal\n";
@@ -62,6 +65,7 @@ sub run_heimdal_history {
         '-S' => "$tmpdir/lengths.db",
         '-s' => $strength,
     );
+    push(@options, @extra);
 
     # Run the password strength checker.
     my ($out, $err);
@@ -101,7 +105,7 @@ sub check_password {
     is($status, $test_ref->{status} || 0, "$test_ref->{name} (status)");
     if (defined($test_ref->{error})) {
         is($err, $test_ref->{error}, '...error message');
-        is($out, q{}, '...no output');
+        is($out, q{},                '...no output');
     } else {
         is($err, q{},        '...no errors');
         is($out, 'APPROVED', '...approved');
@@ -133,7 +137,7 @@ my $tests = load_password_tests('history.json');
 
 # Calculate and declare the plan.  We run three tests for each password test,
 # and then do some additional testing of the length statistics.
-plan(tests => scalar(@{$tests}) * 3 + 2);
+plan(tests => scalar(@{$tests}) * 3 + 8);
 
 # Point to a generic krb5.conf file.  This ensures that the heimdal-strength
 # program will only do principal-based strength checks.
@@ -156,6 +160,19 @@ ok(tie(%lengthdb, 'DB_File::Lock', [$path, $mode, oct(600)], 'write'),
     'Length database exists');
 is_deeply(\%lengthdb, \%lengths, '...and contents are correct');
 
+# Check the same password twice in a row with the -c option.  It should be
+# accepted both times, instead of rejected the second time as a duplicate.
+my ($status, $out, $err)
+  = run_heimdal_history('test@EXAMPLE.ORG', 'somepass', '-c');
+is($status, 0,            'First password check succeeds');
+is($out,    "APPROVED\n", '...with correct output');
+is($err,    q{},          '...and no error');
+($status, $out, $err)
+  = run_heimdal_history('test@EXAMPLE.ORG', 'somepass', '-c');
+is($status, 0,            'Second password check still succeeds');
+is($out,    "APPROVED\n", '...with correct output');
+is($err,    q{},          '...and no error');
+
 # Clean up the databases and lock files on any exit.
 END {
     my $tmpdir = test_tmpdir();
index e6924405c9e57e86cdfb2e73fe2ba786c894667b..5e7b1cb9da8cd9f53f8404335979749bddbc7d66 100755 (executable)
@@ -3,11 +3,11 @@
 # Test suite for basic Heimdal external strength checking functionality.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2009, 2012, 2013, 2014
+# Copyright 2016-2017, 2020 Russ Allbery <eagle@eyrie.org>
+# Copyright 2009, 2012-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 use 5.006;
 use strict;
@@ -24,6 +24,77 @@ use_prereq('JSON');
 use_prereq('Perl6::Slurp', 'slurp');
 use_prereq('Test::More',   '0.87_01');
 
+# Data directory to use for dictionaries.
+my $DATADIR = $ENV{BUILD} ? "$ENV{BUILD}/data" : 'tests/data';
+
+# This data structure drives most of our tests.  Each list element is a block
+# of tests to run together with a specific Kerberos configuration.  The keys
+# are:
+#
+# title  - Title of the tests for test output
+# config - Hash of Kerberos configuration to use
+# needs  - Dictionary type name we have to have to run this test
+# tests  - List of classes of tests to run (JSON files in tests/data/passwords)
+my @TESTS = (
+    {
+        title  => 'Generic tests',
+        config => {},
+        tests  => [qw(principal)],
+    },
+    {
+        title  => 'CrackLib tests',
+        config => { password_dictionary => "$DATADIR/dictionary" },
+        needs  => 'CrackLib',
+        tests  => [qw(cracklib principal)],
+    },
+    {
+        title  => 'Password length tests',
+        config => { minimum_length => 12 },
+        tests  => [qw(length)],
+    },
+    {
+        title  => 'Password length tests with cracklib_maxlen',
+        config => {
+            password_dictionary => "$DATADIR/dictionary",
+            minimum_length      => 12,
+            cracklib_maxlen     => 11,
+        },
+        needs => 'CrackLib',
+        tests => [qw(length)],
+    },
+    {
+        title  => 'Simple password character class tests',
+        config => {
+            minimum_different       => 8,
+            require_ascii_printable => 'true',
+            require_non_letter      => 'true',
+        },
+        tests => [qw(letter)],
+    },
+    {
+        title  => 'Complex password character class tests',
+        config => {
+            require_classes =>
+              '8-19:lower,upper 8-15:digit 8-11:symbol 24-24:3',
+        },
+        tests => [qw(classes)],
+    },
+    {
+        title => 'CDB tests',
+        config =>
+          { password_dictionary_cdb => test_file_path('data/wordlist.cdb') },
+        tests => [qw(cdb principal)],
+    },
+    {
+        title  => 'SQLite tests',
+        config => {
+            password_dictionary_sqlite =>
+              test_file_path('data/wordlist.sqlite'),
+        },
+        tests => [qw(sqlite principal)],
+    },
+);
+
 # Run the newly-built heimdal-strength command and return the status, output,
 # and error output as a list.  If told to expect an immediate error, does not
 # pass input to the process.
@@ -51,7 +122,7 @@ sub run_heimdal_strength {
     # Run the password strength checker.
     my ($out, $err);
     my $harness = run([$program, $principal], \$in, \$out, \$err);
-    my $status = $? >> 8;
+    my $status  = $? >> 8;
 
     # Return the results.
     return ($status, $out, $err);
@@ -86,7 +157,7 @@ sub check_password {
     is($status, $test_ref->{status} || 0, "$test_ref->{name} (status)");
     if (defined($test_ref->{error})) {
         is($err, $test_ref->{error}, '...error message');
-        is($out, q{}, '...no output');
+        is($out, q{},                '...no output');
     } else {
         is($err, q{},        '...no errors');
         is($out, 'APPROVED', '...approved');
@@ -152,6 +223,48 @@ sub load_password_tests {
     return $json->decode($testdata);
 }
 
+# Run a block of password tests, handling krb5.conf setup and skipping tests
+# if required dictionary support isn't available.
+#
+# $spec_ref  - Test specification (from @TESTS)
+# $tests_ref - Hash structure containing all loaded password tests
+#
+# Returns: undef
+sub run_password_tests {
+    my ($spec_ref, $tests_ref) = @_;
+    my $krb5_conf = create_krb5_conf($spec_ref->{config});
+    local $ENV{KRB5_CONFIG} = $krb5_conf;
+    note($spec_ref->{title});
+
+    # If we need support for a type of dictionary, check for that and skip the
+    # tests if that dictionary wasn't supported.
+  SKIP: {
+        if ($spec_ref->{needs}) {
+            my $type = $spec_ref->{needs};
+            my ($status, undef, $err) = run_heimdal_strength('test', 'pass');
+            my $err_regex = qr{ not [ ] built [ ] with [ ] \Q$type\E }xms;
+            if ($status == 1 && $err =~ $err_regex) {
+                my $total = 0;
+                for my $block (@{ $spec_ref->{tests} }) {
+                    $total += scalar(@{ $tests_ref->{$block} });
+                }
+                skip("not built with $type support", $total * 3);
+            }
+        }
+
+        # Run the tests.
+        for my $block (@{ $spec_ref->{tests} }) {
+            if (scalar(@{ $spec_ref->{tests} }) > 1) {
+                note('... ', $block);
+            }
+            for my $test (@{ $tests_ref->{$block} }) {
+                check_password($test);
+            }
+        }
+    }
+    return;
+}
+
 # Test a required_classes syntax error.  Takes the string for required_classes
 # and verifies that the appropriate error message is returned.
 #
@@ -183,154 +296,42 @@ sub test_require_classes_syntax {
     return;
 }
 
-# Load the password tests from JSON.  Accumulate a total count of tests for
-# the testing plan.
-my (%tests, $count);
+# Load the password tests from JSON, removing the CrackLib tests that may fail
+# if we were built with the system CrackLib.  We don't have an easy way of
+# knowing which CrackLib heimdal-strength was linked against, so we have to
+# ignore them unconditionally.  The separate plugin tests will exercise that
+# code.
+my %tests;
 for my $type (qw(cdb classes cracklib length letter principal sqlite)) {
     my $tests = load_password_tests("$type.json");
-    $tests{$type} = $tests;
-    $count += scalar(@{$tests});
-}
-
-# We run the principal tests three times, for CrackLib, CDB, and SQLite.
-$count += 2 * scalar(@{ $tests{principal} });
-
-# We run the length checks twice.
-$count += scalar(@{ $tests{length} });
-
-# We can now calculate our plan based on three tests for each password test,
-# plus 27 additional tests for error handling.
-plan(tests => $count * 3 + 27);
-
-# Install the krb5.conf file with a configuration pointing to the test
-# CrackLib dictionary.
-my $datadir = $ENV{BUILD} ? "$ENV{BUILD}/data" : 'tests/data';
-my $krb5_conf
-  = create_krb5_conf({ password_dictionary => "$datadir/dictionary" });
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Run the CrackLib password tests and based-on-principal tests from JSON.
-note('CrackLib tests');
-for my $test (@{ $tests{cracklib} }) {
-    check_password($test);
-}
-note('Generic tests with CrackLib');
-for my $test (@{ $tests{principal} }) {
-    check_password($test);
-}
-
-# Install the krb5.conf file with a length restriction.
-$krb5_conf = create_krb5_conf({ minimum_length => 12 });
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Run the password length checks.
-note('Password length checks');
-for my $test (@{ $tests{length} }) {
-    check_password($test);
-}
-
-# Add a CrackLib dictionary and a maximum password length setting.
-$krb5_conf = create_krb5_conf(
-    {
-        password_dictionary => "$datadir/dictionary",
-        minimum_length      => 12,
-        cracklib_maxlen     => 11,
-    }
-);
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Run the length checks again.  They should have the same result, even though
-# there's a CrackLib dictionary, since the dictionary hit is above the minimum
-# length.
-note('Password length checks with cracklib_maxlen');
-for my $test (@{ $tests{length} }) {
-    check_password($test);
-}
-
-# Install the krb5.conf file for simple character class restrictions.
-$krb5_conf = create_krb5_conf(
-    {
-        minimum_different       => 8,
-        require_ascii_printable => 'true',
-        require_non_letter      => 'true',
+    if ($type eq 'cracklib') {
+        my @tests = grep { !$_->{skip_for_system_cracklib} } @{$tests};
+        $tests = [@tests];
     }
-);
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Run the simple character class tests.
-note('Simple password character class checks');
-for my $test (@{ $tests{letter} }) {
-    check_password($test);
-}
-
-# Install the krb5.conf file for complex character class restrictions.
-my $classes = '8-19:lower,upper 8-15:digit 8-11:symbol 24-24:3';
-$krb5_conf = create_krb5_conf({ require_classes => $classes });
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Run the complex character class tests.
-note('Complex password character class checks');
-for my $test (@{ $tests{classes} }) {
-    check_password($test);
+    $tests{$type} = $tests;
 }
 
-# Install the krb5.conf file with configuration pointing to the CDB
-# dictionary.
-my $cdb_database = test_file_path('data/wordlist.cdb');
-$krb5_conf = create_krb5_conf({ password_dictionary_cdb => $cdb_database });
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Check whether we were built with CDB support.  If so, run those tests.
-my ($status, $output, $err) = run_heimdal_strength('test', 'password');
-SKIP: {
-    if ($status == 1 && $err =~ m{ not [ ] built [ ] with [ ] CDB }xms) {
-        my $total = scalar(@{ $tests{cdb} }) + scalar(@{ $tests{principal} });
-        skip('not built with CDB support', $total * 3);
-    }
-
-    # Run the CDB and principal password tests from JSON.
-    note('CDB tests');
-    for my $test (@{ $tests{cdb} }) {
-        check_password($test);
-    }
-    note('Generic tests with CDB');
-    for my $test (@{ $tests{principal} }) {
-        check_password($test);
+# Determine our plan based on the test blocks we run (there are three test
+# results for each password test), plus 27 additional tests for error
+# handling.
+my $count = 0;
+for my $spec_ref (@TESTS) {
+    for my $block (@{ $spec_ref->{tests} }) {
+        $count += scalar(@{ $tests{$block} });
     }
 }
+plan(tests => $count * 3 + 27);
 
-# Install the krb5.conf file with configuration pointing to the SQLite
-# dictionary.
-my $sqlite_database = test_file_path('data/wordlist.sqlite');
-$krb5_conf
-  = create_krb5_conf({ password_dictionary_sqlite => $sqlite_database });
-local $ENV{KRB5_CONFIG} = $krb5_conf;
-
-# Check whether we were built with SQLite support.  If so, run those tests.
-($status, $output, $err) = run_heimdal_strength('test', 'password');
-SKIP: {
-    if ($status == 1 && $err =~ m{ not [ ] built [ ] with [ ] SQLite }xms) {
-        my $total = scalar(@{ $tests{sqlite} });
-        $total += scalar(@{ $tests{principal} });
-        skip('not built with SQLite support', $total * 3);
-    }
-
-    # Run the SQLite and principal password tests from JSON.
-    note('SQLite tests');
-    for my $test (@{ $tests{sqlite} }) {
-        check_password($test);
-    }
-    note('Generic tests with SQLite');
-    for my $test (@{ $tests{principal} }) {
-        check_password($test);
-    }
+# Run all the tests.
+for my $spec_ref (@TESTS) {
+    run_password_tests($spec_ref, \%tests);
 }
 
 # Test error for an unknown character class.
-$krb5_conf = create_krb5_conf({ require_classes => 'bogus' });
+my $krb5_conf = create_krb5_conf({ require_classes => 'bogus' });
 local $ENV{KRB5_CONFIG} = $krb5_conf;
 my $error_prefix = 'Cannot initialize strength checking';
-($status, $output, $err) = run_heimdal_strength('test', 'password', 1);
+my ($status, $output, $err) = run_heimdal_strength('test', 'password', 1);
 is($status, 1,   'Bad character class (status)');
 is($output, q{}, '...no output');
 is($err, "$error_prefix: unknown character class bogus\n", '...correct error');
index 32a69992dd4c548aff02022053158556724ec97e..9c98a2a9f2302c056249202060988c4796226dd4 100755 (executable)
@@ -3,10 +3,10 @@
 # Test suite for the CDB handling in the krb5-strength-wordlist utility.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 20132014
+# Copyright 2013-2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 . "$SOURCE/tap/libtap.sh"
 cd "$BUILD"
@@ -87,4 +87,4 @@ ok_program 'Database does not contain password' 100 '' \
 # Clean up.
 rm -f "$tmpdir/wordlist.cdb"
 rm -f "$tmpdir/wordlist"
-rmdir "$tmpdir" 2>/dev/null
+rmdir "$tmpdir" 2>/dev/null || true
index 73c1719b176643c05580f8b87fb97fc65b86d23c..e21c867c065112f0dd37aa7793c5add75303f763 100755 (executable)
@@ -3,10 +3,11 @@
 # Test suite for krb5-strength-wordlist SQLite database generation
 #
 # Written by Russ Allbery <eagle@eyrie.org>
+# Copyright 2020 Russ Allbery <eagle@eyrie.org>
 # Copyright 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 use 5.006;
 use strict;
@@ -14,10 +15,11 @@ use warnings;
 
 use lib "$ENV{SOURCE}/tap/perl";
 
-use Test::More;
 use Test::RRA qw(use_prereq);
 use Test::RRA::Automake qw(automake_setup test_file_path test_tmpdir);
 
+use Test::More;
+
 # Load prerequisite modules.
 use_prereq('DBI');
 use_prereq('DBD::SQLite');
index 967cfc1e6c6bfc405ed48ec209c9d585f70c0c30..07a2fc885e835051e628ac033db8e874e2b472f7 100755 (executable)
@@ -3,11 +3,11 @@
 # Test suite for krb5-strength-wordlist filtering functions.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2016 Russ Allbery <eagle@eyrie.org>
+# Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
 # Copyright 2014
 #     The Board of Trustees of the Leland Stanford Junior University
 #
-# See LICENSE for licensing terms.
+# SPDX-License-Identifier: MIT
 
 use 5.006;
 use strict;
@@ -15,11 +15,12 @@ use warnings;
 
 use lib "$ENV{SOURCE}/tap/perl";
 
-use Encode qw(encode);
-use Test::More;
 use Test::RRA qw(use_prereq);
 use Test::RRA::Automake qw(automake_setup test_file_path test_tmpdir);
 
+use Encode qw(encode);
+use Test::More;
+
 # Load prerequisite modules.
 use_prereq('IPC::Run',     'run');
 use_prereq('Perl6::Slurp', 'slurp');
index 8113198473d38d27536a019578bf24b1b9815e5a..e68c57f7f4e50c2553d5d8ccad1dfa9a6c3362ab 100644 (file)
@@ -5,7 +5,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2010, 2011, 2013, 2014
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2010-2011, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
 #ifdef HAVE_KRB5
-# include <portable/krb5.h>
+#    include <portable/krb5.h>
 #endif
 #include <portable/system.h>
 
@@ -37,7 +40,7 @@
 #include <tests/tap/process.h>
 #include <util/macros.h>
 #ifdef HAVE_KRB5
-# include <util/messages-krb5.h>
+#    include <util/messages-krb5.h>
 #endif
 #include <util/messages.h>
 #include <util/xmalloc.h>
@@ -56,7 +59,7 @@ main(void)
 /*
  * Test functions.
  */
-static void
+__attribute__((__noreturn__)) static void
 test_warn(void *data UNUSED)
 {
     krb5_context ctx;
@@ -74,7 +77,7 @@ test_warn(void *data UNUSED)
     exit(0);
 }
 
-static void
+__attribute__((__noreturn__)) static void
 test_die(void *data UNUSED)
 {
     krb5_context ctx;
index eb4ef5f155c2d034f3c542ffae1e6618205ea091..cfb661ab11da56151b561145f750370cb5daeb28 100644 (file)
@@ -5,8 +5,8 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2002, 2004, 2005, 2015 Russ Allbery <eagle@eyrie.org>
- * Copyright 2009, 2010, 2011, 2012
+ * Copyright 2002, 2004-2005, 2015, 2017, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2009-2012
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -26,6 +26,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
 /*
  * Test functions.
  */
-static void test1(void *data UNUSED) { warn("warning"); }
-static void test2(void *data UNUSED) { die("fatal"); }
-static void test3(void *data UNUSED) { errno = EPERM; syswarn("permissions"); }
-static void test4(void *data UNUSED) {
+static void
+test1(void *data UNUSED)
+{
+    warn("warning");
+}
+
+__attribute__((__noreturn__)) static void
+test2(void *data UNUSED)
+{
+    die("fatal");
+}
+
+static void
+test3(void *data UNUSED)
+{
+    errno = EPERM;
+    syswarn("permissions");
+}
+
+__attribute__((__noreturn__)) static void
+test4(void *data UNUSED)
+{
     errno = EACCES;
     sysdie("fatal access");
 }
-static void test5(void *data UNUSED) {
+
+static void
+test5(void *data UNUSED)
+{
     message_program_name = "test5";
     warn("warning");
 }
-static void test6(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test6(void *data UNUSED)
+{
     message_program_name = "test6";
     die("fatal");
 }
-static void test7(void *data UNUSED) {
+
+static void
+test7(void *data UNUSED)
+{
     message_program_name = "test7";
     errno = EPERM;
     syswarn("perms %d", 7);
 }
-static void test8(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test8(void *data UNUSED)
+{
     message_program_name = "test8";
     errno = EACCES;
     sysdie("%st%s", "fa", "al");
 }
 
-static int return10(void) { return 10; }
+static int
+return10(void)
+{
+    return 10;
+}
 
-static void test9(void *data UNUSED) {
+__attribute__((__noreturn__)) static void
+test9(void *data UNUSED)
+{
     message_fatal_cleanup = return10;
     die("fatal");
 }
-static void test10(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test10(void *data UNUSED)
+{
     message_program_name = 0;
     message_fatal_cleanup = return10;
     errno = EPERM;
     sysdie("fatal perm");
 }
-static void test11(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test11(void *data UNUSED)
+{
     message_program_name = "test11";
     message_fatal_cleanup = return10;
     errno = EPERM;
@@ -92,62 +136,105 @@ static void test11(void *data UNUSED) {
     sysdie("fatal");
 }
 
-static void __attribute__((__format__(printf, 2, 0)))
-log_msg(size_t len, const char *format, va_list args, int error) {
+__attribute__((__format__(printf, 2, 0))) static void
+log_msg(size_t len, const char *format, va_list args, int error)
+{
     fprintf(stderr, "%lu %d ", (unsigned long) len, error);
     vfprintf(stderr, format, args);
     fprintf(stderr, "\n");
 }
 
-static void test12(void *data UNUSED) {
+static void
+test12(void *data UNUSED)
+{
     message_handlers_warn(1, log_msg);
     warn("warning");
 }
-static void test13(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test13(void *data UNUSED)
+{
     message_handlers_die(1, log_msg);
     die("fatal");
 }
-static void test14(void *data UNUSED) {
+
+static void
+test14(void *data UNUSED)
+{
     message_handlers_warn(2, log_msg, log_msg);
     errno = EPERM;
     syswarn("warning");
 }
-static void test15(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test15(void *data UNUSED)
+{
     message_handlers_die(2, log_msg, log_msg);
     message_fatal_cleanup = return10;
     errno = EPERM;
     sysdie("fatal");
 }
-static void test16(void *data UNUSED) {
+
+static void
+test16(void *data UNUSED)
+{
     message_handlers_warn(2, message_log_stderr, log_msg);
     message_program_name = "test16";
     errno = EPERM;
     syswarn("warning");
 }
-static void test17(void *data UNUSED) { notice("notice"); }
-static void test18(void *data UNUSED) {
+
+static void
+test17(void *data UNUSED)
+{
+    notice("notice");
+}
+
+static void
+test18(void *data UNUSED)
+{
     message_program_name = "test18";
     notice("notice");
 }
-static void test19(void *data UNUSED) { debug("debug"); }
-static void test20(void *data UNUSED) {
+
+static void
+test19(void *data UNUSED)
+{
+    debug("debug");
+}
+
+static void
+test20(void *data UNUSED)
+{
     message_handlers_notice(1, log_msg);
     notice("foo");
 }
-static void test21(void *data UNUSED) {
+
+static void
+test21(void *data UNUSED)
+{
     message_handlers_debug(1, message_log_stdout);
     message_program_name = "test23";
     debug("baz");
 }
-static void test22(void *data UNUSED) {
+
+__attribute__((__noreturn__)) static void
+test22(void *data UNUSED)
+{
     message_handlers_die(0);
     die("hi mom!");
 }
-static void test23(void *data UNUSED) {
+
+static void
+test23(void *data UNUSED)
+{
     message_handlers_warn(0);
     warn("this is a test");
 }
-static void test24(void *data UNUSED) {
+
+static void
+test24(void *data UNUSED)
+{
     notice("first");
     message_handlers_notice(0);
     notice("second");
@@ -218,7 +305,7 @@ main(void)
     is_function_output(test20, NULL, 0, "3 0 foo\n", "test20");
     is_function_output(test21, NULL, 0, "test23: baz\n", "test21");
 
-    /* Make sure that it's possible to turn off a message type entirely. */ 
+    /* Make sure that it's possible to turn off a message type entirely. */
     is_function_output(test22, NULL, 1, "", "test22");
     is_function_output(test23, NULL, 0, "", "test23");
     is_function_output(test24, NULL, 0, "first\nthird\n", "test24");
index e8fdd74c2950aa57f7aea787e857f8f7cb71d03c..b3afa31f81fe17a536d16156325071715b990395 100755 (executable)
@@ -6,8 +6,9 @@
 # which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
 #
 # Written by Russ Allbery <eagle@eyrie.org>
-# Copyright 2000, 2001, 2006, 2014, 2016 Russ Allbery <eagle@eyrie.org>
-# Copyright 2008, 2009, 2010, 2012
+# Copyright 2000-2001, 2006, 2014, 2016, 2019-2020
+#     Russ Allbery <eagle@eyrie.org>
+# Copyright 2008-2010, 2012
 #     The Board of Trustees of the Leland Stanford Junior University
 #
 # Permission is hereby granted, free of charge, to any person obtaining a
 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 # DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
 
 . "$C_TAP_SOURCE/tap/libtap.sh"
 cd "$C_TAP_BUILD/util"
 
-# Run an xmalloc test.  Takes the description, the expectd exit status, the
+# Run an xmalloc test.  Takes the description, the expected exit status, the
 # output, and the arguments.
 ok_xmalloc () {
     local desc w_status w_output output status
@@ -99,46 +102,46 @@ ok_xmalloc "vasprintf large"    0 "" "v" "30000000" "0"
 # We assume that there are enough miscellaneous allocations that an allocation
 # exactly as large as the limit will always fail.
 ok_xmalloc "malloc fail" 1 \
-    "failed to malloc 30000000 bytes at xmalloc.c line 41" \
+    "failed to malloc 30000000 bytes at xmalloc.c line 42" \
     "m" "30000000" "30000000"
 ok_xmalloc "realloc fail" 1 \
-    "failed to realloc 30000000 bytes at xmalloc.c line 69" \
+    "failed to realloc 30000000 bytes at xmalloc.c line 71" \
     "r" "30000000" "30000000"
 ok_xmalloc "reallocarray fail" 1 \
-    "failed to reallocarray 30000000 bytes at xmalloc.c line 99" \
+    "failed to reallocarray 30000000 bytes at xmalloc.c line 100" \
     "y" "30000000" "30000000"
 ok_xmalloc "strdup fail" 1 \
-    "failed to strdup 30000000 bytes at xmalloc.c line 130" \
+    "failed to strdup 30000000 bytes at xmalloc.c line 131" \
     "s" "30000000" "30000000"
 ok_xmalloc "strndup fail" 1 \
-    "failed to strndup 30000000 bytes at xmalloc.c line 176" \
+    "failed to strndup 30000000 bytes at xmalloc.c line 177" \
     "n" "30000000" "30000000"
 ok_xmalloc "calloc fail" 1 \
-    "failed to calloc 30000000 bytes at xmalloc.c line 200" \
+    "failed to calloc 30000000 bytes at xmalloc.c line 201" \
     "c" "30000000" "30000000"
 ok_xmalloc "asprintf fail" 1 \
-    "failed to asprintf 30000000 bytes at xmalloc.c line 224" \
+    "failed to asprintf 30000000 bytes at xmalloc.c line 225" \
     "a" "30000000" "30000000"
 ok_xmalloc "vasprintf fail" 1 \
-    "failed to vasprintf 30000000 bytes at xmalloc.c line 243" \
+    "failed to vasprintf 30000000 bytes at xmalloc.c line 244" \
     "v" "30000000" "30000000"
 
 # Check our custom error handler.
-ok_xmalloc "malloc custom"       1 "malloc 30000000 xmalloc.c 41" \
+ok_xmalloc "malloc custom"       1 "malloc 30000000 xmalloc.c 42" \
     "M" "30000000" "30000000"
-ok_xmalloc "realloc custom"      1 "realloc 30000000 xmalloc.c 69" \
+ok_xmalloc "realloc custom"      1 "realloc 30000000 xmalloc.c 71" \
     "R" "30000000" "30000000"
-ok_xmalloc "reallocarray custom" 1 "reallocarray 30000000 xmalloc.c 99" \
+ok_xmalloc "reallocarray custom" 1 "reallocarray 30000000 xmalloc.c 100" \
     "Y" "30000000" "30000000"
-ok_xmalloc "strdup custom"       1 "strdup 30000000 xmalloc.c 130" \
+ok_xmalloc "strdup custom"       1 "strdup 30000000 xmalloc.c 131" \
     "S" "30000000" "30000000"
-ok_xmalloc "strndup custom"      1 "strndup 30000000 xmalloc.c 176" \
+ok_xmalloc "strndup custom"      1 "strndup 30000000 xmalloc.c 177" \
     "N" "30000000" "30000000"
-ok_xmalloc "calloc custom"       1 "calloc 30000000 xmalloc.c 200" \
+ok_xmalloc "calloc custom"       1 "calloc 30000000 xmalloc.c 201" \
     "C" "30000000" "30000000"
-ok_xmalloc "asprintf custom"     1 "asprintf 30000000 xmalloc.c 224" \
+ok_xmalloc "asprintf custom"     1 "asprintf 30000000 xmalloc.c 225" \
     "A" "30000000" "30000000"
-ok_xmalloc "vasprintf custom"    1 "vasprintf 30000000 xmalloc.c 243" \
+ok_xmalloc "vasprintf custom"    1 "vasprintf 30000000 xmalloc.c 244" \
     "V" "30000000" "30000000"
 
 # Check the smaller ones again just for grins.
index a5c0b944179fa352787e087e9d49301df8948c67..eb6f1d2c83d3cafc177abd93c98cb485bce4d4de 100644 (file)
@@ -4,8 +4,8 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Copyright 2000, 2001, 2006 Russ Allbery <eagle@eyrie.org>
- * Copyright 2008, 2012, 2013, 2014
+ * Copyright 2000-2001, 2006, 2017, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008, 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,6 +25,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #line 1 "xmalloc.c"
 #include <config.h>
 #include <portable/system.h>
 
+#include <assert.h>
 #include <ctype.h>
 #include <errno.h>
 #ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
+#    include <sys/time.h>
 #endif
 #include <time.h>
 
@@ -50,7 +53,7 @@
  * A customized error handler for checking xmalloc's support of them.  Prints
  * out the error message and exits with status 1.
  */
-static void
+static void __attribute__((__noreturn__))
 test_handler(const char *function, size_t size, const char *file, int line)
 {
     die("%s %lu %s %d", function, (unsigned long) size, file, line);
@@ -92,6 +95,7 @@ test_realloc(size_t size)
     char *buffer;
     size_t i;
 
+    assert(size > 10);
     buffer = xmalloc(10);
     if (buffer == NULL)
         return 0;
@@ -99,8 +103,7 @@ test_realloc(size_t size)
     buffer = xrealloc(buffer, size);
     if (buffer == NULL)
         return 0;
-    if (size > 0)
-        memset(buffer + 10, 2, size - 10);
+    memset(buffer + 10, 2, size - 10);
     for (i = 0; i < 10; i++)
         if (buffer[i] != 1)
             return 0;
@@ -327,7 +330,7 @@ main(int argc, char *argv[])
     code = argv[1][0];
     if (isupper(code)) {
         xmalloc_error_handler = test_handler;
-        code = tolower(code);
+        code = (unsigned char) tolower(code);
     }
 
     /*
@@ -381,6 +384,7 @@ main(int argc, char *argv[])
 #endif
     }
 
+    /* clang-format off */
     switch (code) {
     case 'c': exit(test_calloc(size) ? willfail : 1);
     case 'm': exit(test_malloc(size) ? willfail : 1);
@@ -390,9 +394,9 @@ main(int argc, char *argv[])
     case 'n': exit(test_strndup(size) ? willfail : 1);
     case 'a': exit(test_asprintf(size) ? willfail : 1);
     case 'v': exit(test_vasprintf(size) ? willfail : 1);
-    default:
-        die("Unknown mode %c", argv[1][0]);
-        break;
+    default:  die("Unknown mode %c", argv[1][0]);
     }
+    /* clang-format on */
+
     exit(1);
 }
diff --git a/tests/valgrind/logs-t b/tests/valgrind/logs-t
new file mode 100755 (executable)
index 0000000..1f65902
--- /dev/null
@@ -0,0 +1,83 @@
+#!/usr/bin/perl
+#
+# Check for errors in valgrind logs.
+#
+# The canonical version of this file is maintained in the rra-c-util package,
+# which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
+#
+# Copyright 2018-2019 Russ Allbery <eagle@eyrie.org>
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+# SPDX-License-Identifier: MIT
+
+use 5.008;
+use strict;
+use warnings;
+
+use lib "$ENV{C_TAP_SOURCE}/tap/perl";
+
+use Test::RRA;
+use Test::RRA::Automake qw(automake_setup);
+
+use File::Spec;
+use Test::More;
+
+# Skip this test if C_TAP_VALGRIND was not set.
+if (!exists $ENV{C_TAP_VALGRIND}) {
+    plan skip_all => 'Not testing under valgrind';
+}
+
+# Set up Automake testing.
+automake_setup({ chdir_build => 1 });
+
+# Gather the list of valgrind logs (and skip this test if there are none).
+opendir(my $logdir, File::Spec->catfile('tests', 'tmp', 'valgrind'))
+  or plan skip_all => 'No valgrind logs in tests/tmp/valgrind';
+my @logs = grep { m{ \A log [.] }xms } readdir $logdir;
+closedir($logdir) or BAIL_OUT("cannot close directory: $!");
+
+# Check each log file.
+plan tests => scalar(@logs);
+for my $file (@logs) {
+    my $path = File::Spec->catfile('tests', 'tmp', 'valgrind', $file);
+    open(my $log, '<', $path) or BAIL_OUT("cannot open $path: $!");
+    my $okay = 1;
+    my @log;
+    while (defined(my $line = <$log>)) {
+        push(@log, $line);
+        if ($line =~ m{ ERROR [ ] SUMMARY: [ ] (\d+) [ ] errors }xms) {
+            $okay = ($1 == 0);
+        }
+    }
+    close($log) or BAIL_OUT("cannot close $path: $!");
+    if ($okay) {
+        unlink($path);
+    } else {
+        for my $line (@log) {
+            print '# ', $line
+              or BAIL_OUT("cannot print to standard output: $!");
+        }
+    }
+    ok($okay, $path);
+}
+
+# Remove tests/tmp/valgrind if it's now empty.
+rmdir(File::Spec->catfile('tests', 'tmp', 'valgrind'));
+rmdir(File::Spec->catfile('tests', 'tmp'));
index 08c2f01eea2de7e0ca92385a1cc628e47bf0a738..525e6df81bdcbdb0985034665d649b0c197f86ec 100755 (executable)
@@ -33,7 +33,7 @@ use Sys::Syslog qw(openlog syslog LOG_AUTH LOG_INFO LOG_WARNING);
 # The number of PBKDF2 iterations to use when hashing passwords.  This number
 # should be chosen so as to force the hash operation to take approximately 0.1
 # seconds on current hardware.
-Readonly my $HASH_ITERATIONS => 14592;
+Readonly my $HASH_ITERATIONS => 40128;
 
 # Path to the history database.  Currently, this must be a Berkeley DB file in
 # the old DB_HASH format.  Keys will be principal names, and values will be a
@@ -313,7 +313,7 @@ sub find_iteration_count {
     require Benchmark;
     my $iterations = $HASH_ITERATIONS;
     while (1) {
-        my $hash = sub { password_hash($password, $iterations) };
+        my $hash  = sub { password_hash($password, $iterations) };
         my $times = Benchmark::timethis(20, $hash, q{}, 'none');
 
         # Extract the CPU time from the formatted time string.  This will be
@@ -498,7 +498,7 @@ sub strength_check {
 
     # Run the external quality checking program.  If we're root, we'll run it
     # as the strength checking user and group.
-    my $in = "principal: $principal\nnew-password: $password\nend\n";
+    my $in   = "principal: $principal\nnew-password: $password\nend\n";
     my $init = sub { drop_privileges($STRENGTH_USER, $STRENGTH_GROUP) };
     my ($out, $err);
     run([$path, $principal], \$in, \$out, \$err, init => $init);
@@ -589,11 +589,12 @@ local $0 = basename($0);
 my ($opt, $usage) = describe_options(
     '%c %o',
     ['benchmark|b=f', 'Benchmark hash iterations for this target time'],
+    ['check-only|c',  'Check password history without updating database'],
     ['database|d=s',  'Path to the history database, overriding the default'],
     ['help|h',        'Print usage message and exit'],
     ['manual|man|m',  'Print full manual and exit'],
     ['quiet|q',       'Suppress logging to syslog'],
-    ['stats|S=s',     'Path to hash of length statistics'],
+    ['stats|S=s',     'Path to database of length statistics'],
     ['strength|s=s',  'Path to strength checking program to run'],
 );
 if ($opt->help) {
@@ -647,10 +648,12 @@ if (check_history($database, $principal, $password)) {
 # The password is accepted.  Record it, update the length counter, and return
 # success.
 log_result($principal, 'accepted');
-write_history($database, $principal, $password);
+if (!$opt->check_only) {
+    write_history($database, $principal, $password);
+    update_length_counts($stats_db, length($password));
+}
 say {*STDOUT} 'APPROVED'
   or die "$0: cannot write to standard output: $!\n";
-update_length_counts($stats_db, length($password));
 exit(0);
 
 __END__
@@ -660,9 +663,10 @@ __END__
 ##############################################################################
 
 =for stopwords
-heimdal-history heimdal-strength Heimdal -hmq BerkeleyDB timestamps POSIX
+heimdal-history heimdal-strength Heimdal -chmq BerkeleyDB timestamps POSIX
 whitespace API Allbery sublicense MERCHANTABILITY NONINFRINGEMENT syslog
-pseudorandom JSON LDAP-compatible PBKDF2 SHA-256 KDC
+pseudorandom JSON LDAP-compatible PBKDF2 SHA-256 KDC SPDX-License-Identifier
+MIT
 
 =head1 NAME
 
@@ -670,56 +674,62 @@ heimdal-history - Password history via Heimdal external strength checking
 
 =head1 SYNOPSIS
 
-B<heimdal-history> [B<-hmq>] [B<-b> I<target-time>] [B<-d> I<database>]
+B<heimdal-history> [B<-chmq>] [B<-b> I<target-time>] [B<-d> I<database>]
     [B<-S> I<length-stats-db>] [B<-s> I<strength-program>] [B<principal>]
 
 =head1 DESCRIPTION
 
-B<heimdal-history> is an implementation of password history via the
-Heimdal external password strength checking interface.  It stores separate
-history for each principal, hashed using Crypt::PBKDF2 with
-randomly-generated salt.  (The randomness is from a weak pseudorandom
-number generator, not strongly random.)
+B<heimdal-history> is an implementation of password history via the Heimdal
+external password strength checking interface.  It stores separate history for
+each principal, hashed using Crypt::PBKDF2 with randomly-generated salt.  (The
+randomness is from a weak pseudorandom number generator, not strongly random.)
+Password history is stored indefinitely (implementing infinite history); older
+password hashes are never removed by this program.
 
 Password history is stored in a BerkeleyDB DB_HASH file.  The key is the
-principal.  The value is a JSON array of objects, each of which has two
-keys.  C<timestamp> contains the time when the history entry was added (in
-POSIX seconds since UNIX epoch), and C<hash> contains the hash of a
-previously-used password in the Crypt::PBKDF2 LDAP-compatible format.
-Passwords are hashed using PBKDF2 (from PKCS#5) with SHA-256 as the
-underlying hash function using a number of rounds configured in this
-script.  See L<Crypt::PBKDF2> for more information.
-
-B<heimdal-history> also checks password strength before checking history.
-It does so by invoking another program that also uses the Heimdal external
+principal.  The value is a JSON array of objects, each of which has two keys.
+C<timestamp> contains the time when the history entry was added (in POSIX
+seconds since UNIX epoch), and C<hash> contains the hash of a previously-used
+password in the Crypt::PBKDF2 LDAP-compatible format.  Passwords are hashed
+using PBKDF2 (from PKCS#5) with SHA-256 as the underlying hash function using
+a number of rounds configured in this script.  See L<Crypt::PBKDF2> for more
+information.
+
+B<heimdal-history> also checks password strength before checking history.  It
+does so by invoking another program that also uses the Heimdal external
 password strength checking interface.  By default, it runs
-B</usr/bin/heimdal-strength>.  Only if that program approves the password
-does it hash it and check history.
+B</usr/bin/heimdal-strength>.  Only if that program approves the password does
+it hash it and check history.
 
-For more information on how to set up password history, see
-L</CONFIGURATION> below.
+For more information on how to set up password history, see L</CONFIGURATION>
+below.
 
-As with any implementation of the Heimdal external password strength
-checking protocol, B<heimdal-history> expects, on standard input:
+As with any implementation of the Heimdal external password strength checking
+protocol, B<heimdal-history> expects, on standard input:
 
     principal: <principal>
     new-password: <password>
     end
 
 (with no leading whitespace).  <principal> is the principal changing its
-password (passed to the other password strength checking program but
-otherwise unused here), and <password> is the new password.  There must
-be exactly one space after the colon.  Any subsequent spaces are taken to
-be part of the principal or password.
+password (passed to the other password strength checking program but otherwise
+unused here), and <password> is the new password.  There must be exactly one
+space after the colon.  Any subsequent spaces are taken to be part of the
+principal or password.
+
+If the password is accepted, B<heimdal-history> will assume that it will be
+used and will update the history database to record the new password.  It will
+also update the password length statistics database to account for the new
+password.
 
-If invoked as root, B<heimdal-history> will run the external strength
-checking program as user C<nobody> and group C<nogroup>, and will check
-and write to the history database as user C<_history> and group
-C<_history>.  These users must exist on the system if it is run as root.
+If invoked as root, B<heimdal-history> will run the external strength checking
+program as user C<nobody> and group C<nogroup>, and will check and write to
+the history database as user C<_history> and group C<_history>.  These users
+must exist on the system if it is run as root.
 
-The result of each password check will be logged to syslog (priority
-LOG_INFO, facility LOG_AUTH).  Each log line will be a set of key/value
-pairs in the format C<< I<key>=I<value> >>.  The keys are:
+The result of each password check will be logged to syslog (priority LOG_INFO,
+facility LOG_AUTH).  Each log line will be a set of key/value pairs in the
+format C<< I<key>=I<value> >>.  The keys are:
 
 =over 4
 
@@ -733,12 +743,12 @@ The principal for which a password was checked.
 
 =item error
 
-An internal error message that did not stop the history check, but which
-may indicate that something is wrong with the history database (such as
-corrupted entries or invalid hashes).  If this key is present, neither
-C<result> nor C<reason> will be present.  There will be a subsequent log
-message from the same invocation giving the final result of the history
-check (assuming B<heimdal-history> doesn't exit with a fatal error).
+An internal error message that did not stop the history check, but which may
+indicate that something is wrong with the history database (such as corrupted
+entries or invalid hashes).  If this key is present, neither C<result> nor
+C<reason> will be present.  There will be a subsequent log message from the
+same invocation giving the final result of the history check (assuming
+B<heimdal-history> doesn't exit with a fatal error).
 
 =item result
 
@@ -750,9 +760,9 @@ If the password was rejected, the reason for the rejection.
 
 =back
 
-The value will be surrounded with double quotes if it contains a double
-quote or space.  Any double quotes in the value will be doubled, so C<">
-becomes C<"">.
+The value will be surrounded with double quotes if it contains a double quote
+or space.  Any double quotes in the value will be doubled, so C<"> becomes
+C<"">.
 
 =head1 OPTIONS
 
@@ -764,15 +774,22 @@ Do not do a password history check.  Instead, benchmark the hash algorithm
 with various possible iteration counts and find an iteration count that
 results in I<target-time> seconds of computation time required to hash a
 password (which should be a real number).  A result will be considered
-acceptable if it is within 0.005 seconds of the target time.  The results
-will be printed to standard output and then B<heimdal-history> will exit
+acceptable if it is within 0.005 seconds of the target time.  The results will
+be printed to standard output and then B<heimdal-history> will exit
 successfully.
 
+=item B<-c>, B<--check-only>
+
+Check password history and password strength and print the results as normal,
+but do not update the history or length statistics databases.  This is a
+read-only mode of operation that will not make any changes to the underlying
+database, only report if a password would currently be accepted.
+
 =item B<-d> I<database>, B<--database>=I<database>
 
 Use I<database> as the history database file instead of the default
-(F</var/lib/heimdal-history/history.db>).  Primarily used for testing,
-since Heimdal won't pass this argument.
+(F</var/lib/heimdal-history/history.db>).  Primarily used for testing, since
+Heimdal won't pass this argument.
 
 =item B<-h>, B<--help>
 
@@ -784,21 +801,21 @@ Display this manual and exit.
 
 =item B<-q>, B<--quiet>
 
-Suppress logging to syslog and only return the results on standard output
-and standard error.  Primarily used for testing, since Heimdal won't pass
-this argument.
+Suppress logging to syslog and only return the results on standard output and
+standard error.  Primarily used for testing, since Heimdal won't pass this
+argument.
 
 =item B<-S> I<length-stats-db>, B<--stats>=I<length-stats-db>
 
 Use I<length-stats-db> as the database file for password length statistics
-instead of the default (F</var/lib/heimdal-history/lengths.db>).
-Primarily used for testing, since Heimdal won't pass this argument.
+instead of the default (F</var/lib/heimdal-history/lengths.db>).  Primarily
+used for testing, since Heimdal won't pass this argument.
 
 =item B<-s> I<strength-program>, B<--strength>=I<strength-program>
 
-Run I<strength-program> as the external strength-checking program instead
-of the default (F</usr/bin/heimdal-strength>).  Primarily used for
-testing, since Heimdal won't pass this argument.
+Run I<strength-program> as the external strength-checking program instead of
+the default (F</usr/bin/heimdal-strength>).  Primarily used for testing, since
+Heimdal won't pass this argument.
 
 =back
 
@@ -807,39 +824,39 @@ testing, since Heimdal won't pass this argument.
 Additional setup is required to use this history implementation with your
 Heimdal KDC.
 
-First, ensure that its dependencies are installed, and then examine the
-local configuration settings at the top of the B<heimdal-history> program.
-By default, it requires a C<_history> user and C<_history> group be
-present on the system, and all history information will be read and
-written as that user and group.  It also requires a C<nobody> user and
-C<nogroup> group to be present (this should be the default with most
-variants of UNIX), and all strength checking will be done as that user and
-group.  It uses various files in F</var/lib/heimdal-history> to store
-history and statistical information by default, so if using the defaults,
-create that directory and ensure it is writable by the C<_history> user.
+First, ensure that its dependencies are installed, and then examine the local
+configuration settings at the top of the B<heimdal-history> program.  By
+default, it requires a C<_history> user and C<_history> group be present on
+the system, and all history information will be read and written as that user
+and group.  It also requires a C<nobody> user and C<nogroup> group to be
+present (this should be the default with most variants of UNIX), and all
+strength checking will be done as that user and group.  It uses various files
+in F</var/lib/heimdal-history> to store history and statistical information by
+default, so if using the defaults, create that directory and ensure it is
+writable by the C<_history> user.
 
-Once that setup is done, change your C<[password_quality]> configuration
-in F<krb5.conf> or F<kdc.conf> to:
+Once that setup is done, change your C<[password_quality]> configuration in
+F<krb5.conf> or F<kdc.conf> to:
 
     [password_quality]
         policies         = external-check
         external_program = /usr/local/bin/heimdal-history
 
-The B<heimdal-history> program will automatically also run
-B<heimdal-strength> as well, looking for it in F</usr/bin>.  Change the
-C<$STRENGTH_PROGRAM> setting at the top of the script if you have that
-program in a different location.  You should continue to configure
-B<heimdal-strength> as if you were running it directly.
+The B<heimdal-history> program will automatically also run B<heimdal-strength>
+as well, looking for it in F</usr/bin>.  Change the C<$STRENGTH_PROGRAM>
+setting at the top of the script if you have that program in a different
+location.  You should continue to configure B<heimdal-strength> as if you were
+running it directly.
 
 =head1 RETURN STATUS
 
-On approval of the password, B<heimdal-history> will print C<APPROVED> and
-newline to standard output and exit with status 0.
+On approval of the password, B<heimdal-history> will print C<APPROVED> and a
+newline to standard output and exit with status 0.
 
-If the password is rejected by the strength checking program or if it (or
-a version with a single character removed) matches one of the hashes stored
-in the password history, B<heimdal-history> will print the reason for
-rejection to standard error and exit with status 0.
+If the password is rejected by the strength checking program or if it (or a
+version with a single character removed) matches one of the hashes stored in
+the password history, B<heimdal-history> will print the reason for rejection
+to standard error and exit with status 0.
 
 On any internal error, B<heimdal-history> will print the error to standard
 error and exit with a non-zero status.
@@ -850,36 +867,35 @@ error and exit with a non-zero status.
 
 =item F</usr/bin/heimdal-strength>
 
-The default password strength checking program.  This program must follow
-the Heimdal external password strength checking API.
+The default password strength checking program.  This program must follow the
+Heimdal external password strength checking API.
 
 =item F</var/lib/heimdal-history/history.db>
 
-The default database path.  If B<heimdal-strength> is run as root, this
-file needs to be readable and writable by user C<_history> and group
-C<_history>.  If it doesn't exist, it will be created with mode 0600.
+The default database path.  If B<heimdal-strength> is run as root, this file
+needs to be readable and writable by user C<_history> and group C<_history>.
+If it doesn't exist, it will be created with mode 0600.
 
 =item F</var/lib/heimdal-history/history.db.lock>
 
-The lock file used to synchronize access to the history database.  As with
-the history database, if B<heimdal-strength> is run as root, this file
-needs to be readable and writable by user C<_history> and group
-C<_history>.
+The lock file used to synchronize access to the history database.  As with the
+history database, if B<heimdal-strength> is run as root, this file needs to be
+readable and writable by user C<_history> and group C<_history>.
 
 =item F</var/lib/heimdal-history/lengths.db>
 
-The default length statistics path, which will be a BerkeleyDB DB_HASH
-file of password lengths to counts of passwords with that length.  If
+The default length statistics path, which will be a BerkeleyDB DB_HASH file of
+password lengths to counts of passwords with that length.  If
 B<heimdal-strength> is run as root, this file needs to be readable and
-writable by user C<_history> and group C<_history>.  If it doesn't exist,
-it will be created with mode 0600.
+writable by user C<_history> and group C<_history>.  If it doesn't exist, it
+will be created with mode 0600.
 
 =item F</var/lib/heimdal-history/lengths.db.lock>
 
-The lock file used to synchronize access to the length statistics
-database.  As with the length statistics database, if B<heimdal-strength>
-is run as root, this file needs to be readable and writable by user
-C<_history> and group C<_history>.
+The lock file used to synchronize access to the length statistics database.
+As with the length statistics database, if B<heimdal-strength> is run as root,
+this file needs to be readable and writable by user C<_history> and group
+C<_history>.
 
 =back
 
@@ -889,31 +905,37 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2016 Russ Allbery <eagle@eyrie.org>
+Copyright 2016-2017, 2020 Russ Allbery <eagle@eyrie.org>
 
-Copyright 20132014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University
 
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+SPDX-License-Identifier: MIT
 
 =head1 SEE ALSO
 
 L<Crypt::PBKDF2>, L<heimdal-strength(1)>
 
 =cut
+
+# Local Variables:
+# copyright-at-end-flag: t
+# End:
index 81e525b209aa5caf3ce5f231aec0c14be555c76b..7a49673ae9470acc8a1bdee1809f2f6fb6eb8894 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+.    if \nF \{\
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.    if !\nF==2 \{\
-.        nr % 0
-.        nr F 2
+.        if !\nF==2 \{\
+.            nr % 0
+.            nr F 2
+.        \}
 .    \}
 .\}
+.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "HEIMDAL-HISTORY 1"
-.TH HEIMDAL-HISTORY 1 "2016-12-25" "3.1" "krb5-strength"
+.TH HEIMDAL-HISTORY 1 "2020-05-17" "3.2" "krb5-strength"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
 heimdal\-history \- Password history via Heimdal external strength checking
 .SH "SYNOPSIS"
 .IX Header "SYNOPSIS"
-\&\fBheimdal-history\fR [\fB\-hmq\fR] [\fB\-b\fR \fItarget-time\fR] [\fB\-d\fR \fIdatabase\fR]
+\&\fBheimdal-history\fR [\fB\-chmq\fR] [\fB\-b\fR \fItarget-time\fR] [\fB\-d\fR \fIdatabase\fR]
     [\fB\-S\fR \fIlength-stats-db\fR] [\fB\-s\fR \fIstrength-program\fR] [\fBprincipal\fR]
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
-\&\fBheimdal-history\fR is an implementation of password history via the
-Heimdal external password strength checking interface.  It stores separate
-history for each principal, hashed using Crypt::PBKDF2 with
-randomly-generated salt.  (The randomness is from a weak pseudorandom
-number generator, not strongly random.)
+\&\fBheimdal-history\fR is an implementation of password history via the Heimdal
+external password strength checking interface.  It stores separate history for
+each principal, hashed using Crypt::PBKDF2 with randomly-generated salt.  (The
+randomness is from a weak pseudorandom number generator, not strongly random.)
+Password history is stored indefinitely (implementing infinite history); older
+password hashes are never removed by this program.
 .PP
 Password history is stored in a BerkeleyDB \s-1DB_HASH\s0 file.  The key is the
-principal.  The value is a \s-1JSON\s0 array of objects, each of which has two
-keys.  \f(CW\*(C`timestamp\*(C'\fR contains the time when the history entry was added (in
-\&\s-1POSIX\s0 seconds since \s-1UNIX\s0 epoch), and \f(CW\*(C`hash\*(C'\fR contains the hash of a
-previously-used password in the Crypt::PBKDF2 LDAP-compatible format.
-Passwords are hashed using \s-1PBKDF2 \s0(from PKCS#5) with \s-1SHA\-256\s0 as the
-underlying hash function using a number of rounds configured in this
-script.  See Crypt::PBKDF2 for more information.
+principal.  The value is a \s-1JSON\s0 array of objects, each of which has two keys.
+\&\f(CW\*(C`timestamp\*(C'\fR contains the time when the history entry was added (in \s-1POSIX\s0
+seconds since \s-1UNIX\s0 epoch), and \f(CW\*(C`hash\*(C'\fR contains the hash of a previously-used
+password in the Crypt::PBKDF2 LDAP-compatible format.  Passwords are hashed
+using \s-1PBKDF2\s0 (from PKCS#5) with \s-1SHA\-256\s0 as the underlying hash function using
+a number of rounds configured in this script.  See Crypt::PBKDF2 for more
+information.
 .PP
-\&\fBheimdal-history\fR also checks password strength before checking history.
-It does so by invoking another program that also uses the Heimdal external
+\&\fBheimdal-history\fR also checks password strength before checking history.  It
+does so by invoking another program that also uses the Heimdal external
 password strength checking interface.  By default, it runs
-\&\fB/usr/bin/heimdal\-strength\fR.  Only if that program approves the password
-does it hash it and check history.
+\&\fB/usr/bin/heimdal\-strength\fR.  Only if that program approves the password does
+it hash it and check history.
 .PP
-For more information on how to set up password history, see
-\&\*(L"\s-1CONFIGURATION\*(R"\s0 below.
+For more information on how to set up password history, see \*(L"\s-1CONFIGURATION\*(R"\s0
+below.
 .PP
-As with any implementation of the Heimdal external password strength
-checking protocol, \fBheimdal-history\fR expects, on standard input:
+As with any implementation of the Heimdal external password strength checking
+protocol, \fBheimdal-history\fR expects, on standard input:
 .PP
 .Vb 3
 \&    principal: <principal>
@@ -176,19 +181,24 @@ checking protocol, \fBheimdal-history\fR expects, on standard input:
 .Ve
 .PP
 (with no leading whitespace).  <principal> is the principal changing its
-password (passed to the other password strength checking program but
-otherwise unused here), and <password> is the new password.  There must
-be exactly one space after the colon.  Any subsequent spaces are taken to
-be part of the principal or password.
+password (passed to the other password strength checking program but otherwise
+unused here), and <password> is the new password.  There must be exactly one
+space after the colon.  Any subsequent spaces are taken to be part of the
+principal or password.
 .PP
-If invoked as root, \fBheimdal-history\fR will run the external strength
-checking program as user \f(CW\*(C`nobody\*(C'\fR and group \f(CW\*(C`nogroup\*(C'\fR, and will check
-and write to the history database as user \f(CW\*(C`_history\*(C'\fR and group
-\&\f(CW\*(C`_history\*(C'\fR.  These users must exist on the system if it is run as root.
+If the password is accepted, \fBheimdal-history\fR will assume that it will be
+used and will update the history database to record the new password.  It will
+also update the password length statistics database to account for the new
+password.
 .PP
-The result of each password check will be logged to syslog (priority
-\&\s-1LOG_INFO,\s0 facility \s-1LOG_AUTH\s0).  Each log line will be a set of key/value
-pairs in the format \f(CW\*(C`\f(CIkey\f(CW=\f(CIvalue\f(CW\*(C'\fR.  The keys are:
+If invoked as root, \fBheimdal-history\fR will run the external strength checking
+program as user \f(CW\*(C`nobody\*(C'\fR and group \f(CW\*(C`nogroup\*(C'\fR, and will check and write to
+the history database as user \f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.  These users
+must exist on the system if it is run as root.
+.PP
+The result of each password check will be logged to syslog (priority \s-1LOG_INFO,\s0
+facility \s-1LOG_AUTH\s0).  Each log line will be a set of key/value pairs in the
+format \f(CW\*(C`\f(CIkey\f(CW=\f(CIvalue\f(CW\*(C'\fR.  The keys are:
 .IP "action" 4
 .IX Item "action"
 The action performed (currently always \f(CW\*(C`check\*(C'\fR).
@@ -197,12 +207,12 @@ The action performed (currently always \f(CW\*(C`check\*(C'\fR).
 The principal for which a password was checked.
 .IP "error" 4
 .IX Item "error"
-An internal error message that did not stop the history check, but which
-may indicate that something is wrong with the history database (such as
-corrupted entries or invalid hashes).  If this key is present, neither
-\&\f(CW\*(C`result\*(C'\fR nor \f(CW\*(C`reason\*(C'\fR will be present.  There will be a subsequent log
-message from the same invocation giving the final result of the history
-check (assuming \fBheimdal-history\fR doesn't exit with a fatal error).
+An internal error message that did not stop the history check, but which may
+indicate that something is wrong with the history database (such as corrupted
+entries or invalid hashes).  If this key is present, neither \f(CW\*(C`result\*(C'\fR nor
+\&\f(CW\*(C`reason\*(C'\fR will be present.  There will be a subsequent log message from the
+same invocation giving the final result of the history check (assuming
+\&\fBheimdal-history\fR doesn't exit with a fatal error).
 .IP "result" 4
 .IX Item "result"
 Either \f(CW\*(C`accepted\*(C'\fR or \f(CW\*(C`rejected\*(C'\fR.
@@ -210,9 +220,9 @@ Either \f(CW\*(C`accepted\*(C'\fR or \f(CW\*(C`rejected\*(C'\fR.
 .IX Item "reason"
 If the password was rejected, the reason for the rejection.
 .PP
-The value will be surrounded with double quotes if it contains a double
-quote or space.  Any double quotes in the value will be doubled, so \f(CW\*(C`"\*(C'\fR
-becomes \f(CW""\fR.
+The value will be surrounded with double quotes if it contains a double quote
+or space.  Any double quotes in the value will be doubled, so \f(CW\*(C`"\*(C'\fR becomes
+\&\f(CW""\fR.
 .SH "OPTIONS"
 .IX Header "OPTIONS"
 .IP "\fB\-b\fR \fItarget-time\fR, \fB\-\-benchmark\fR=\fItarget-time\fR" 4
@@ -221,14 +231,20 @@ Do not do a password history check.  Instead, benchmark the hash algorithm
 with various possible iteration counts and find an iteration count that
 results in \fItarget-time\fR seconds of computation time required to hash a
 password (which should be a real number).  A result will be considered
-acceptable if it is within 0.005 seconds of the target time.  The results
-will be printed to standard output and then \fBheimdal-history\fR will exit
+acceptable if it is within 0.005 seconds of the target time.  The results will
+be printed to standard output and then \fBheimdal-history\fR will exit
 successfully.
+.IP "\fB\-c\fR, \fB\-\-check\-only\fR" 4
+.IX Item "-c, --check-only"
+Check password history and password strength and print the results as normal,
+but do not update the history or length statistics databases.  This is a
+read-only mode of operation that will not make any changes to the underlying
+database, only report if a password would currently be accepted.
 .IP "\fB\-d\fR \fIdatabase\fR, \fB\-\-database\fR=\fIdatabase\fR" 4
 .IX Item "-d database, --database=database"
 Use \fIdatabase\fR as the history database file instead of the default
-(\fI/var/lib/heimdal\-history/history.db\fR).  Primarily used for testing,
-since Heimdal won't pass this argument.
+(\fI/var/lib/heimdal\-history/history.db\fR).  Primarily used for testing, since
+Heimdal won't pass this argument.
 .IP "\fB\-h\fR, \fB\-\-help\fR" 4
 .IX Item "-h, --help"
 Print a short usage message and exit.
@@ -237,37 +253,37 @@ Print a short usage message and exit.
 Display this manual and exit.
 .IP "\fB\-q\fR, \fB\-\-quiet\fR" 4
 .IX Item "-q, --quiet"
-Suppress logging to syslog and only return the results on standard output
-and standard error.  Primarily used for testing, since Heimdal won't pass
-this argument.
+Suppress logging to syslog and only return the results on standard output and
+standard error.  Primarily used for testing, since Heimdal won't pass this
+argument.
 .IP "\fB\-S\fR \fIlength-stats-db\fR, \fB\-\-stats\fR=\fIlength-stats-db\fR" 4
 .IX Item "-S length-stats-db, --stats=length-stats-db"
 Use \fIlength-stats-db\fR as the database file for password length statistics
-instead of the default (\fI/var/lib/heimdal\-history/lengths.db\fR).
-Primarily used for testing, since Heimdal won't pass this argument.
+instead of the default (\fI/var/lib/heimdal\-history/lengths.db\fR).  Primarily
+used for testing, since Heimdal won't pass this argument.
 .IP "\fB\-s\fR \fIstrength-program\fR, \fB\-\-strength\fR=\fIstrength-program\fR" 4
 .IX Item "-s strength-program, --strength=strength-program"
-Run \fIstrength-program\fR as the external strength-checking program instead
-of the default (\fI/usr/bin/heimdal\-strength\fR).  Primarily used for
-testing, since Heimdal won't pass this argument.
+Run \fIstrength-program\fR as the external strength-checking program instead of
+the default (\fI/usr/bin/heimdal\-strength\fR).  Primarily used for testing, since
+Heimdal won't pass this argument.
 .SH "CONFIGURATION"
 .IX Header "CONFIGURATION"
 Additional setup is required to use this history implementation with your
 Heimdal \s-1KDC.\s0
 .PP
-First, ensure that its dependencies are installed, and then examine the
-local configuration settings at the top of the \fBheimdal-history\fR program.
-By default, it requires a \f(CW\*(C`_history\*(C'\fR user and \f(CW\*(C`_history\*(C'\fR group be
-present on the system, and all history information will be read and
-written as that user and group.  It also requires a \f(CW\*(C`nobody\*(C'\fR user and
-\&\f(CW\*(C`nogroup\*(C'\fR group to be present (this should be the default with most
-variants of \s-1UNIX\s0), and all strength checking will be done as that user and
-group.  It uses various files in \fI/var/lib/heimdal\-history\fR to store
-history and statistical information by default, so if using the defaults,
-create that directory and ensure it is writable by the \f(CW\*(C`_history\*(C'\fR user.
+First, ensure that its dependencies are installed, and then examine the local
+configuration settings at the top of the \fBheimdal-history\fR program.  By
+default, it requires a \f(CW\*(C`_history\*(C'\fR user and \f(CW\*(C`_history\*(C'\fR group be present on
+the system, and all history information will be read and written as that user
+and group.  It also requires a \f(CW\*(C`nobody\*(C'\fR user and \f(CW\*(C`nogroup\*(C'\fR group to be
+present (this should be the default with most variants of \s-1UNIX\s0), and all
+strength checking will be done as that user and group.  It uses various files
+in \fI/var/lib/heimdal\-history\fR to store history and statistical information by
+default, so if using the defaults, create that directory and ensure it is
+writable by the \f(CW\*(C`_history\*(C'\fR user.
 .PP
-Once that setup is done, change your \f(CW\*(C`[password_quality]\*(C'\fR configuration
-in \fIkrb5.conf\fR or \fIkdc.conf\fR to:
+Once that setup is done, change your \f(CW\*(C`[password_quality]\*(C'\fR configuration in
+\&\fIkrb5.conf\fR or \fIkdc.conf\fR to:
 .PP
 .Vb 3
 \&    [password_quality]
@@ -275,20 +291,20 @@ in \fIkrb5.conf\fR or \fIkdc.conf\fR to:
 \&        external_program = /usr/local/bin/heimdal\-history
 .Ve
 .PP
-The \fBheimdal-history\fR program will automatically also run
-\&\fBheimdal-strength\fR as well, looking for it in \fI/usr/bin\fR.  Change the
-\&\f(CW$STRENGTH_PROGRAM\fR setting at the top of the script if you have that
-program in a different location.  You should continue to configure
-\&\fBheimdal-strength\fR as if you were running it directly.
+The \fBheimdal-history\fR program will automatically also run \fBheimdal-strength\fR
+as well, looking for it in \fI/usr/bin\fR.  Change the \f(CW$STRENGTH_PROGRAM\fR
+setting at the top of the script if you have that program in a different
+location.  You should continue to configure \fBheimdal-strength\fR as if you were
+running it directly.
 .SH "RETURN STATUS"
 .IX Header "RETURN STATUS"
-On approval of the password, \fBheimdal-history\fR will print \f(CW\*(C`APPROVED\*(C'\fR and
-newline to standard output and exit with status 0.
+On approval of the password, \fBheimdal-history\fR will print \f(CW\*(C`APPROVED\*(C'\fR and a
+newline to standard output and exit with status 0.
 .PP
-If the password is rejected by the strength checking program or if it (or
-a version with a single character removed) matches one of the hashes stored
-in the password history, \fBheimdal-history\fR will print the reason for
-rejection to standard error and exit with status 0.
+If the password is rejected by the strength checking program or if it (or a
+version with a single character removed) matches one of the hashes stored in
+the password history, \fBheimdal-history\fR will print the reason for rejection
+to standard error and exit with status 0.
 .PP
 On any internal error, \fBheimdal-history\fR will print the error to standard
 error and exit with a non-zero status.
@@ -296,59 +312,60 @@ error and exit with a non-zero status.
 .IX Header "FILES"
 .IP "\fI/usr/bin/heimdal\-strength\fR" 4
 .IX Item "/usr/bin/heimdal-strength"
-The default password strength checking program.  This program must follow
-the Heimdal external password strength checking \s-1API.\s0
+The default password strength checking program.  This program must follow the
+Heimdal external password strength checking \s-1API.\s0
 .IP "\fI/var/lib/heimdal\-history/history.db\fR" 4
 .IX Item "/var/lib/heimdal-history/history.db"
-The default database path.  If \fBheimdal-strength\fR is run as root, this
-file needs to be readable and writable by user \f(CW\*(C`_history\*(C'\fR and group
-\&\f(CW\*(C`_history\*(C'\fR.  If it doesn't exist, it will be created with mode 0600.
+The default database path.  If \fBheimdal-strength\fR is run as root, this file
+needs to be readable and writable by user \f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.
+If it doesn't exist, it will be created with mode 0600.
 .IP "\fI/var/lib/heimdal\-history/history.db.lock\fR" 4
 .IX Item "/var/lib/heimdal-history/history.db.lock"
-The lock file used to synchronize access to the history database.  As with
-the history database, if \fBheimdal-strength\fR is run as root, this file
-needs to be readable and writable by user \f(CW\*(C`_history\*(C'\fR and group
-\&\f(CW\*(C`_history\*(C'\fR.
+The lock file used to synchronize access to the history database.  As with the
+history database, if \fBheimdal-strength\fR is run as root, this file needs to be
+readable and writable by user \f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.
 .IP "\fI/var/lib/heimdal\-history/lengths.db\fR" 4
 .IX Item "/var/lib/heimdal-history/lengths.db"
-The default length statistics path, which will be a BerkeleyDB \s-1DB_HASH\s0
-file of password lengths to counts of passwords with that length.  If
+The default length statistics path, which will be a BerkeleyDB \s-1DB_HASH\s0 file of
+password lengths to counts of passwords with that length.  If
 \&\fBheimdal-strength\fR is run as root, this file needs to be readable and
-writable by user \f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.  If it doesn't exist,
-it will be created with mode 0600.
+writable by user \f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.  If it doesn't exist, it
+will be created with mode 0600.
 .IP "\fI/var/lib/heimdal\-history/lengths.db.lock\fR" 4
 .IX Item "/var/lib/heimdal-history/lengths.db.lock"
-The lock file used to synchronize access to the length statistics
-database.  As with the length statistics database, if \fBheimdal-strength\fR
-is run as root, this file needs to be readable and writable by user
-\&\f(CW\*(C`_history\*(C'\fR and group \f(CW\*(C`_history\*(C'\fR.
+The lock file used to synchronize access to the length statistics database.
+As with the length statistics database, if \fBheimdal-strength\fR is run as root,
+this file needs to be readable and writable by user \f(CW\*(C`_history\*(C'\fR and group
+\&\f(CW\*(C`_history\*(C'\fR.
 .SH "AUTHOR"
 .IX Header "AUTHOR"
 Russ Allbery <eagle@eyrie.org>
 .SH "COPYRIGHT AND LICENSE"
 .IX Header "COPYRIGHT AND LICENSE"
-Copyright 2016 Russ Allbery <eagle@eyrie.org>
+Copyright 2016\-2017, 2020 Russ Allbery <eagle@eyrie.org>
 .PP
-Copyright 20132014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013\-2014 The Board of Trustees of the Leland Stanford Junior
 University
 .PP
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the \*(L"Software\*(R"),
-to deal in the Software without restriction, including without limitation
-the rights to use, copy, modify, merge, publish, distribute, sublicense,
-and/or sell copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following conditions:
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the \*(L"Software\*(R"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
 .PP
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
 .PP
 \&\s-1THE SOFTWARE IS PROVIDED \*(L"AS IS\*(R", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.\s0
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\s0  \s-1IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.\s0
+.PP
+SPDX-License-Identifier: \s-1MIT\s0
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-Crypt::PBKDF2, \fIheimdal\-strength\fR\|(1)
+Crypt::PBKDF2, \fBheimdal\-strength\fR\|(1)
index 9c7602e2665f1d46e5a2fd6b6a4e2cbcb1160197..c4c750a3fa508f52f074d80704447823be22014c 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+.    if \nF \{\
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.    if !\nF==2 \{\
-.        nr % 0
-.        nr F 2
+.        if !\nF==2 \{\
+.            nr % 0
+.            nr F 2
+.        \}
 .    \}
 .\}
+.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "HEIMDAL-STRENGTH 1"
-.TH HEIMDAL-STRENGTH 1 "2016-12-25" "3.1" "krb5-strength"
+.TH HEIMDAL-STRENGTH 1 "2020-05-17" "3.2" "krb5-strength"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -147,7 +151,7 @@ with CrackLib, checked against a \s-1CDB\s0 database of known weak passwords,
 checked for length, checked for non-printable or non-ASCII characters that
 may be difficult to enter reproducibly, required to contain particular
 character classes, or any combination of these tests.  It is normally run
-via \fIkpasswdd\fR\|(8) using the Heimdal password quality check interface rather
+via \fBkpasswdd\fR\|(8) using the Heimdal password quality check interface rather
 than directly.
 .PP
 To use this program, it must be configured in \fIkrb5.conf\fR via settings
@@ -309,7 +313,7 @@ may be helpful in combination with passphrases; users may choose a stock
 English phrase, and this will force at least some additional complexity.
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fIkrb5\-strength\-wordlist\fR\|(1), \fIkadm5\-strength\fR\|(3), \fIkpasswdd\fR\|(8), \fIkrb5.conf\fR\|(5)
+\&\fBkrb5\-strength\-wordlist\fR\|(1), \fBkadm5\-strength\fR\|(3), \fBkpasswdd\fR\|(8), \fBkrb5.conf\fR\|(5)
 .PP
 The \*(L"Password changing\*(R" section of the Heimdal info documentation
 describes the interface that this program implements and how to configure
@@ -325,10 +329,12 @@ Russ Allbery <eagle@eyrie.org>
 .IX Header "COPYRIGHT AND LICENSE"
 Copyright 2016 Russ Allbery <eagle@eyrie.org>
 .PP
-Copyright 2010, 20132014 The Board of Trustees of the Leland Stanford
+Copyright 2010, 2013\-2014 The Board of Trustees of the Leland Stanford
 Junior University
 .PP
 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.
+.PP
+SPDX-License-Identifier: \s-1FSFAP\s0
index 775d3afd965b7108ef5c5e95b327be9fe38d84ec..e44b7a45305e4b1f000643b395e559ec7c05b508 100644 (file)
@@ -7,10 +7,11 @@
  * dictionary.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2020 Russ Allbery <eagle@eyrie.org>
  * Copyright 2009, 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
- * See LICENSE for licensing terms.
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
@@ -21,8 +22,8 @@
 
 #include <plugin/internal.h>
 #include <util/macros.h>
-#include <util/messages.h>
 #include <util/messages-krb5.h>
+#include <util/messages.h>
 #include <util/xmalloc.h>
 
 
@@ -35,8 +36,9 @@ static void
 read_key(const char *key, char *buffer, size_t length)
 {
     char *p;
+    int size = (length < INT_MAX) ? (int) length : INT_MAX;
 
-    if (fgets(buffer, length, stdin) == NULL)
+    if (fgets(buffer, size, stdin) == NULL)
         sysdie("Cannot read %s", key);
     if (strlen(buffer) < 1 || buffer[strlen(buffer) - 1] != '\n')
         die("Malformed or too long %s line", key);
index 802da322f34642761952df46b85c7e73607725a5..eab8d0f8f99cdd7b8f7691f22211f7c5ebf681bf 100644 (file)
@@ -1,6 +1,7 @@
 =for stopwords
 heimdal-strength Heimdal CrackLib krb5-strength Allbery CDB
 canonicalization krb5-strength-wordlist reproducibly
+SPDX-License-Identifier FSFAP
 
 =head1 NAME
 
@@ -203,7 +204,7 @@ Russ Allbery <eagle@eyrie.org>
 
 Copyright 2016 Russ Allbery <eagle@eyrie.org>
 
-Copyright 2010, 20132014 The Board of Trustees of the Leland Stanford
+Copyright 2010, 2013-2014 The Board of Trustees of the Leland Stanford
 Junior University
 
 Copying and distribution of this file, with or without modification, are
@@ -211,4 +212,6 @@ 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
+
 =cut
index 16e0c38a91185c4b897a3839c8efb0d1ed1083d4..81bb4dadcb32259306aec25bbc22c2fc57106902 100755 (executable)
@@ -12,7 +12,8 @@
 # Declarations and configuration
 ##############################################################################
 
-require 5.006;
+require 5.010;
+use autodie;
 use strict;
 use warnings;
 
@@ -42,16 +43,16 @@ my $SQLITE_INSERT = q{
 # Utility functions
 ##############################################################################
 
-# print with error checking and an explicit file handle.
+# say with error checking and an explicit file handle.
 #
 # $fh   - Output file handle
 # @args - Remaining arguments to print
 #
 # Returns: undef
 #  Throws: Text exception on output failure
-sub print_fh {
+sub say_fh {
     my ($fh, @args) = @_;
-    print {$fh} @args or croak('print failed');
+    say {$fh} @args or croak("say failed: $!");
     return;
 }
 
@@ -81,8 +82,7 @@ sub write_cdb {
     if (-f $tmp) {
         die "$0: temporary output file $tmp already exists\n";
     }
-    open(my $tmp_fh, '>', $tmp)
-      or die "$0: cannot create output file $tmp: $!\n";
+    open(my $tmp_fh, '>', $tmp);
 
     # Walk through the input word list and write each word that passes the
     # filter to the output file handle as CDB data.
@@ -90,19 +90,19 @@ sub write_cdb {
         chomp($word);
         next if !$filter->($word);
         my $length = length($word);
-        print_fh($tmp_fh, "+$length,1:$word->1\n");
+        say_fh($tmp_fh, "+$length,1:$word->1");
     }
 
     # Add a trailing newline, required by the CDB data format, and close.
-    print_fh($tmp_fh, "\n");
-    close($tmp_fh) or die "$0: cannot write to temporary file $tmp: $!\n";
+    say_fh($tmp_fh, q{});
+    close($tmp_fh);
 
     # Run cdb to turn the result into a CDB database.  Ignore duplicate keys.
     system($CDB, '-c', '-u', $output, $tmp) == 0
       or die "$0: cdb -c failed\n";
 
     # Remove the temporary file and return.
-    unlink($tmp) or die "$0: cannot remove temporary file $tmp: $!\n";
+    unlink($tmp);
     return;
 }
 
@@ -169,19 +169,18 @@ sub write_sqlite {
 #  Throws: Text exception on output failure
 sub write_wordlist {
     my ($in_fh, $output, $filter) = @_;
-    open(my $out_fh, '>', $output)
-      or die "$0: cannot create output file $output: $!\n";
+    open(my $out_fh, '>', $output);
 
     # Walk through the input word list and write each word that passes the
     # filter to the output file handle.
     while (defined(my $word = <$in_fh>)) {
         chomp($word);
         next if !$filter->($word);
-        print_fh($out_fh, "$word\n");
+        say_fh($out_fh, $word);
     }
 
     # All done.
-    close($out_fh) or die "$0: cannot write to output file $output: $!\n";
+    close($out_fh);
     return;
 }
 
@@ -254,7 +253,7 @@ my @options = (
 Getopt::Long::config('bundling', 'no_ignore_case');
 GetOptions(\%config, @options);
 if ($config{manual}) {
-    print_fh(\*STDOUT, "Feeding myself to perldoc, please wait...\n");
+    say_fh(\*STDOUT, 'Feeding myself to perldoc, please wait...');
     exec('perldoc', '-t', $fullpath);
 }
 if (@ARGV != 1) {
@@ -271,8 +270,7 @@ my $input = $ARGV[0];
 my $filter = build_filter(\%config);
 
 # Process the input file into either wordlist output or a CDB file.
-open(my $in_fh, '<', $input)
-  or die "$0: cannot open input file $input: $!\n";
+open(my $in_fh, '<', $input);
 if ($config{output}) {
     write_wordlist($in_fh, $config{output}, $filter);
 } elsif ($config{cdb}) {
@@ -280,7 +278,7 @@ if ($config{output}) {
 } elsif ($config{sqlite}) {
     write_sqlite($in_fh, $config{sqlite}, $filter);
 }
-close($in_fh) or die "$0: cannot read all of input file $input: $!\n";
+close($in_fh);
 
 # All done.
 exit(0);
@@ -294,7 +292,7 @@ __END__
 krb5-strength-wordlist krb5-strength cdb whitespace lookups lookup
 sublicense MERCHANTABILITY NONINFRINGEMENT krb5-strength --ascii Allbery
 regexes output-wordlist heimdal-strength SQLite output-wordlist
-output-sqlite DBI wordlist
+output-sqlite DBI wordlist SPDX-License-Identifier MIT
 
 =head1 NAME
 
@@ -428,9 +426,9 @@ Russ Allbery <eagle@eyrie.org>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2016 Russ Allbery <eagle@eyrie.org>
+Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
 
-Copyright 20132014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013-2014 The Board of Trustees of the Leland Stanford Junior
 University
 
 Permission is hereby granted, free of charge, to any person obtaining a
@@ -451,6 +449,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 DEALINGS IN THE SOFTWARE.
 
+SPDX-License-Identifier: MIT
+
 =head1 SEE ALSO
 
 cdb(1), L<DBI>, L<DBD::SQLite>
@@ -462,3 +462,7 @@ L<https://www.eyrie.org/~eagle/software/krb5-strength/> as part of the
 krb5-strength package.
 
 =cut
+
+# Local Variables:
+# copyright-at-end-flag: t
+# End:
index 7cf24aae17ba210a6b516bdef12ba27886dee883..e21bd87f1e811b7b5e8a3a375a46a6cc87720867 100644 (file)
@@ -1,4 +1,4 @@
-.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32)
+.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
 .\"
 .\" Standard preamble:
 .\" ========================================================================
 .\" Avoid warning from groff about undefined register 'F'.
 .de IX
 ..
-.if !\nF .nr F 0
-.if \nF>0 \{\
-.    de IX
-.    tm Index:\\$1\t\\n%\t"\\$2"
+.nr rF 0
+.if \n(.g .if rF .nr rF 1
+.if (\n(rF:(\n(.g==0)) \{\
+.    if \nF \{\
+.        de IX
+.        tm Index:\\$1\t\\n%\t"\\$2"
 ..
-.    if !\nF==2 \{\
-.        nr % 0
-.        nr F 2
+.        if !\nF==2 \{\
+.            nr % 0
+.            nr F 2
+.        \}
 .    \}
 .\}
+.rr rF
 .\"
 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
 .\" ========================================================================
 .\"
 .IX Title "KRB5-STRENGTH-WORDLIST 1"
-.TH KRB5-STRENGTH-WORDLIST 1 "2016-12-25" "3.1" "krb5-strength"
+.TH KRB5-STRENGTH-WORDLIST 1 "2020-05-17" "3.2" "krb5-strength"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -249,9 +253,9 @@ This option may be given repeatedly to add multiple exclusion regexes.
 Russ Allbery <eagle@eyrie.org>
 .SH "COPYRIGHT AND LICENSE"
 .IX Header "COPYRIGHT AND LICENSE"
-Copyright 2016 Russ Allbery <eagle@eyrie.org>
+Copyright 2016, 2020 Russ Allbery <eagle@eyrie.org>
 .PP
-Copyright 20132014 The Board of Trustees of the Leland Stanford Junior
+Copyright 2013\-2014 The Board of Trustees of the Leland Stanford Junior
 University
 .PP
 Permission is hereby granted, free of charge, to any person obtaining a
@@ -266,14 +270,16 @@ all copies or substantial portions of the Software.
 .PP
 \&\s-1THE SOFTWARE IS PROVIDED \*(L"AS IS\*(R", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\s0  \s-1IN NO EVENT SHALL
 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 DEALINGS IN THE SOFTWARE.\s0
+.PP
+SPDX-License-Identifier: \s-1MIT\s0
 .SH "SEE ALSO"
 .IX Header "SEE ALSO"
-\&\fIcdb\fR\|(1), \s-1DBI\s0, DBD::SQLite
+\&\fBcdb\fR\|(1), \s-1DBI\s0, DBD::SQLite
 .PP
 The cdb file format is defined at <http://cr.yp.to/cdb.html>.
 .PP
index 8b82d56107ed3b8d7db4d8c35f0ffb3530b84043..612a88cf141b85c3aa3e3394e40b479fde3d11db 100644 (file)
@@ -5,14 +5,16 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2014 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008-2011
+ *     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
  */
 
 #ifndef UTIL_MACROS_H
index 341ac1a4eb714fb6277573cfb34b04e2c8e7e818..435369e17546aff70b31cd950a4f999b67c8ef4c 100644 (file)
@@ -9,7 +9,7 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2008, 2009, 2010, 2013
+ * Copyright 2006-2010, 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #include <config.h>
 #include <portable/krb5.h>
 #include <portable/system.h>
 
-#include <util/messages.h>
 #include <util/messages-krb5.h>
+#include <util/messages.h>
 #include <util/xmalloc.h>
 
 
index 63e72ec410abc673f66f872eb52bd28e9f07fbce..da96e4c66127d2147161f26c8bb3f0c7abe07c51 100644 (file)
@@ -5,7 +5,7 @@
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2006, 2007, 2008, 2009, 2010, 2013
+ * Copyright 2006-2010, 2013
  *     The Board of Trustees of the Leland Stanford Junior University
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
@@ -25,6 +25,8 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
+ *
+ * SPDX-License-Identifier: MIT
  */
 
 #ifndef UTIL_MESSAGES_KRB5_H
index 836c4b151435b9cc9f003b19668c90ac8c730766..0e79a4397db346ce4ece104e375459d44dc5c1e1 100644 (file)
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
  * Written by Russ Allbery <eagle@eyrie.org>
- * Copyright 2015, 2016 Russ Allbery <eagle@eyrie.org>
- * Copyright 2008, 2009, 2010, 2013, 2014
+ * Copyright 2015-2016, 2020 Russ Allbery <eagle@eyrie.org>
+ * Copyright 2008-2010, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
- * Copyright (c) 2004, 2005, 2006
- *     by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- *     2002, 2003 by The Internet Software Consortium and Rich Salz
+ * Copyright 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright 1991, 1994-2003 The Internet Software Consortium and Rich Salz
  *
  * This code is derived from software contributed to the Internet Software
  * Consortium by Rich Salz.
@@ -76,6 +74,8 @@
  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * SPDX-License-Identifier: ISC
  */
 
 #include <config.h>
 
 #include <errno.h>
 #ifdef HAVE_SYSLOG_H
-# include <syslog.h>
+#    include <syslog.h>
 #endif
 
 #ifdef _WIN32
-# include <windows.h>
-# define LOG_DEBUG      EVENTLOG_SUCCESS
-# define LOG_INFO       EVENTLOG_INFORMATION_TYPE
-# define LOG_NOTICE     EVENTLOG_INFORMATION_TYPE
-# define LOG_WARNING    EVENTLOG_WARNING_TYPE
-# define LOG_ERR        EVENTLOG_ERROR_TYPE
-# define LOG_CRIT       EVENTLOG_ERROR_TYPE
+#    include <windows.h>
+#    define LOG_DEBUG   EVENTLOG_SUCCESS
+#    define LOG_INFO    EVENTLOG_INFORMATION_TYPE
+#    define LOG_NOTICE  EVENTLOG_INFORMATION_TYPE
+#    define LOG_WARNING EVENTLOG_WARNING_TYPE
+#    define LOG_ERR     EVENTLOG_ERROR_TYPE
+#    define LOG_CRIT    EVENTLOG_ERROR_TYPE
 #endif
 
 #include <util/macros.h>
 #include <util/xmalloc.h>
 
 /* The default handler lists. */
-static message_handler_func stdout_handlers[2] = {
-    message_log_stdout, NULL
-};
-static message_handler_func stderr_handlers[2] = {
-    message_log_stderr, NULL
-};
+static message_handler_func stdout_handlers[2] = {message_log_stdout, NULL};
+static message_handler_func stderr_handlers[2] = {message_log_stderr, NULL};
 
 /* The list of logging functions currently in effect. */
-static message_handler_func *debug_handlers  = NULL;
+static message_handler_func *debug_handlers = NULL;
 static message_handler_func *notice_handlers = stdout_handlers;
-static message_handler_func *warn_handlers   = stderr_handlers;
-static message_handler_func *die_handlers    = stderr_handlers;
+static message_handler_func *warn_handlers = stderr_handlers;
+static message_handler_func *die_handlers = stderr_handlers;
 
 /* If non-NULL, called before exit and its return value passed to exit. */
 int (*message_fatal_cleanup)(void) = NULL;
@@ -144,16 +140,18 @@ message_handlers(message_handler_func **list, unsigned int count, va_list args)
  * duplication since we can't assume variadic macros, but I can at least make
  * it easier to write and keep them consistent.
  */
-#define HANDLER_FUNCTION(type)                                  \
-    void                                                        \
-    message_handlers_ ## type(unsigned int count, ...)          \
-    {                                                           \
-        va_list args;                                           \
-                                                                \
-        va_start(args, count);                                  \
-        message_handlers(& type ## _handlers, count, args);     \
-        va_end(args);                                           \
+/* clang-format off */
+#define HANDLER_FUNCTION(type)                              \
+    void                                                    \
+    message_handlers_ ## type(unsigned int count, ...)      \
+    {                                                       \
+        va_list args;                                       \
+                                                            \
+        va_start(args, count);                              \
+        message_handlers(& type ## _handlers, count, args); \
+        va_end(args);                                       \
     }
+/* clang-format on */
 HANDLER_FUNCTION(debug)
 HANDLER_FUNCTION(notice)
 HANDLER_FUNCTION(warn)
@@ -254,7 +252,7 @@ message_log_syslog(int pri, size_t len, const char *fmt, va_list args, int err)
             CloseEventLog(eventlog);
         }
     }
-#else /* !_WIN32 */
+#else  /* !_WIN32 */
     if (err == 0)
         syslog(pri, "%s", buffer);
     else
@@ -268,6 +266,7 @@ message_log_syslog(int pri, size_t len, const char *fmt, va_list args, int err)
  * Do the same sort of wrapper to generate all of the separate syslog logging
  * functions.
  */
+/* clang-format off */
 #define SYSLOG_FUNCTION(name, type)                                        \
     void                                                                   \
     message_log_syslog_ ## name(size_t l, const char *f, va_list a, int e) \
@@ -280,6 +279,7 @@ SYSLOG_FUNCTION(notice,  NOTICE)
 SYSLOG_FUNCTION(warning, WARNING)
 SYSLOG_FUNCTION(err,     ERR)
 SYSLOG_FUNCTION(crit,    CRIT)
+/* clang-format on */
 
 
 /*
index 555792bcf1476f2c8811d1f3f309a61093b4220d..3620273aa1ce1a080f8038e276f7935d823d57f2 100644 (file)
@@ -6,12 +6,10 @@
  *
  * Written by Russ Allbery <eagle@eyrie.org>
  * Copyright 2015 Russ Allbery <eagle@eyrie.org>
- * Copyright 2008, 2010, 20132014
+ * Copyright 2008, 2010, 2013-2014
  *     The Board of Trustees of the Leland Stanford Junior University
- * Copyright (c) 2004, 2005, 2006
- *     by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- *     2002, 2003 by The Internet Software Consortium and Rich Salz
+ * Copyright 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright 1991, 1994-2003 The Internet Software Consortium and Rich Salz
  *
  * This code is derived from software contributed to the Internet Software
  * Consortium by Rich Salz.
@@ -27,6 +25,8 @@
  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * SPDX-License-Identifier: ISC
  */
 
 #ifndef UTIL_MESSAGES_H
index 889bd1ee6e29656ea9ed0fc2dc04b14af34a08bb..e8a9a82599cc3c52b97d697c6b8149cc55402072 100644 (file)
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
+ * Written by Russ Allbery <eagle@eyrie.org>
  * Copyright 2015 Russ Allbery <eagle@eyrie.org>
- * Copyright 2012, 2013, 2014
+ * Copyright 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
- * Copyright (c) 2004, 2005, 2006
- *     by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- *     2002, 2003 by The Internet Software Consortium and Rich Salz
+ * Copyright 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright 1991, 1994-2003 The Internet Software Consortium and Rich Salz
  *
  * This code is derived from software contributed to the Internet Software
  * Consortium by Rich Salz.
@@ -84,6 +83,8 @@
  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * SPDX-License-Identifier: ISC
  */
 
 #include <config.h>
@@ -100,8 +101,8 @@ void
 xmalloc_fail(const char *function, size_t size, const char *file, int line)
 {
     if (size == 0)
-        sysdie("failed to format output with %s at %s line %d", function,
-               file, line);
+        sysdie("failed to format output with %s at %s line %d", function, file,
+               line);
     else
         sysdie("failed to %s %lu bytes at %s line %d", function,
                (unsigned long) size, file, line);
@@ -201,7 +202,7 @@ x_strndup(const char *s, size_t size, const char *file, int line)
     char *copy;
 
     /* Don't assume that the source string is nul-terminated. */
-    for (p = s; (size_t) (p - s) < size && *p != '\0'; p++)
+    for (p = s; (size_t)(p - s) < size && *p != '\0'; p++)
         ;
     length = p - s;
     copy = malloc(length + 1);
@@ -261,7 +262,7 @@ x_asprintf(char **strp, const char *file, int line, const char *fmt, ...)
     }
     va_end(args);
 }
-#else /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */
+#else  /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */
 void
 x_asprintf(char **strp, const char *fmt, ...)
 {
index fc159b405f53976d1c2fc6bf26a2ffd7df811ab8..02c5431fd09918fd4c8edf5223c1db5eba898aee 100644 (file)
@@ -4,12 +4,11 @@
  * The canonical version of this file is maintained in the rra-c-util package,
  * which can be found at <https://www.eyrie.org/~eagle/software/rra-c-util/>.
  *
- * Copyright 2010, 2012, 2013, 2014
+ * Written by Russ Allbery <eagle@eyrie.org>
+ * Copyright 2010, 2012-2014
  *     The Board of Trustees of the Leland Stanford Junior University
- * Copyright (c) 2004, 2005, 2006
- *     by Internet Systems Consortium, Inc. ("ISC")
- * Copyright (c) 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- *     2002, 2003 by The Internet Software Consortium and Rich Salz
+ * Copyright 2004-2006 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright 1991, 1994-2003 The Internet Software Consortium and Rich Salz
  *
  * This code is derived from software contributed to the Internet Software
  * Consortium by Rich Salz.
@@ -25,6 +24,8 @@
  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * SPDX-License-Identifier: ISC
  */
 
 #ifndef UTIL_XMALLOC_H
  * number information for debugging error messages without the user having to
  * pass those in every time.
  */
-#define xcalloc(n, size)        x_calloc((n), (size), __FILE__, __LINE__)
-#define xmalloc(size)           x_malloc((size), __FILE__, __LINE__)
-#define xrealloc(p, size)       x_realloc((p), (size), __FILE__, __LINE__)
-#define xstrdup(p)              x_strdup((p), __FILE__, __LINE__)
-#define xstrndup(p, size)       x_strndup((p), (size), __FILE__, __LINE__)
-#define xvasprintf(p, f, a)     x_vasprintf((p), (f), (a), __FILE__, __LINE__)
+#define xcalloc(n, size)    x_calloc((n), (size), __FILE__, __LINE__)
+#define xmalloc(size)       x_malloc((size), __FILE__, __LINE__)
+#define xrealloc(p, size)   x_realloc((p), (size), __FILE__, __LINE__)
+#define xstrdup(p)          x_strdup((p), __FILE__, __LINE__)
+#define xstrndup(p, size)   x_strndup((p), (size), __FILE__, __LINE__)
+#define xvasprintf(p, f, a) x_vasprintf((p), (f), (a), __FILE__, __LINE__)
 #define xreallocarray(p, n, size) \
     x_reallocarray((p), (n), (size), __FILE__, __LINE__)
 
  * are supported.
  */
 #ifdef HAVE_C99_VAMACROS
-# define xasprintf(p, f, ...) \
-    x_asprintf((p), __FILE__, __LINE__, (f), __VA_ARGS__)
+#    define xasprintf(p, f, ...) \
+        x_asprintf((p), __FILE__, __LINE__, (f), __VA_ARGS__)
 #elif HAVE_GNU_VAMACROS
-# define xasprintf(p, f, args...) \
-    x_asprintf((p), __FILE__, __LINE__, (f), args)
+#    define xasprintf(p, f, args...) \
+        x_asprintf((p), __FILE__, __LINE__, (f), args)
 #else
-# define xasprintf x_asprintf
+#    define xasprintf x_asprintf
 #endif
 
 BEGIN_DECLS
@@ -110,7 +111,7 @@ typedef void (*xmalloc_handler_type)(const char *, size_t, const char *, int);
 
 /* The default error handler. */
 void xmalloc_fail(const char *, size_t, const char *, int)
-    __attribute__((__nonnull__));
+    __attribute__((__nonnull__, __noreturn__));
 
 /*
  * Assign to this variable to choose a handler other than the default, which