diff -Nru libpam-afs-session-2.5/aclocal.m4 libpam-afs-session-2.6/aclocal.m4 --- libpam-afs-session-2.5/aclocal.m4 2011-07-26 00:53:13.000000000 +0000 +++ libpam-afs-session-2.6/aclocal.m4 2015-09-19 18:26:46.000000000 +0000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.15 -*- Autoconf -*- + +# Copyright (C) 1996-2014 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 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. @@ -11,16 +11,17 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# longlong.m4 serial 14 -dnl Copyright (C) 1999-2007, 2009-2010 Free Software Foundation, Inc. +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2015 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,8 +29,8 @@ dnl From Paul Eggert. # Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'long long int' exists but is only 32 bits large # (as on some very old compilers), HAVE_LONG_LONG_INT will not be @@ -37,44 +38,48 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], [ + AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug isn't important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no], - [ac_cv_type_long_long_int=yes])], - [ac_cv_type_long_long_int=no])]) + [ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. + dnl If cross compiling, assume the bug is not important, since + dnl nobody cross compiles for this platform as far as we know. + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[@%:@include + @%:@ifndef LLONG_MAX + @%:@ define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + @%:@ define LLONG_MAX (HALF - 1 + HALF) + @%:@endif]], + [[long long int n = 1; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0;]])], + [], + [ac_cv_type_long_long_int=no], + [:]) + fi + fi]) if test $ac_cv_type_long_long_int = yes; then AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `long long int'.]) + [Define to 1 if the system has the type 'long long int'.]) fi ]) # Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, but can be removed once we -# assume 2.62 everywhere. +# This fixes a bug in Autoconf 2.61, and can be faster +# than what's in Autoconf 2.62 through 2.68. # Note: If the type 'unsigned long long int' exists but is only 32 bits # large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT @@ -85,13 +90,16 @@ [ AC_CACHE_CHECK([for unsigned long long int], [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) + [ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + AC_LINK_IFELSE( + [_AC_TYPE_LONG_LONG_SNIPPET], + [], + [ac_cv_type_unsigned_long_long_int=no]) + fi]) if test $ac_cv_type_unsigned_long_long_int = yes; then AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type `unsigned long long int'.]) + [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) @@ -126,7 +134,7 @@ | (ullmax / ull) | (ullmax % ull));]]) ]) -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -138,10 +146,10 @@ # 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.11' +[am__api_version='1.15' 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.11.1], [], +m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -157,22 +165,82 @@ # 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.11.1])dnl +[AM_AUTOMAKE_VERSION([1.15])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. +# +# 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_PROG_AR([ACT-IF-FAIL]) +# ------------------------- +# Try to determine the archiver interface, and trigger the ar-lib wrapper +# if it is needed. If the detection of archiver interface fails, run +# ACT-IF-FAIL (default is to abort configure with a proper error message). +AC_DEFUN([AM_PROG_AR], +[AC_BEFORE([$0], [LT_INIT])dnl +AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl +AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([ar-lib])dnl +AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) +: ${AR=ar} + +AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], + [AC_LANG_PUSH([C]) + am_cv_ar_interface=ar + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], + [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([am_ar_try]) + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + ]) + AC_LANG_POP([C])]) + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + m4_default([$1], + [AC_MSG_ERROR([could not determine $AR interface])]) + ;; +esac +AC_SUBST([AR])dnl +]) + # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -191,7 +259,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -209,30 +277,26 @@ # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2014 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. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -251,16 +315,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2014 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. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -270,7 +332,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -283,12 +345,13 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -296,8 +359,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -336,16 +400,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -354,16 +418,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -411,7 +475,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -421,34 +485,39 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2014 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. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # 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 @@ -461,7 +530,7 @@ # 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 + # 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. @@ -473,21 +542,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # 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 + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -505,7 +572,7 @@ # 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 +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -515,18 +582,21 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2014 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. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -539,7 +609,7 @@ # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -568,33 +638,42 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. +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: +# +# +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. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl @@ -603,34 +682,82 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'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: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi +dnl The trailing newline in this macro's definition is deliberate, for +dnl backward compatibility and to allow trailing 'dnl'-style comments +dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -652,7 +779,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -663,7 +790,7 @@ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -671,16 +798,14 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2014 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. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -697,20 +822,17 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2014 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. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -718,13 +840,14 @@ [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -732,18 +855,14 @@ ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 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. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -761,7 +880,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# 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 @@ -786,52 +905,14 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# 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. - -# serial 6 - -# AM_PROG_CC_C_O -# -------------- -# Like AC_PROG_CC_C_O, but changed for automake. -AC_DEFUN([AM_PROG_CC_C_O], -[AC_REQUIRE([AC_PROG_CC_C_O])dnl -AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -dnl Make sure AC_PROG_CC is never called again, or it will override our -dnl setting of CC. -m4_define([AC_PROG_CC], - [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) -]) - # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2014 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. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -839,11 +920,10 @@ $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -856,63 +936,35 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 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_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 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. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -923,24 +975,82 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Check to make sure that the build environment is sane. -*- Autoconf -*- +# Copyright (C) 1999-2014 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. -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +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. # # 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. -# serial 5 +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2014 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -951,32 +1061,40 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -986,36 +1104,85 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 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. -# serial 1 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1023,34 +1190,32 @@ # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2014 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. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1058,24 +1223,22 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004-2014 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. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1085,80 +1248,121 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR +m4_include([m4/clang.m4]) m4_include([m4/kafs.m4]) +m4_include([m4/krb5-config.m4]) m4_include([m4/krb5.m4]) m4_include([m4/ld-version.m4]) m4_include([m4/lib-depends.m4]) diff -Nru libpam-afs-session-2.5/build-aux/ar-lib libpam-afs-session-2.6/build-aux/ar-lib --- libpam-afs-session-2.5/build-aux/ar-lib 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/ar-lib 2015-09-19 18:26:48.000000000 +0000 @@ -0,0 +1,270 @@ +#! /bin/sh +# Wrapper for Microsoft lib.exe + +me=ar-lib +scriptversion=2012-03-01.08; # UTC + +# Copyright (C) 2010-2014 Free Software Foundation, Inc. +# Written by Peter Rosin . +# +# 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 +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# 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 . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + + +# func_error message +func_error () +{ + echo "$me: $1" 1>&2 + exit 1 +} + +file_conv= + +# func_file_conv build_file +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv in + mingw) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_at_file at_file operation archive +# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE +# for each of them. +# When interpreting the content of the @FILE, do NOT use func_file_conv, +# since the user would need to supply preconverted file names to +# binutils ar, at least for MinGW. +func_at_file () +{ + operation=$2 + archive=$3 + at_file_contents=`cat "$1"` + eval set x "$at_file_contents" + shift + + for member + do + $AR -NOLOGO $operation:"$member" "$archive" || exit $? + done +} + +case $1 in + '') + func_error "no command. Try '$0 --help' for more information." + ;; + -h | --h*) + cat <. # # This program is free software; you can redistribute it and/or modify @@ -29,21 +28,224 @@ # bugs to or send patches to # . +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] -Wrapper for compilers which do not understand `-c -o'. -Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the -right script to run: please start by reading the file `INSTALL'. +right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF @@ -53,11 +255,13 @@ echo "compile $scriptversion" exit $? ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; esac ofile= cfile= -eat= for arg do @@ -66,8 +270,8 @@ else case $1 in -o) - # configure might choose to run compile as `compile cc -o foo foo.c'. - # So we strip `-o arg' only if arg is an object. + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) @@ -94,10 +298,10 @@ done if test -z "$ofile" || test -z "$cfile"; then - # If no `-o' option was seen then we might have been invoked from a + # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no - # `.c' file was seen then we are probably linking. That is also + # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi @@ -106,7 +310,7 @@ cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. -# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d diff -Nru libpam-afs-session-2.5/build-aux/config.guess libpam-afs-session-2.6/build-aux/config.guess --- libpam-afs-session-2.5/build-aux/config.guess 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/config.guess 2015-09-19 18:26:48.000000000 +0000 @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2015-08-20' # 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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -17,26 +15,22 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# 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;hb=HEAD +# +# Please send patches to . + me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,9 +50,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2015 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." @@ -140,12 +132,33 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +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 + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -155,20 +168,27 @@ # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ + /sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || \ + echo unknown)` 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 + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -184,6 +204,13 @@ os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + expr='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -194,13 +221,17 @@ release='-gnu' ;; *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + 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}" + echo "${machine}-${os}${release}${abi}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` @@ -218,6 +249,9 @@ *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; + *:Sortix:*:*) + echo ${UNAME_MACHINE}-unknown-sortix + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -304,7 +338,7 @@ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -562,8 +596,9 @@ else IBM_ARCH=powerpc fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` + if [ -x /usr/bin/lslpp ] ; then + 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} fi @@ -792,21 +827,26 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) 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 @@ -852,15 +892,22 @@ exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`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 '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -872,56 +919,57 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) 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-gnu + 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-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + e2k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -940,54 +988,63 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + 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-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + 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-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1191,6 +1248,9 @@ BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1217,19 +1277,31 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - 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 - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + 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 [ "$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 + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1246,7 +1318,7 @@ NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1315,158 +1387,10 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi +esac cat >&2 <. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -75,9 +68,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +Copyright 1992-2015 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." @@ -125,13 +116,17 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os 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/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -154,7 +149,7 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -223,6 +218,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,20 +248,29 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | ba \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ + | e2k | epiphany \ + | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -274,33 +284,37 @@ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ - | open8 \ - | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | riscv32 | riscv64 \ + | rl78 | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +329,10 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +345,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,25 +371,32 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | ba-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ + | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -384,34 +410,41 @@ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | riscv32-* | riscv64-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -488,6 +521,9 @@ basic_machine=i386-pc os=-aros ;; + asmjs) + basic_machine=asmjs-unknown + ;; aux) basic_machine=m68k-apple os=-aux @@ -711,7 +747,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -750,6 +785,9 @@ basic_machine=m68k-isi os=-sysv ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; m68knommu) basic_machine=m68k-unknown os=-linux @@ -769,11 +807,15 @@ basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -801,6 +843,10 @@ basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos @@ -808,10 +854,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i686-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -992,7 +1046,11 @@ basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1120,13 +1178,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1324,29 +1377,29 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ + | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -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* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1470,9 +1523,6 @@ -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1521,6 +1571,12 @@ c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1604,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff -Nru libpam-afs-session-2.5/build-aux/depcomp libpam-afs-session-2.6/build-aux/depcomp --- libpam-afs-session-2.5/build-aux/depcomp 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/depcomp 2015-09-19 18:26:48.000000000 +0000 @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999-2014 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 @@ -28,9 +27,9 @@ case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -40,11 +39,11 @@ Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -57,6 +56,66 @@ ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -69,6 +128,9 @@ rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -80,18 +142,32 @@ fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp +fi + +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -114,8 +190,7 @@ done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -123,13 +198,17 @@ ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -137,31 +216,31 @@ fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # The second -e expression handles DOS-style file names with drive + # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -179,8 +258,7 @@ "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -188,43 +266,41 @@ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -237,9 +313,7 @@ "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -248,44 +322,100 @@ do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -297,8 +427,8 @@ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -309,9 +439,8 @@ # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -322,8 +451,7 @@ "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -333,77 +461,107 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" + # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in 'foo.d' instead, so we check for that too. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; + +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; #nosideeffect) # This comment above is used by automake to tell side-effect @@ -422,7 +580,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,18 +600,18 @@ done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -503,12 +661,15 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -525,7 +686,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -544,10 +705,10 @@ esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -579,23 +740,23 @@ shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff -Nru libpam-afs-session-2.5/build-aux/install-sh libpam-afs-session-2.6/build-aux/install-sh --- libpam-afs-session-2.5/build-aux/install-sh 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/install-sh 2015-09-19 18:26:48.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,25 +35,21 @@ # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. +tab=' ' nl=' ' -IFS=" "" $nl" +IFS=" $tab$nl" -# set DOITPROG to echo to test this script +# Set DOITPROG to "echo" to test this script. -# Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi +doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. @@ -68,17 +64,6 @@ rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - posix_mkdir= # Desired mode of installed file. @@ -97,7 +82,7 @@ dst_arg= copy_on_change=false -no_target_directory= +is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE @@ -137,42 +122,57 @@ -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" - shift;; + shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; + case $mode in + *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; -o) chowncmd="$chownprog $2" - shift;; + shift;; -s) stripcmd=$stripprog;; - -t) dst_arg=$2 - shift;; + -t) + is_target_a_directory=always + dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; - -T) no_target_directory=true;; + -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; - --) shift - break;; + --) shift + break;; - -*) echo "$0: invalid option: $1" >&2 - exit 1;; + -*) echo "$0: invalid option: $1" >&2 + exit 1;; *) break;; esac shift done +# We allow the use of options -d and -T together, by making -d +# take the precedence; this is for compatibility with GNU install. + +if test -n "$dir_arg"; then + if test -n "$dst_arg"; then + echo "$0: target directory not allowed when installing a directory." >&2 + exit 1 + fi +fi + if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. @@ -186,6 +186,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,13 +198,26 @@ echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + if test $# -gt 1 || test "$is_target_a_directory" = always; then + if test ! -d "$dst_arg"; then + echo "$0: $dst_arg: Is not a directory." >&2 + exit 1 + fi + fi +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -211,16 +228,16 @@ *[0-7]) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw='% 200' + u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then - u_plus_rw= + u_plus_rw= else - u_plus_rw=,u+rw + u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac @@ -228,9 +245,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,51 +269,20 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 + 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"` dstdir_status=0 else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - + dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi @@ -307,74 +293,81 @@ if test $dstdir_status != 0; then case $posix_mkdir in '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + # $RANDOM is not portable (e.g. dash); use it when possible 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. + if (umask $mkdir_umask && + $mkdirprog $mkdir_mode "$tmpdir" && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + test_tmpdir="$tmpdir/a" + ls_ld_tmpdir=`ls -ld "$test_tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null + fi + trap '' 0;; + esac;; esac if $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else @@ -384,53 +377,51 @@ # directory the slow way, step by step, checking for races as we go. case $dstdir in - /*) prefix='/';; - -*) prefix='./';; - *) prefix='';; + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; esac - eval "$initialize_posix_glob" - oIFS=$IFS IFS=/ - $posix_glob set -f + set -f set fnord $dstdir shift - $posix_glob set +f + set +f IFS=$oIFS prefixes= for d do - test -z "$d" && continue + test X"$d" = X && continue - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ done if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true fi fi fi @@ -465,15 +456,12 @@ # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - + set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then @@ -486,24 +474,24 @@ # to itself, or perhaps because mv is so ancient that it does not # support -f. { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 diff -Nru libpam-afs-session-2.5/build-aux/ltmain.sh libpam-afs-session-2.6/build-aux/ltmain.sh --- libpam-afs-session-2.5/build-aux/ltmain.sh 2011-07-26 00:53:11.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/ltmain.sh 2015-09-19 18:26:44.000000000 +0000 @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 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. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.11 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-2" +VERSION="2.4.2 Debian-2.4.2-1.11" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff -Nru libpam-afs-session-2.5/build-aux/missing libpam-afs-session-2.6/build-aux/missing --- libpam-afs-session-2.5/build-aux/missing 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/build-aux/missing 2015-09-19 18:26:48.000000000 +0000 @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2009-04-28.21; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # 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 @@ -26,69 +25,40 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -100,272 +70,141 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; +# Run the given program, remember its exit status. +"$@"; st=$? - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; +# If it succeeded, we are done. +test $st -eq 0 && exit 0 - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi -exit 0 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff -Nru libpam-afs-session-2.5/config.h.in libpam-afs-session-2.6/config.h.in --- libpam-afs-session-2.5/config.h.in 2011-07-26 00:53:15.000000000 +0000 +++ libpam-afs-session-2.6/config.h.in 2015-09-19 18:26:47.000000000 +0000 @@ -13,6 +13,14 @@ don't. */ #undef HAVE_DECL_SNPRINTF +/* Define to 1 if you have the declaration of `strlcat', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCAT + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCPY + /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you don't. */ #undef HAVE_DECL_VSNPRINTF @@ -29,8 +37,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `issetuidgid' function. */ -#undef HAVE_ISSETUIDGID +/* Define to 1 if you have the `issetugid' function. */ +#undef HAVE_ISSETUGID /* Define to 1 if you have the header file. */ #undef HAVE_K5PROFILE_H @@ -56,12 +64,18 @@ /* Define to 1 to use the AFS syscall interface. */ #undef HAVE_KAFS_SYSCALL -/* Define to enable Kerberos features. */ -#undef HAVE_KERBEROS +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROSV5_COM_ERR_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_KERBEROSV5_KRB5_H /* Define to 1 if you have the header file. */ #undef HAVE_KOPENAFS_H +/* Define to enable Kerberos features. */ +#undef HAVE_KRB5 + /* Define to 1 if you have the `krb5_afslog' function. */ #undef HAVE_KRB5_AFSLOG @@ -86,9 +100,15 @@ /* Define to 1 if you have the `krb5_get_profile' function. */ #undef HAVE_KRB5_GET_PROFILE +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB5_H + /* Define to 1 if you have the `krb5_init_secure_context' function. */ #undef HAVE_KRB5_INIT_SECURE_CONTEXT +/* Define to 1 if you have the header file. */ +#undef HAVE_KRB5_KRB5_H + /* Define to 1 if the system has the type `krb5_realm'. */ #undef HAVE_KRB5_REALM @@ -104,7 +124,7 @@ /* Define to 1 if you have the `k_pioctl' function. */ #undef HAVE_K_PIOCTL -/* Define to 1 if the system has the type `long long int'. */ +/* Define to 1 if the system has the type 'long long int'. */ #undef HAVE_LONG_LONG_INT /* Define to 1 if you have the OpenAFS lsetpag function. */ @@ -140,6 +160,9 @@ /* Define to 1 if you have the 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 header file. */ #undef HAVE_SECURITY_PAM_APPL_H @@ -149,9 +172,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_PAM_MODUTIL_H +/* Define to 1 if the system has the type `sig_atomic_t'. */ +#undef HAVE_SIG_ATOMIC_T + /* Define if your system has a working snprintf function. */ #undef HAVE_SNPRINTF +/* Define to 1 if the system has the type `ssize_t'. */ +#undef HAVE_SSIZE_T + /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H @@ -191,6 +220,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H +/* Define to 1 if the system has the type 'unsigned long long int'. */ +#undef HAVE_UNSIGNED_LONG_LONG_INT + /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL @@ -201,9 +233,6 @@ /* The name of the PAM module, used by the pam_vsyslog replacement. */ #undef MODULE_NAME -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Define to 1 if the operating system has no PAG support. */ #undef NO_PAG_SUPPORT @@ -231,6 +260,9 @@ /* Define to const if PAM uses const in pam_get_item, empty otherwise. */ #undef PAM_CONST +/* Define to const if PAM uses const in pam_strerror, empty otherwise. */ +#undef PAM_STRERROR_CONST + /* Full path to aklog binary. */ #undef PATH_AKLOG @@ -265,6 +297,17 @@ /* Version number of package */ #undef VERSION +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + /* Define to 1 if on MINIX. */ #undef _MINIX @@ -283,9 +326,6 @@ #define below would cause a syntax error. */ #undef _UINT32_T -/* Define to int if does not define. */ -#undef sig_atomic_t - /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t diff -Nru libpam-afs-session-2.5/configure libpam-afs-session-2.6/configure --- libpam-afs-session-2.5/configure 2011-07-26 00:53:15.000000000 +0000 +++ libpam-afs-session-2.6/configure 2015-09-19 18:26:47.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for pam-afs-session 2.5. +# Generated by GNU Autoconf 2.69 for pam-afs-session 2.6. # -# Report bugs to . +# Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -246,7 +274,7 @@ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - $as_echo "$0: Please tell bug-autoconf@gnu.org and rra@stanford.edu + $as_echo "$0: Please tell bug-autoconf@gnu.org and eagle@eyrie.org $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do @@ -339,6 +367,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -460,6 +496,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -494,16 +534,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -515,28 +555,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -570,9 +590,9 @@ # Identity of this package. PACKAGE_NAME='pam-afs-session' PACKAGE_TARNAME='pam-afs-session' -PACKAGE_VERSION='2.5' -PACKAGE_STRING='pam-afs-session 2.5' -PACKAGE_BUGREPORT='rra@stanford.edu' +PACKAGE_VERSION='2.6' +PACKAGE_STRING='pam-afs-session 2.6' +PACKAGE_BUGREPORT='eagle@eyrie.org' PACKAGE_URL='' ac_config_libobj_dir=portable @@ -615,6 +635,10 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS +WARNINGS_CLANG_FALSE +WARNINGS_CLANG_TRUE +WARNINGS_GCC_FALSE +WARNINGS_GCC_TRUE NEED_KAFS_FALSE NEED_KAFS_TRUE KAFS_LIBS @@ -622,9 +646,10 @@ KAFS_CPPFLAGS KRB5_USES_COM_ERR_FALSE KRB5_USES_COM_ERR_TRUE -KRB5_CONFIG +PATH_KRB5_CONFIG KRB5_LIBS KRB5_LDFLAGS +KRB5_CPPFLAGS_GCC KRB5_CPPFLAGS PATH_AKLOG LIBOBJS @@ -637,8 +662,6 @@ DSYMUTIL MANIFEST_TOOL RANLIB -ac_ct_AR -AR DLLTOOL OBJDUMP LN_S @@ -657,12 +680,15 @@ build_cpu build LIBTOOL +ac_ct_AR +AR EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -681,6 +707,8 @@ MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -723,6 +751,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -748,6 +777,7 @@ enable_silent_rules enable_maintainer_mode enable_dependency_tracking +enable_largefile enable_static enable_shared with_pic @@ -776,7 +806,7 @@ LIBS CPPFLAGS CPP -KRB5_CONFIG' +PATH_KRB5_CONFIG' # Initialize some variables set by options. @@ -815,6 +845,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1067,6 +1098,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1204,7 +1244,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1232,8 +1272,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1319,7 +1357,7 @@ # 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 pam-afs-session 2.5 to adapt to many kinds of systems. +\`configure' configures pam-afs-session 2.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1359,6 +1397,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1389,7 +1428,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of pam-afs-session 2.5:";; + short | recursive ) echo "Configuration of pam-afs-session 2.6:";; esac cat <<\_ACEOF @@ -1397,12 +1436,16 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-largefile omit support for large files --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] @@ -1414,22 +1457,22 @@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-aklog=PATH Path to aklog or other Kerberos v5 AFS token program - --with-krb5[=DIR] Location of Kerberos v5 headers and libraries - --with-krb5-include=DIR Location of Kerberos v5 headers - --with-krb5-lib=DIR Location of Kerberos v5 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 --with-libkafs=DIR Location of kafs headers and libraries --with-libkafs-include=DIR Location of kafs headers --with-libkafs-lib=DIR Location of kafs libraries --with-afs=DIR Location of AFS headers and libraries - --with-afs-include=DIR Location of Kerberos v5 headers - --with-afs-lib=DIR Location of Kerberos v5 libraries + --with-afs-include=DIR Location of AFS headers + --with-afs-lib=DIR Location of AFS libraries Some influential environment variables: CC C compiler command @@ -1440,12 +1483,13 @@ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor - KRB5_CONFIG Path to krb5-config + PATH_KRB5_CONFIG + Path to krb5-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to . +Report bugs to . _ACEOF ac_status=$? fi @@ -1508,10 +1552,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -pam-afs-session configure 2.5 -generated by GNU Autoconf 2.68 +pam-afs-session configure 2.6 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1667,9 +1711,9 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------- ## -## Report this to rra@stanford.edu ## -## ------------------------------- ##" +( $as_echo "## ------------------------------ ## +## Report this to eagle@eyrie.org ## +## ------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -1788,7 +1832,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -1891,7 +1935,8 @@ main () { static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1907,7 +1952,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1933,7 +1979,8 @@ main () { static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1949,7 +1996,8 @@ main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -1983,7 +2031,8 @@ main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2176,7 +2225,8 @@ main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; -test_array [0] = 0 +test_array [0] = 0; +return test_array [0]; ; return 0; @@ -2208,8 +2258,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by pam-afs-session $as_me 2.5, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by pam-afs-session $as_me 2.6, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2587,7 +2637,7 @@ -am__api_version='1.11' +am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2626,7 +2676,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -2684,9 +2734,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2697,32 +2744,40 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2734,6 +2789,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2744,8 +2809,8 @@ ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in @@ -2756,15 +2821,15 @@ esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi -if test x"${install_sh}" != xset; then +if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; @@ -2773,10 +2838,10 @@ esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -2795,7 +2860,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2835,7 +2900,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -2886,7 +2951,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -2915,12 +2980,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2939,7 +2998,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3008,11 +3067,38 @@ enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=1;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then @@ -3037,7 +3123,7 @@ # Define the identity of the package. PACKAGE='pam-afs-session' - VERSION='2.5' + VERSION='2.6' cat >>confdefs.h <<_ACEOF @@ -3065,17 +3151,70 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + -AMTAR=${AMTAR-"${am_missing_run}tar"} -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'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: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 @@ -3101,6 +3240,8 @@ + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -3123,7 +3264,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3163,7 +3304,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3216,7 +3357,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3257,7 +3398,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3315,7 +3456,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3359,7 +3500,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3805,8 +3946,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -3890,6 +4030,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3909,7 +4108,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# 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 @@ -3942,6 +4141,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3964,8 +4164,9 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -3999,16 +4200,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4017,16 +4218,16 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4235,7 +4436,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4301,7 +4502,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4508,8 +4709,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -# define __EXTENSIONS__ 1 - $ac_includes_default +# define __EXTENSIONS__ 1 + $ac_includes_default int main () { @@ -4539,21 +4740,60 @@ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h -if test "x$CC" != xcc; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 -$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 -$as_echo_n "checking whether cc understands -c and -o together... " >&6; } -fi -set dummy $CC; ac_cc=`$as_echo "$2" | - sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler is Clang" >&5 +$as_echo_n "checking if the compiler is Clang... " >&6; } +if ${rra_cv_prog_cc_clang+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ +#if ! __clang__ +#error +#endif + +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + rra_cv_prog_cc_clang=yes +else + rra_cv_prog_cc_clang=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_prog_cc_clang" >&5 +$as_echo "$rra_cv_prog_cc_clang" >&6; } + if test x"$rra_cv_prog_cc_clang" = xyes; then : + CLANG=yes +fi +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; int main () { @@ -4562,125 +4802,357 @@ return 0; } _ACEOF -# Make sure it works both with $CC and with simple cc. -# We do the test twice because some compilers refuse to overwrite an -# existing .o file with -o, though they will create one. -ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' -rm -f conftest2.* -if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; -then - eval ac_cv_prog_cc_${ac_cc}_c_o=yes - if test "x$CC" != xcc; then - # Test first that cc exists at all. - if { ac_try='cc -c conftest.$ac_ext >&5' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' - rm -f conftest2.* - if { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && - test -f conftest2.$ac_objext && { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; - then - # cc works too. - : - else - # cc exists but doesn't like -o. - eval ac_cv_prog_cc_${ac_cc}_c_o=no - fi + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 else - eval ac_cv_prog_cc_${ac_cc}_c_o=no + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break fi -rm -f core conftest* +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break fi -if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ -# FIXME: we rely on the cache variable name because -# there is no other way. -set dummy $CC -am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` -eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o -if test "$am_t" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break fi - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; esac +rm -rf conftest* + fi + + +fi + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar lib "link -lib" + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_prog_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +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_prog_AR="$ac_tool_prefix$ac_prog" + $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 + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 +$as_echo "$AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AR" && break + done +fi +if test -z "$AR"; then + ac_ct_AR=$AR + for ac_prog in ar lib "link -lib" +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_prog_ac_ct_AR+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +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_prog_ac_ct_AR="$ac_prog" + $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 + +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 +$as_echo "$ac_ct_AR" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_AR" && break +done + + if test "x$ac_ct_AR" = x; then + AR="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AR=$ac_ct_AR + fi +fi + +: ${AR=ar} + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 +$as_echo_n "checking the archiver ($AR) interface... " >&6; } +if ${am_cv_ar_interface+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + am_cv_ar_interface=ar + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +int some_variable = 0; +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=ar + else + am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 + (eval $am_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + am_cv_ar_interface=lib + else + am_cv_ar_interface=unknown + fi + fi + rm -f conftest.lib libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 +$as_echo "$am_cv_ar_interface" >&6; } + +case $am_cv_ar_interface in +ar) + ;; +lib) + # Microsoft lib, so override with the ar-lib wrapper script. + # FIXME: It is wrong to rewrite AR. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__AR in this case, + # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something + # similar. + AR="$am_aux_dir/ar-lib $AR" + ;; +unknown) + as_fn_error $? "could not determine $AR interface" "$LINENO" 5 + ;; +esac + + +case `pwd` in + *\ * | *\ *) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 +$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; +esac + + + +macro_version='2.4.2' +macro_revision='1.3337' + + + - -macro_version='2.4' -macro_revision='1.3293' - - - - - @@ -4853,7 +5325,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -4932,7 +5404,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5188,7 +5660,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5232,7 +5704,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5390,6 +5862,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -5416,7 +5893,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -5429,7 +5907,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -5651,7 +6129,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5691,7 +6169,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5817,10 +6295,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -5858,8 +6332,8 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -5997,7 +6471,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6037,7 +6511,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6140,7 +6614,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6184,7 +6658,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6309,7 +6783,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6349,7 +6823,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6408,7 +6882,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6448,7 +6922,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6498,13 +6972,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -6651,6 +7125,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -6939,7 +7414,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -6955,9 +7430,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6976,7 +7461,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -7039,7 +7527,7 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -7050,7 +7538,20 @@ case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -7083,7 +7584,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7123,7 +7624,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7203,7 +7704,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7243,7 +7744,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7295,7 +7796,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7335,7 +7836,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7387,7 +7888,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7427,7 +7928,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7479,7 +7980,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7519,7 +8020,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7571,7 +8072,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7611,7 +8112,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7690,7 +8191,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -7701,6 +8208,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -7733,6 +8241,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -7754,7 +8263,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -7891,7 +8402,22 @@ # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -7969,6 +8495,10 @@ + + + + test -z "$LN_S" && LN_S="ln -s" @@ -8428,7 +8958,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -8472,7 +9004,7 @@ lt_prog_compiler_static='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -8519,18 +9051,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -8892,7 +9439,6 @@ hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -9145,8 +9691,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -9526,6 +10071,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -9571,6 +10117,7 @@ hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -9599,10 +10146,6 @@ hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -9615,7 +10158,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -9654,7 +10197,6 @@ fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -10278,11 +10820,6 @@ - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -10372,7 +10909,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -10381,7 +10918,7 @@ ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -10446,7 +10983,7 @@ ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -10585,7 +11122,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -10593,10 +11130,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -10604,7 +11137,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -10622,7 +11155,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -10641,19 +11174,8 @@ esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -10714,7 +11236,7 @@ ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -10730,7 +11252,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -10767,9 +11289,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10863,7 +11385,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -10932,7 +11454,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -10957,7 +11479,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -10981,7 +11503,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -11012,7 +11534,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -11022,7 +11544,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -11804,6 +12326,8 @@ + + ac_config_commands="$ac_config_commands libtool" @@ -12058,7 +12582,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_header_pam_const" >&5 $as_echo "$rra_cv_header_pam_const" >&6; } -if test x"$rra_cv_header_pam_const" = xyes; then : + if test x"$rra_cv_header_pam_const" = xyes; then : rra_header_pam_const=const else rra_header_pam_const= @@ -12068,6 +12592,41 @@ #define PAM_CONST $rra_header_pam_const _ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror uses const" >&5 +$as_echo_n "checking whether pam_strerror uses const... " >&6; } +if ${rra_cv_header_pam_strerror_const+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef HAVE_SECURITY_PAM_APPL_H +# include +#else +# include +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "pam_strerror *\(const" >/dev/null 2>&1; then : + rra_cv_header_pam_strerror_const=yes +else + rra_cv_header_pam_strerror_const=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_header_pam_strerror_const" >&5 +$as_echo "$rra_cv_header_pam_strerror_const" >&6; } + if test x"$rra_cv_header_pam_strerror_const" = xyes; then : + rra_header_pam_strerror_const=const +else + rra_header_pam_strerror_const= +fi + +cat >>confdefs.h <<_ACEOF +#define PAM_STRERROR_CONST $rra_header_pam_strerror_const +_ACEOF + $as_echo "#define MODULE_NAME \"pam_afs_session\"" >>confdefs.h @@ -12100,7 +12659,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PATH_AKLOG="$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 @@ -12188,24 +12747,63 @@ rra_lib_arch_name=lib64 fi fi -rra_krb5_root= - rra_krb5_libdir= - rra_krb5_includedir= - rra_use_kerberos= - - - - -# Check whether --with-krb5 was given. + # 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= + rra_use_KRB5= + + +# Check whether --with-krb5 was given. if test "${with_krb5+set}" = set; then : withval=$with_krb5; if test x"$withval" = xno; then : - rra_use_kerberos=false + rra_use_KRB5=false else if test x"$withval" != xyes; then : rra_krb5_root="$withval" fi - rra_use_kerberos=true + rra_use_KRB5=true fi fi @@ -12226,9 +12824,21 @@ fi - if test x"$rra_use_kerberos" != xfalse; then : - if test x"$rra_use_kerberos" = xtrue; then : + if test x"$rra_use_KRB5" != xfalse; then : + if test x"$rra_use_KRB5" = xtrue; then : + + rra_krb5_incroot= + + + + if test x"$rra_krb5_includedir" != x; then : + rra_krb5_incroot="$rra_krb5_includedir" +else + if test x"$rra_krb5_root" != x; then : + rra_krb5_incroot="${rra_krb5_root}/include" +fi +fi if test x"$rra_reduced_depends" = xtrue; then : if test x"$rra_krb5_libdir" != x; then : KRB5_LDFLAGS="-L$rra_krb5_libdir" @@ -12306,11 +12916,69 @@ KRB5_LIBS="-lkrb5" else if test x"true" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 fi fi 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi 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" @@ -12390,7 +13058,15 @@ 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -12441,21 +13117,57 @@ if test "x$ac_cv_lib_com_err_com_err" = xyes; then : KRB5_LIBS="$KRB5_LIBS -lcom_err" else + if test x"true" = xtrue; then : as_fn_error $? "cannot find usable com_err library" "$LINENO" 5 +else + KRB5_LIBS="" +fi fi - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi fi @@ -12471,77 +13183,66 @@ 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 : - if test x"$rra_krb5_root" != x && test -z "$KRB5_CONFIG"; then : - if test -x "${rra_krb5_root}/bin/krb5-config"; then : - KRB5_CONFIG="${rra_krb5_root}/bin/krb5-config" -fi + 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 - # 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_KRB5_CONFIG+:} false; then : + 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 +$as_echo_n "checking for krb5 support in krb5-config... " >&6; } +if ${rra_cv_lib_KRB5_config+:} false; then : $as_echo_n "(cached) " >&6 else - case $KRB5_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KRB5_CONFIG="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_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 -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG -if test -n "$KRB5_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5 -$as_echo "$KRB5_CONFIG" >&6; } + if "$rra_krb5_config_KRB5" 2>&1 | grep krb5 >/dev/null 2>&1; then : + rra_cv_lib_KRB5_config=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + rra_cv_lib_KRB5_config=no fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_lib_KRB5_config" >&5 +$as_echo "$rra_cv_lib_KRB5_config" >&6; } + if test "$rra_cv_lib_KRB5_config" = yes; then : + KRB5_CPPFLAGS=`"$rra_krb5_config_KRB5" --cflags krb5 2>/dev/null` -fi - if test x"$KRB5_CONFIG" != x && test -x "$KRB5_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5 support in krb5-config" >&5 -$as_echo_n "checking for krb5 support in krb5-config... " >&6; } -if ${rra_cv_lib_krb5_config+:} false; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --deps support in krb5-config" >&5 +$as_echo_n "checking for --deps support in krb5-config... " >&6; } +if ${rra_cv_krb5_config_deps+:} false; then : $as_echo_n "(cached) " >&6 else - if "$KRB5_CONFIG" 2>&1 | grep krb5 >/dev/null 2>&1; then : - rra_cv_lib_krb5_config=yes + if "$rra_krb5_config_KRB5" 2>&1 | grep deps >/dev/null 2>&1; then : + rra_cv_krb5_config_deps=yes else - rra_cv_lib_krb5_config=no + rra_cv_krb5_config_deps=no +fi fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_krb5_config_deps" >&5 +$as_echo "$rra_cv_krb5_config_deps" >&6; } + if test x"$rra_reduced_depends" = xfalse \ + && test x"$rra_cv_krb5_config_deps" = xyes; then : + KRB5_LIBS=`"$rra_krb5_config_KRB5" --deps --libs krb5 2>/dev/null` +else + KRB5_LIBS=`"$rra_krb5_config_KRB5" --libs krb5 2>/dev/null` fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_lib_krb5_config" >&5 -$as_echo "$rra_cv_lib_krb5_config" >&6; } - if test x"$rra_cv_lib_krb5_config" = xyes; then : - KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags krb5 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs krb5 2>/dev/null` + rra_krb5_config_KRB5_ok=yes else - KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs 2>/dev/null` + if test x"krb5" = xkrb5; then : + KRB5_CPPFLAGS=`"$rra_krb5_config_KRB5" --cflags 2>/dev/null` + KRB5_LIBS=`"$rra_krb5_config_KRB5" --libs krb5 2>/dev/null` + rra_krb5_config_KRB5_ok=yes +fi fi - KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include ?%%'` - rra_krb5_save_CPPFLAGS="$CPPFLAGS" +fi + if test x"$rra_krb5_config_KRB5_ok" = xyes; then : + KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include %%'` + KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include$%%'` + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" @@ -12918,9 +13619,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rk_simple_execve" >&5 -$as_echo_n "checking for library containing rk_simple_execve... " >&6; } -if ${ac_cv_search_rk_simple_execve+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -12933,11 +13634,11 @@ #ifdef __cplusplus extern "C" #endif -char rk_simple_execve (); +char roken_concat (); int main () { -return rk_simple_execve (); +return roken_concat (); ; return 0; } @@ -12950,25 +13651,25 @@ LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_rk_simple_execve=$ac_res + ac_cv_search_roken_concat=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_rk_simple_execve+:} false; then : + if ${ac_cv_search_roken_concat+:} false; then : break fi done -if ${ac_cv_search_rk_simple_execve+:} false; then : +if ${ac_cv_search_roken_concat+:} false; then : else - ac_cv_search_rk_simple_execve=no + ac_cv_search_roken_concat=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rk_simple_execve" >&5 -$as_echo "$ac_cv_search_rk_simple_execve" >&6; } -ac_res=$ac_cv_search_rk_simple_execve +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -13377,13 +14078,71 @@ KRB5_LIBS="-lkrb5 $rra_krb5_extra" else if test x"true" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 fi fi fi 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi 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" @@ -13430,7 +14189,15 @@ _ACEOF 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -13442,18 +14209,50 @@ done else - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi done @@ -13471,43 +14270,101 @@ LIBS="$rra_krb5_save_LIBS" fi - rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" LIBS="$KRB5_LIBS $LIBS" - 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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_MESSAGE 1 -_ACEOF - for ac_func in krb5_free_error_message + if test x"$rra_krb5_incroot" = x; then : + for ac_header in krb5.h kerberosv5/krb5.h krb5/krb5.h do : - ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" -if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + 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 HAVE_KRB5_FREE_ERROR_MESSAGE 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done else - for ac_func in krb5_get_error_string -do : - ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" -if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_STRING 1 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - for ac_func in krb5_get_err_txt -do : - ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi + 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 : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +_ACEOF + for ac_func in krb5_free_error_message +do : + ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" +if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +_ACEOF + +fi +done + +else + for ac_func in krb5_get_error_string +do : + ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" +if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_STRING 1 +_ACEOF + +else + for ac_func in krb5_get_err_txt +do : + ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KRB5_GET_ERR_TXT 1 @@ -13523,7 +14380,15 @@ _ACEOF 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -13535,18 +14400,50 @@ done else - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi done @@ -13559,7 +14456,7 @@ fi done - CPPFLAGS="$rra_krb5_save_CPPFLAGS" + CPPFLAGS="$rra_krb5_save_CPPFLAGS" LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" else @@ -13593,7 +14490,7 @@ fi fi fi - rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" @@ -13923,9 +14820,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rk_simple_execve" >&5 -$as_echo_n "checking for library containing rk_simple_execve... " >&6; } -if ${ac_cv_search_rk_simple_execve+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -13938,11 +14835,11 @@ #ifdef __cplusplus extern "C" #endif -char rk_simple_execve (); +char roken_concat (); int main () { -return rk_simple_execve (); +return roken_concat (); ; return 0; } @@ -13955,25 +14852,25 @@ LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_rk_simple_execve=$ac_res + ac_cv_search_roken_concat=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_rk_simple_execve+:} false; then : + if ${ac_cv_search_roken_concat+:} false; then : break fi done -if ${ac_cv_search_rk_simple_execve+:} false; then : +if ${ac_cv_search_roken_concat+:} false; then : else - ac_cv_search_rk_simple_execve=no + ac_cv_search_roken_concat=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rk_simple_execve" >&5 -$as_echo "$ac_cv_search_rk_simple_execve" >&6; } -ac_res=$ac_cv_search_rk_simple_execve +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -14382,13 +15279,71 @@ KRB5_LIBS="-lkrb5 $rra_krb5_extra" else if test x"true" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 fi fi fi 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi 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" @@ -14435,7 +15390,15 @@ _ACEOF 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -14447,18 +15410,50 @@ done else - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi done @@ -14475,24 +15470,7 @@ LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" fi -fi - rra_krb5_uses_com_err=false - case "$LIBS" in - *-lcom_err*) - rra_krb5_uses_com_err=true - ;; - esac - if test x"$rra_krb5_uses_com_err" = xtrue; then - KRB5_USES_COM_ERR_TRUE= - KRB5_USES_COM_ERR_FALSE='#' -else - KRB5_USES_COM_ERR_TRUE='#' - KRB5_USES_COM_ERR_FALSE= -fi - else - - if test x"$rra_reduced_depends" = xtrue; then : if test x"$rra_krb5_libdir" != x; then : KRB5_LDFLAGS="-L$rra_krb5_libdir" else @@ -14523,19 +15501,20 @@ fi fi fi - rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" LIBS="$KRB5_LIBS $LIBS" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 -$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } -if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : + rra_krb5_extra= + LIBS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_search" >&5 +$as_echo_n "checking for library containing res_search... " >&6; } +if ${ac_cv_search_res_search+:} false; then : $as_echo_n "(cached) " >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lkrb5 $LIBS" + ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14545,79 +15524,2200 @@ #ifdef __cplusplus extern "C" #endif -char krb5_init_context (); +char res_search (); int main () { -return krb5_init_context (); +return res_search (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_krb5_krb5_init_context=yes -else - ac_cv_lib_krb5_krb5_init_context=no +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_res_search=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS + conftest$ac_exeext + if ${ac_cv_search_res_search+:} false; then : + break fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 -$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" +done +if ${ac_cv_search_res_search+:} false; then : + else - if test x"false" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 -fi + ac_cv_search_res_search=no fi - - LIBS="$KRB5_LIBS $LIBS" - 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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_MESSAGE 1 -_ACEOF - for ac_func in krb5_free_error_message -do : - ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" -if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 -_ACEOF - +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -done +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_search" >&5 +$as_echo "$ac_cv_search_res_search" >&6; } +ac_res=$ac_cv_search_res_search +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else - for ac_func in krb5_get_error_string -do : - ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" -if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_STRING 1 -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_search" >&5 +$as_echo_n "checking for library containing __res_search... " >&6; } +if ${ac_cv_search___res_search+:} false; then : + $as_echo_n "(cached) " >&6 else - for ac_func in krb5_get_err_txt -do : - ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" -if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERR_TXT 1 -_ACEOF + ac_func_search_save_LIBS=$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 __res_search (); +int +main () +{ +return __res_search (); + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search___res_search=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search___res_search+:} false; then : + break +fi +done +if ${ac_cv_search___res_search+:} false; then : + +else + ac_cv_search___res_search=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_search" >&5 +$as_echo "$ac_cv_search___res_search" >&6; } +ac_res=$ac_cv_search___res_search +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnsl" >&5 +$as_echo_n "checking for socket in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl -lsocket $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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_socket=yes +else + ac_cv_lib_nsl_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_socket" >&5 +$as_echo "$ac_cv_lib_nsl_socket" >&6; } +if test "x$ac_cv_lib_nsl_socket" = xyes; then : + LIBS="-lnsl -lsocket $LIBS" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 +$as_echo_n "checking for library containing crypt... " >&6; } +if ${ac_cv_search_crypt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 crypt (); +int +main () +{ +return crypt (); + ; + return 0; +} +_ACEOF +for ac_lib in '' crypt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_crypt=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_crypt+:} false; then : + break +fi +done +if ${ac_cv_search_crypt+:} false; then : + +else + ac_cv_search_crypt=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 +$as_echo "$ac_cv_search_crypt" >&6; } +ac_res=$ac_cv_search_crypt +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 roken_concat (); +int +main () +{ +return roken_concat (); + ; + return 0; +} +_ACEOF +for ac_lib in '' roken; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_roken_concat=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_roken_concat+:} false; then : + break +fi +done +if ${ac_cv_search_roken_concat+:} false; then : + +else + ac_cv_search_roken_concat=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + rra_krb5_extra="$LIBS" + LIBS="$rra_krb5_save_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 +$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } +if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 -lasn1 -lcom_err -lcrypto $rra_krb5_extra $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 krb5_init_context (); +int +main () +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_init_context=yes +else + ac_cv_lib_krb5_krb5_init_context=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 +$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 -lasn1 -lcom_err -lcrypto $rra_krb5_extra" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_getspecific in -lkrb5support" >&5 +$as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; } +if ${ac_cv_lib_krb5support_krb5int_getspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5support $rra_krb5_extra $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 krb5int_getspecific (); +int +main () +{ +return krb5int_getspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5support_krb5int_getspecific=yes +else + ac_cv_lib_krb5support_krb5int_getspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5 +$as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; } +if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = xyes; then : + rra_krb5_extra="-lkrb5support $rra_krb5_extra" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setspecific in -lpthreads" >&5 +$as_echo_n "checking for pthread_setspecific in -lpthreads... " >&6; } +if ${ac_cv_lib_pthreads_pthread_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreads $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 pthread_setspecific (); +int +main () +{ +return pthread_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthreads_pthread_setspecific=yes +else + ac_cv_lib_pthreads_pthread_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_setspecific" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_setspecific" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_setspecific" = xyes; then : + rra_krb5_pthread="-lpthreads" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setspecific in -lpthread" >&5 +$as_echo_n "checking for pthread_setspecific in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $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 pthread_setspecific (); +int +main () +{ +return pthread_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_setspecific=yes +else + ac_cv_lib_pthread_pthread_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_setspecific" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_setspecific" >&6; } +if test "x$ac_cv_lib_pthread_pthread_setspecific" = xyes; then : + rra_krb5_pthread="-lpthread" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_setspecific in -lkrb5support" >&5 +$as_echo_n "checking for krb5int_setspecific in -lkrb5support... " >&6; } +if ${ac_cv_lib_krb5support_krb5int_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5support $rra_krb5_pthread $rra_krb5_extra $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 krb5int_setspecific (); +int +main () +{ +return krb5int_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5support_krb5int_setspecific=yes +else + ac_cv_lib_krb5support_krb5int_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5support_krb5int_setspecific" >&5 +$as_echo "$ac_cv_lib_krb5support_krb5int_setspecific" >&6; } +if test "x$ac_cv_lib_krb5support_krb5int_setspecific" = xyes; then : + rra_krb5_extra="-lkrb5support $rra_krb5_extra $rra_krb5_pthread" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_message in -lcom_err" >&5 +$as_echo_n "checking for error_message in -lcom_err... " >&6; } +if ${ac_cv_lib_com_err_error_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $rra_krb5_extra $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 error_message (); +int +main () +{ +return error_message (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_com_err_error_message=yes +else + ac_cv_lib_com_err_error_message=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_error_message" >&5 +$as_echo "$ac_cv_lib_com_err_error_message" >&6; } +if test "x$ac_cv_lib_com_err_error_message" = xyes; then : + rra_krb5_extra="-lcom_err $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_svc_get_msg in -lksvc" >&5 +$as_echo_n "checking for krb5_svc_get_msg in -lksvc... " >&6; } +if ${ac_cv_lib_ksvc_krb5_svc_get_msg+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lksvc $rra_krb5_extra $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 krb5_svc_get_msg (); +int +main () +{ +return krb5_svc_get_msg (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ksvc_krb5_svc_get_msg=yes +else + ac_cv_lib_ksvc_krb5_svc_get_msg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ksvc_krb5_svc_get_msg" >&5 +$as_echo "$ac_cv_lib_ksvc_krb5_svc_get_msg" >&6; } +if test "x$ac_cv_lib_ksvc_krb5_svc_get_msg" = xyes; then : + rra_krb5_extra="-lksvc $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_hash_md5 in -lk5crypto" >&5 +$as_echo_n "checking for krb5int_hash_md5 in -lk5crypto... " >&6; } +if ${ac_cv_lib_k5crypto_krb5int_hash_md5+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5crypto $rra_krb5_extra $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 krb5int_hash_md5 (); +int +main () +{ +return krb5int_hash_md5 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5crypto_krb5int_hash_md5=yes +else + ac_cv_lib_k5crypto_krb5int_hash_md5=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_krb5int_hash_md5" >&5 +$as_echo "$ac_cv_lib_k5crypto_krb5int_hash_md5" >&6; } +if test "x$ac_cv_lib_k5crypto_krb5int_hash_md5" = xyes; then : + rra_krb5_extra="-lk5crypto $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for profile_get_values in -lk5profile" >&5 +$as_echo_n "checking for profile_get_values in -lk5profile... " >&6; } +if ${ac_cv_lib_k5profile_profile_get_values+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5profile $rra_krb5_extra $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 profile_get_values (); +int +main () +{ +return profile_get_values (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5profile_profile_get_values=yes +else + ac_cv_lib_k5profile_profile_get_values=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5profile_profile_get_values" >&5 +$as_echo "$ac_cv_lib_k5profile_profile_get_values" >&6; } +if test "x$ac_cv_lib_k5profile_profile_get_values" = xyes; then : + rra_krb5_extra="-lk5profile $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_cc_default in -lkrb5" >&5 +$as_echo_n "checking for krb5_cc_default in -lkrb5... " >&6; } +if ${ac_cv_lib_krb5_krb5_cc_default+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 $rra_krb5_extra $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 krb5_cc_default (); +int +main () +{ +return krb5_cc_default (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_cc_default=yes +else + ac_cv_lib_krb5_krb5_cc_default=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_cc_default" >&5 +$as_echo "$ac_cv_lib_krb5_krb5_cc_default" >&6; } +if test "x$ac_cv_lib_krb5_krb5_cc_default" = xyes; then : + KRB5_LIBS="-lkrb5 $rra_krb5_extra" +else + if test x"true" = xtrue; then : + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 +fi +fi + +fi + + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi + 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 : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +_ACEOF + for ac_func in krb5_free_error_message +do : + ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" +if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +_ACEOF + +fi +done + +else + for ac_func in krb5_get_error_string +do : + ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" +if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_STRING 1 +_ACEOF + +else + for ac_func in krb5_get_err_txt +do : + ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" +if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERR_TXT 1 +_ACEOF + +else + for ac_func in krb5_svc_get_msg +do : + ac_fn_c_check_func "$LINENO" "krb5_svc_get_msg" "ac_cv_func_krb5_svc_get_msg" +if test "x$ac_cv_func_krb5_svc_get_msg" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_SVC_GET_MSG 1 +_ACEOF + 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 +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + +" +if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IBM_SVC_KRB5_SVC_H 1 +_ACEOF + +fi + +done + +else + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +fi +done + +fi +done + +fi +done + +fi +done + + CPPFLAGS="$rra_krb5_save_CPPFLAGS" + LDFLAGS="$rra_krb5_save_LDFLAGS" + LIBS="$rra_krb5_save_LIBS" +fi +fi + rra_krb5_uses_com_err=false + case $KRB5_LIBS in #( + *-lcom_err*) : + rra_krb5_uses_com_err=true ;; #( + *) : + ;; +esac + if test x"$rra_krb5_uses_com_err" = xtrue; then + KRB5_USES_COM_ERR_TRUE= + KRB5_USES_COM_ERR_FALSE='#' +else + KRB5_USES_COM_ERR_TRUE='#' + KRB5_USES_COM_ERR_FALSE= +fi + + KRB5_CPPFLAGS_GCC=`echo "$KRB5_CPPFLAGS" | sed -e 's/-I/-isystem /g'` +else + + rra_krb5_incroot= + + + + + if test x"$rra_krb5_includedir" != x; then : + rra_krb5_incroot="$rra_krb5_includedir" +else + if test x"$rra_krb5_root" != x; then : + rra_krb5_incroot="${rra_krb5_root}/include" +fi +fi + if test x"$rra_reduced_depends" = xtrue; then : + if test x"$rra_krb5_libdir" != x; then : + KRB5_LDFLAGS="-L$rra_krb5_libdir" +else + if test x"$rra_krb5_root" != x; then : + + if test -d "$rra_krb5_root/$rra_lib_arch_name"; then : + if test x"" = x; then : + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/${rra_lib_arch_name}" +else + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/${rra_lib_arch_name}/" +fi +else + if test x"" = x; then : + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/lib" +else + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/lib/" +fi +fi + KRB5_LDFLAGS=`echo "$KRB5_LDFLAGS" | sed -e 's/^ *//'` +fi +fi + if test x"$rra_krb5_includedir" != x; then : + KRB5_CPPFLAGS="-I$rra_krb5_includedir" +else + if test x"$rra_krb5_root" != x; then : + if test x"$rra_krb5_root" != x/usr; then : + KRB5_CPPFLAGS="-I${rra_krb5_root}/include" +fi +fi +fi + rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_LDFLAGS="$LDFLAGS" + rra_krb5_save_LIBS="$LIBS" + CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" + LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" + LIBS="$KRB5_LIBS $LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 +$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } +if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 $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 krb5_init_context (); +int +main () +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_init_context=yes +else + ac_cv_lib_krb5_krb5_init_context=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 +$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"false" = 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 : + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi + 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 : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +_ACEOF + for ac_func in krb5_free_error_message +do : + ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" +if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +_ACEOF + +fi +done + +else + for ac_func in krb5_get_error_string +do : + ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" +if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_STRING 1 +_ACEOF + +else + for ac_func in krb5_get_err_txt +do : + ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" +if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERR_TXT 1 +_ACEOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_svc_get_msg in -lksvc" >&5 +$as_echo_n "checking for krb5_svc_get_msg in -lksvc... " >&6; } +if ${ac_cv_lib_ksvc_krb5_svc_get_msg+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lksvc $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 krb5_svc_get_msg (); +int +main () +{ +return krb5_svc_get_msg (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ksvc_krb5_svc_get_msg=yes +else + ac_cv_lib_ksvc_krb5_svc_get_msg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ksvc_krb5_svc_get_msg" >&5 +$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 + + 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 +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + +" +if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IBM_SVC_KRB5_SVC_H 1 +_ACEOF + +fi + +done + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 +$as_echo_n "checking for com_err in -lcom_err... " >&6; } +if ${ac_cv_lib_com_err_com_err+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $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 com_err (); +int +main () +{ +return com_err (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_com_err_com_err=yes +else + ac_cv_lib_com_err_com_err=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 +$as_echo "$ac_cv_lib_com_err_com_err" >&6; } +if test "x$ac_cv_lib_com_err_com_err" = xyes; then : + KRB5_LIBS="$KRB5_LIBS -lcom_err" +else + if test x"false" = xtrue; then : + as_fn_error $? "cannot find usable com_err library" "$LINENO" 5 +else + KRB5_LIBS="" +fi +fi + + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +fi + +fi +done + +fi +done + +fi +done + + 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_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" +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 +$as_echo_n "checking for krb5 support in krb5-config... " >&6; } +if ${rra_cv_lib_KRB5_config+:} false; then : + $as_echo_n "(cached) " >&6 +else + if "$rra_krb5_config_KRB5" 2>&1 | grep krb5 >/dev/null 2>&1; then : + rra_cv_lib_KRB5_config=yes +else + rra_cv_lib_KRB5_config=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_lib_KRB5_config" >&5 +$as_echo "$rra_cv_lib_KRB5_config" >&6; } + if test "$rra_cv_lib_KRB5_config" = yes; then : + KRB5_CPPFLAGS=`"$rra_krb5_config_KRB5" --cflags krb5 2>/dev/null` + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --deps support in krb5-config" >&5 +$as_echo_n "checking for --deps support in krb5-config... " >&6; } +if ${rra_cv_krb5_config_deps+:} false; then : + $as_echo_n "(cached) " >&6 +else + if "$rra_krb5_config_KRB5" 2>&1 | grep deps >/dev/null 2>&1; then : + rra_cv_krb5_config_deps=yes +else + rra_cv_krb5_config_deps=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_krb5_config_deps" >&5 +$as_echo "$rra_cv_krb5_config_deps" >&6; } + if test x"$rra_reduced_depends" = xfalse \ + && test x"$rra_cv_krb5_config_deps" = xyes; then : + KRB5_LIBS=`"$rra_krb5_config_KRB5" --deps --libs krb5 2>/dev/null` +else + KRB5_LIBS=`"$rra_krb5_config_KRB5" --libs krb5 2>/dev/null` +fi + rra_krb5_config_KRB5_ok=yes +else + if test x"krb5" = xkrb5; then : + KRB5_CPPFLAGS=`"$rra_krb5_config_KRB5" --cflags 2>/dev/null` + KRB5_LIBS=`"$rra_krb5_config_KRB5" --libs krb5 2>/dev/null` + rra_krb5_config_KRB5_ok=yes +fi +fi +fi + if test x"$rra_krb5_config_KRB5_ok" = xyes; then : + KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include %%'` + KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include$%%'` + rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_LDFLAGS="$LDFLAGS" + rra_krb5_save_LIBS="$LIBS" + CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" + LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" + LIBS="$KRB5_LIBS $LIBS" + ac_fn_c_check_func "$LINENO" "krb5_init_context" "ac_cv_func_krb5_init_context" +if test "x$ac_cv_func_krb5_init_context" = xyes; then : + CPPFLAGS="$rra_krb5_save_CPPFLAGS" + LDFLAGS="$rra_krb5_save_LDFLAGS" + LIBS="$rra_krb5_save_LIBS" +else + CPPFLAGS="$rra_krb5_save_CPPFLAGS" + LDFLAGS="$rra_krb5_save_LDFLAGS" + LIBS="$rra_krb5_save_LIBS" + KRB5_CPPFLAGS= + KRB5_LIBS= + if test x"$rra_krb5_libdir" != x; then : + KRB5_LDFLAGS="-L$rra_krb5_libdir" +else + if test x"$rra_krb5_root" != x; then : + + if test -d "$rra_krb5_root/$rra_lib_arch_name"; then : + if test x"" = x; then : + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/${rra_lib_arch_name}" +else + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/${rra_lib_arch_name}/" +fi +else + if test x"" = x; then : + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/lib" +else + KRB5_LDFLAGS="$KRB5_LDFLAGS -L$rra_krb5_root/lib/" +fi +fi + KRB5_LDFLAGS=`echo "$KRB5_LDFLAGS" | sed -e 's/^ *//'` +fi +fi + if test x"$rra_krb5_includedir" != x; then : + KRB5_CPPFLAGS="-I$rra_krb5_includedir" +else + if test x"$rra_krb5_root" != x; then : + if test x"$rra_krb5_root" != x/usr; then : + KRB5_CPPFLAGS="-I${rra_krb5_root}/include" +fi +fi +fi + rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_LDFLAGS="$LDFLAGS" + rra_krb5_save_LIBS="$LIBS" + CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" + LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" + LIBS="$KRB5_LIBS $LIBS" + rra_krb5_extra= + LIBS= + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_search" >&5 +$as_echo_n "checking for library containing res_search... " >&6; } +if ${ac_cv_search_res_search+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 res_search (); +int +main () +{ +return res_search (); + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_res_search=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_res_search+:} false; then : + break +fi +done +if ${ac_cv_search_res_search+:} false; then : + +else + ac_cv_search_res_search=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_search" >&5 +$as_echo "$ac_cv_search_res_search" >&6; } +ac_res=$ac_cv_search_res_search +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing __res_search" >&5 +$as_echo_n "checking for library containing __res_search... " >&6; } +if ${ac_cv_search___res_search+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 __res_search (); +int +main () +{ +return __res_search (); + ; + return 0; +} +_ACEOF +for ac_lib in '' resolv; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search___res_search=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search___res_search+:} false; then : + break +fi +done +if ${ac_cv_search___res_search+:} false; then : + +else + ac_cv_search___res_search=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search___res_search" >&5 +$as_echo "$ac_cv_search___res_search" >&6; } +ac_res=$ac_cv_search___res_search +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } +if ${ac_cv_search_gethostbyname+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 gethostbyname (); +int +main () +{ +return gethostbyname (); + ; + return 0; +} +_ACEOF +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_gethostbyname=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_gethostbyname+:} false; then : + break +fi +done +if ${ac_cv_search_gethostbyname+:} false; then : + +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } +if ${ac_cv_search_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_socket=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_socket+:} false; then : + break +fi +done +if ${ac_cv_search_socket+:} false; then : + +else + ac_cv_search_socket=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnsl" >&5 +$as_echo_n "checking for socket in -lnsl... " >&6; } +if ${ac_cv_lib_nsl_socket+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl -lsocket $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 socket (); +int +main () +{ +return socket (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_nsl_socket=yes +else + ac_cv_lib_nsl_socket=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_socket" >&5 +$as_echo "$ac_cv_lib_nsl_socket" >&6; } +if test "x$ac_cv_lib_nsl_socket" = xyes; then : + LIBS="-lnsl -lsocket $LIBS" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing crypt" >&5 +$as_echo_n "checking for library containing crypt... " >&6; } +if ${ac_cv_search_crypt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 crypt (); +int +main () +{ +return crypt (); + ; + return 0; +} +_ACEOF +for ac_lib in '' crypt; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_crypt=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_crypt+:} false; then : + break +fi +done +if ${ac_cv_search_crypt+:} false; then : + +else + ac_cv_search_crypt=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt" >&5 +$as_echo "$ac_cv_search_crypt" >&6; } +ac_res=$ac_cv_search_crypt +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$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 roken_concat (); +int +main () +{ +return roken_concat (); + ; + return 0; +} +_ACEOF +for ac_lib in '' roken; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_roken_concat=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_roken_concat+:} false; then : + break +fi +done +if ${ac_cv_search_roken_concat+:} false; then : + +else + ac_cv_search_roken_concat=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + rra_krb5_extra="$LIBS" + LIBS="$rra_krb5_save_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_init_context in -lkrb5" >&5 +$as_echo_n "checking for krb5_init_context in -lkrb5... " >&6; } +if ${ac_cv_lib_krb5_krb5_init_context+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5 -lasn1 -lcom_err -lcrypto $rra_krb5_extra $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 krb5_init_context (); +int +main () +{ +return krb5_init_context (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_init_context=yes +else + ac_cv_lib_krb5_krb5_init_context=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_init_context" >&5 +$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 -lasn1 -lcom_err -lcrypto $rra_krb5_extra" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_getspecific in -lkrb5support" >&5 +$as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; } +if ${ac_cv_lib_krb5support_krb5int_getspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5support $rra_krb5_extra $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 krb5int_getspecific (); +int +main () +{ +return krb5int_getspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5support_krb5int_getspecific=yes +else + ac_cv_lib_krb5support_krb5int_getspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5support_krb5int_getspecific" >&5 +$as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; } +if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = xyes; then : + rra_krb5_extra="-lkrb5support $rra_krb5_extra" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setspecific in -lpthreads" >&5 +$as_echo_n "checking for pthread_setspecific in -lpthreads... " >&6; } +if ${ac_cv_lib_pthreads_pthread_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthreads $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 pthread_setspecific (); +int +main () +{ +return pthread_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthreads_pthread_setspecific=yes +else + ac_cv_lib_pthreads_pthread_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_setspecific" >&5 +$as_echo "$ac_cv_lib_pthreads_pthread_setspecific" >&6; } +if test "x$ac_cv_lib_pthreads_pthread_setspecific" = xyes; then : + rra_krb5_pthread="-lpthreads" +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setspecific in -lpthread" >&5 +$as_echo_n "checking for pthread_setspecific in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lpthread $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 pthread_setspecific (); +int +main () +{ +return pthread_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_pthread_pthread_setspecific=yes +else + ac_cv_lib_pthread_pthread_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_setspecific" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_setspecific" >&6; } +if test "x$ac_cv_lib_pthread_pthread_setspecific" = xyes; then : + rra_krb5_pthread="-lpthread" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_setspecific in -lkrb5support" >&5 +$as_echo_n "checking for krb5int_setspecific in -lkrb5support... " >&6; } +if ${ac_cv_lib_krb5support_krb5int_setspecific+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb5support $rra_krb5_pthread $rra_krb5_extra $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 krb5int_setspecific (); +int +main () +{ +return krb5int_setspecific (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5support_krb5int_setspecific=yes +else + ac_cv_lib_krb5support_krb5int_setspecific=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5support_krb5int_setspecific" >&5 +$as_echo "$ac_cv_lib_krb5support_krb5int_setspecific" >&6; } +if test "x$ac_cv_lib_krb5support_krb5int_setspecific" = xyes; then : + rra_krb5_extra="-lkrb5support $rra_krb5_extra $rra_krb5_pthread" +fi + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_message in -lcom_err" >&5 +$as_echo_n "checking for error_message in -lcom_err... " >&6; } +if ${ac_cv_lib_com_err_error_message+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $rra_krb5_extra $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 error_message (); +int +main () +{ +return error_message (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_com_err_error_message=yes +else + ac_cv_lib_com_err_error_message=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_error_message" >&5 +$as_echo "$ac_cv_lib_com_err_error_message" >&6; } +if test "x$ac_cv_lib_com_err_error_message" = xyes; then : + rra_krb5_extra="-lcom_err $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_svc_get_msg in -lksvc" >&5 +$as_echo_n "checking for krb5_svc_get_msg in -lksvc... " >&6; } +if ${ac_cv_lib_ksvc_krb5_svc_get_msg+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lksvc $rra_krb5_extra $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 krb5_svc_get_msg (); +int +main () +{ +return krb5_svc_get_msg (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_ksvc_krb5_svc_get_msg=yes +else + ac_cv_lib_ksvc_krb5_svc_get_msg=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ksvc_krb5_svc_get_msg" >&5 +$as_echo "$ac_cv_lib_ksvc_krb5_svc_get_msg" >&6; } +if test "x$ac_cv_lib_ksvc_krb5_svc_get_msg" = xyes; then : + rra_krb5_extra="-lksvc $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_hash_md5 in -lk5crypto" >&5 +$as_echo_n "checking for krb5int_hash_md5 in -lk5crypto... " >&6; } +if ${ac_cv_lib_k5crypto_krb5int_hash_md5+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5crypto $rra_krb5_extra $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 krb5int_hash_md5 (); +int +main () +{ +return krb5int_hash_md5 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5crypto_krb5int_hash_md5=yes +else + ac_cv_lib_k5crypto_krb5int_hash_md5=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5crypto_krb5int_hash_md5" >&5 +$as_echo "$ac_cv_lib_k5crypto_krb5int_hash_md5" >&6; } +if test "x$ac_cv_lib_k5crypto_krb5int_hash_md5" = xyes; then : + rra_krb5_extra="-lk5crypto $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for profile_get_values in -lk5profile" >&5 +$as_echo_n "checking for profile_get_values in -lk5profile... " >&6; } +if ${ac_cv_lib_k5profile_profile_get_values+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lk5profile $rra_krb5_extra $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 profile_get_values (); +int +main () +{ +return profile_get_values (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_k5profile_profile_get_values=yes else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_svc_get_msg in -lksvc" >&5 -$as_echo_n "checking for krb5_svc_get_msg in -lksvc... " >&6; } -if ${ac_cv_lib_ksvc_krb5_svc_get_msg+:} false; then : + ac_cv_lib_k5profile_profile_get_values=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_k5profile_profile_get_values" >&5 +$as_echo "$ac_cv_lib_k5profile_profile_get_values" >&6; } +if test "x$ac_cv_lib_k5profile_profile_get_values" = xyes; then : + rra_krb5_extra="-lk5profile $rra_krb5_extra" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5_cc_default in -lkrb5" >&5 +$as_echo_n "checking for krb5_cc_default in -lkrb5... " >&6; } +if ${ac_cv_lib_krb5_krb5_cc_default+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lksvc $LIBS" +LIBS="-lkrb5 $rra_krb5_extra $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14627,201 +17727,413 @@ #ifdef __cplusplus extern "C" #endif -char krb5_svc_get_msg (); +char krb5_cc_default (); int main () { -return krb5_svc_get_msg (); +return krb5_cc_default (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_ksvc_krb5_svc_get_msg=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_krb5_krb5_cc_default=yes +else + ac_cv_lib_krb5_krb5_cc_default=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_krb5_krb5_cc_default" >&5 +$as_echo "$ac_cv_lib_krb5_krb5_cc_default" >&6; } +if test "x$ac_cv_lib_krb5_krb5_cc_default" = xyes; then : + KRB5_LIBS="-lkrb5 $rra_krb5_extra" +else + if test x"false" = xtrue; then : + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 +fi +fi + +fi + + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi + 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 : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +_ACEOF + for ac_func in krb5_free_error_message +do : + ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" +if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 +_ACEOF + +fi +done + +else + for ac_func in krb5_get_error_string +do : + ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" +if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_STRING 1 +_ACEOF + +else + for ac_func in krb5_get_err_txt +do : + ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" +if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERR_TXT 1 +_ACEOF + +else + for ac_func in krb5_svc_get_msg +do : + ac_fn_c_check_func "$LINENO" "krb5_svc_get_msg" "ac_cv_func_krb5_svc_get_msg" +if test "x$ac_cv_func_krb5_svc_get_msg" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_SVC_GET_MSG 1 +_ACEOF + 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 +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + +" +if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IBM_SVC_KRB5_SVC_H 1 +_ACEOF + +fi + +done + +else + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi +fi +done + +fi +done + +fi +done + +fi +done + + CPPFLAGS="$rra_krb5_save_CPPFLAGS" + LDFLAGS="$rra_krb5_save_LDFLAGS" + LIBS="$rra_krb5_save_LIBS" +fi + + rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_LDFLAGS="$LDFLAGS" + rra_krb5_save_LIBS="$LIBS" + CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" + LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" + 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - ac_cv_lib_ksvc_krb5_svc_get_msg=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ksvc_krb5_svc_get_msg" >&5 -$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 - - for ac_header in ibm_svc/krb5_svc.h + for ac_func in krb5_get_error_message do : - ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" "#include -" -if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : + 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 : cat >>confdefs.h <<_ACEOF -#define HAVE_IBM_SVC_KRB5_SVC_H 1 +#define HAVE_KRB5_GET_ERROR_MESSAGE 1 +_ACEOF + for ac_func in krb5_free_error_message +do : + ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" +if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_FREE_ERROR_MESSAGE 1 _ACEOF fi - done else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 -$as_echo_n "checking for com_err in -lcom_err... " >&6; } -if ${ac_cv_lib_com_err_com_err+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcom_err $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 com_err (); -int -main () -{ -return com_err (); - ; - return 0; -} + for ac_func in krb5_get_error_string +do : + ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" +if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_GET_ERROR_STRING 1 _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_com_err_com_err=yes -else - ac_cv_lib_com_err_com_err=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_com_err_com_err" >&5 -$as_echo "$ac_cv_lib_com_err_com_err" >&6; } -if test "x$ac_cv_lib_com_err_com_err" = xyes; then : - KRB5_LIBS="$KRB5_LIBS -lcom_err" -else - as_fn_error $? "cannot find usable com_err library" "$LINENO" 5 -fi - for ac_header in et/com_err.h +else + for ac_func in krb5_get_err_txt do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" +if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_ET_COM_ERR_H 1 +#define HAVE_KRB5_GET_ERR_TXT 1 _ACEOF -fi +else + for ac_func in krb5_svc_get_msg +do : + ac_fn_c_check_func "$LINENO" "krb5_svc_get_msg" "ac_cv_func_krb5_svc_get_msg" +if test "x$ac_cv_func_krb5_svc_get_msg" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_SVC_GET_MSG 1 +_ACEOF + 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 +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif -done +" +if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IBM_SVC_KRB5_SVC_H 1 +_ACEOF fi -fi done -fi -done +else + 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` +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 - CPPFLAGS="$rra_krb5_save_CPPFLAGS" - LDFLAGS="$rra_krb5_save_LDFLAGS" - LIBS="$rra_krb5_save_LIBS" else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : - if test x"$rra_krb5_root" != x && test -z "$KRB5_CONFIG"; then : - if test -x "${rra_krb5_root}/bin/krb5-config"; then : - KRB5_CONFIG="${rra_krb5_root}/bin/krb5-config" -fi -else - # 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_KRB5_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $KRB5_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KRB5_CONFIG="$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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_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 +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF - ;; -esac -fi -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG -if test -n "$KRB5_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5_CONFIG" >&5 -$as_echo "$KRB5_CONFIG" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF -fi - if test x"$KRB5_CONFIG" != x && test -x "$KRB5_CONFIG"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5 support in krb5-config" >&5 -$as_echo_n "checking for krb5 support in krb5-config... " >&6; } -if ${rra_cv_lib_krb5_config+:} false; then : - $as_echo_n "(cached) " >&6 -else - if "$KRB5_CONFIG" 2>&1 | grep krb5 >/dev/null 2>&1; then : - rra_cv_lib_krb5_config=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - rra_cv_lib_krb5_config=no + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $rra_cv_lib_krb5_config" >&5 -$as_echo "$rra_cv_lib_krb5_config" >&6; } - if test x"$rra_cv_lib_krb5_config" = xyes; then : - KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags krb5 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs krb5 2>/dev/null` -else - KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs 2>/dev/null` fi - KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include ?%%'` - rra_krb5_save_CPPFLAGS="$CPPFLAGS" - rra_krb5_save_LDFLAGS="$LDFLAGS" - rra_krb5_save_LIBS="$LIBS" - CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" - LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" - LIBS="$KRB5_LIBS $LIBS" - ac_fn_c_check_func "$LINENO" "krb5_init_context" "ac_cv_func_krb5_init_context" -if test "x$ac_cv_func_krb5_init_context" = xyes; then : - CPPFLAGS="$rra_krb5_save_CPPFLAGS" +done + +fi +done + +fi +done + +fi +done + + CPPFLAGS="$rra_krb5_save_CPPFLAGS" LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" else - CPPFLAGS="$rra_krb5_save_CPPFLAGS" - LDFLAGS="$rra_krb5_save_LDFLAGS" - LIBS="$rra_krb5_save_LIBS" - KRB5_CPPFLAGS= - KRB5_LIBS= - if test x"$rra_krb5_libdir" != x; then : + if test x"$rra_krb5_libdir" != x; then : KRB5_LDFLAGS="-L$rra_krb5_libdir" else if test x"$rra_krb5_root" != x; then : @@ -15181,9 +18493,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rk_simple_execve" >&5 -$as_echo_n "checking for library containing rk_simple_execve... " >&6; } -if ${ac_cv_search_rk_simple_execve+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -15196,11 +18508,11 @@ #ifdef __cplusplus extern "C" #endif -char rk_simple_execve (); +char roken_concat (); int main () { -return rk_simple_execve (); +return roken_concat (); ; return 0; } @@ -15213,25 +18525,25 @@ LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_rk_simple_execve=$ac_res + ac_cv_search_roken_concat=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_rk_simple_execve+:} false; then : + if ${ac_cv_search_roken_concat+:} false; then : break fi done -if ${ac_cv_search_rk_simple_execve+:} false; then : +if ${ac_cv_search_roken_concat+:} false; then : else - ac_cv_search_rk_simple_execve=no + ac_cv_search_roken_concat=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rk_simple_execve" >&5 -$as_echo "$ac_cv_search_rk_simple_execve" >&6; } -ac_res=$ac_cv_search_rk_simple_execve +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -15640,107 +18952,72 @@ KRB5_LIBS="-lkrb5 $rra_krb5_extra" else if test x"false" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 fi fi fi LIBS="$KRB5_LIBS $LIBS" - 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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_MESSAGE 1 -_ACEOF - for ac_func in krb5_free_error_message + if test x"$rra_krb5_incroot" = x; then : + for ac_header in krb5.h kerberosv5/krb5.h krb5/krb5.h do : - ac_fn_c_check_func "$LINENO" "krb5_free_error_message" "ac_cv_func_krb5_free_error_message" -if test "x$ac_cv_func_krb5_free_error_message" = xyes; then : + 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 HAVE_KRB5_FREE_ERROR_MESSAGE 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi + done else - for ac_func in krb5_get_error_string -do : - ac_fn_c_check_func "$LINENO" "krb5_get_error_string" "ac_cv_func_krb5_get_error_string" -if test "x$ac_cv_func_krb5_get_error_string" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERROR_STRING 1 -_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : -else - for ac_func in krb5_get_err_txt -do : - ac_fn_c_check_func "$LINENO" "krb5_get_err_txt" "ac_cv_func_krb5_get_err_txt" -if test "x$ac_cv_func_krb5_get_err_txt" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_GET_ERR_TXT 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - for ac_func in krb5_svc_get_msg -do : - ac_fn_c_check_func "$LINENO" "krb5_svc_get_msg" "ac_cv_func_krb5_svc_get_msg" -if test "x$ac_cv_func_krb5_svc_get_msg" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_SVC_GET_MSG 1 -_ACEOF - 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" "#include -" -if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_IBM_SVC_KRB5_SVC_H 1 -_ACEOF - + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : -done - -else - for ac_header in et/com_err.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ET_COM_ERR_H 1 +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 _ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : -done - -fi -done - -fi -done - -fi -done - -fi -done +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF - CPPFLAGS="$rra_krb5_save_CPPFLAGS" - LDFLAGS="$rra_krb5_save_LDFLAGS" - LIBS="$rra_krb5_save_LIBS" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - - rra_krb5_save_CPPFLAGS="$CPPFLAGS" - rra_krb5_save_LDFLAGS="$LDFLAGS" - rra_krb5_save_LIBS="$LIBS" - CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" - LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" - LIBS="$KRB5_LIBS $LIBS" - for ac_func in krb5_get_error_message +fi + 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 : @@ -15786,7 +19063,15 @@ _ACEOF 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -15798,18 +19083,50 @@ done else - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi done @@ -15822,9 +19139,10 @@ fi done - CPPFLAGS="$rra_krb5_save_CPPFLAGS" + CPPFLAGS="$rra_krb5_save_CPPFLAGS" LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" +fi else if test x"$rra_krb5_libdir" != x; then : KRB5_LDFLAGS="-L$rra_krb5_libdir" @@ -15856,7 +19174,7 @@ fi fi fi - rra_krb5_save_CPPFLAGS="$CPPFLAGS" + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" @@ -16186,9 +19504,9 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing rk_simple_execve" >&5 -$as_echo_n "checking for library containing rk_simple_execve... " >&6; } -if ${ac_cv_search_rk_simple_execve+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing roken_concat" >&5 +$as_echo_n "checking for library containing roken_concat... " >&6; } +if ${ac_cv_search_roken_concat+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS @@ -16201,11 +19519,11 @@ #ifdef __cplusplus extern "C" #endif -char rk_simple_execve (); +char roken_concat (); int main () { -return rk_simple_execve (); +return roken_concat (); ; return 0; } @@ -16218,25 +19536,25 @@ LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_rk_simple_execve=$ac_res + ac_cv_search_roken_concat=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext - if ${ac_cv_search_rk_simple_execve+:} false; then : + if ${ac_cv_search_roken_concat+:} false; then : break fi done -if ${ac_cv_search_rk_simple_execve+:} false; then : +if ${ac_cv_search_roken_concat+:} false; then : else - ac_cv_search_rk_simple_execve=no + ac_cv_search_roken_concat=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_rk_simple_execve" >&5 -$as_echo "$ac_cv_search_rk_simple_execve" >&6; } -ac_res=$ac_cv_search_rk_simple_execve +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_roken_concat" >&5 +$as_echo "$ac_cv_search_roken_concat" >&6; } +ac_res=$ac_cv_search_roken_concat if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" @@ -16645,13 +19963,71 @@ KRB5_LIBS="-lkrb5 $rra_krb5_extra" else if test x"false" = xtrue; then : - as_fn_error $? "cannot find usable Kerberos v5 library" "$LINENO" 5 + as_fn_error $? "cannot find usable Kerberos library" "$LINENO" 5 fi fi fi 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` +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 + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5.h" >&5 +$as_echo_n "checking for krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/krb5.h" >&5 +$as_echo_n "checking for kerberosv5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5/krb5.h" >&5 +$as_echo_n "checking for krb5/krb5.h... " >&6; } + if test -f "${rra_krb5_incroot}/krb5/krb5.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_KRB5_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi 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" @@ -16698,7 +20074,15 @@ _ACEOF 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" "#include + ac_fn_c_check_header_compile "$LINENO" "ibm_svc/krb5_svc.h" "ac_cv_header_ibm_svc_krb5_svc_h" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + " if test "x$ac_cv_header_ibm_svc_krb5_svc_h" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -16710,18 +20094,50 @@ done else - for ac_header in et/com_err.h + if test x"$rra_krb5_incroot" = x; then : + for ac_header in et/com_err.h kerberosv5/com_err.h do : - ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" -if test "x$ac_cv_header_et_com_err_h" = xyes; then : + 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 HAVE_ET_COM_ERR_H 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done +else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for et/com_err.h" >&5 +$as_echo_n "checking for et/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/et/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_ET_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kerberosv5/com_err.h" >&5 +$as_echo_n "checking for kerberosv5/com_err.h... " >&6; } + if test -f "${rra_krb5_incroot}/kerberosv5/com_err.h"; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KERBEROSV5_COM_ERR_H 1 +_ACEOF + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +fi fi done @@ -16740,11 +20156,12 @@ fi fi rra_krb5_uses_com_err=false - case "$LIBS" in - *-lcom_err*) - rra_krb5_uses_com_err=true + case $KRB5_LIBS in #( + *-lcom_err*) : + rra_krb5_uses_com_err=true ;; #( + *) : ;; - esac +esac if test x"$rra_krb5_uses_com_err" = xtrue; then KRB5_USES_COM_ERR_TRUE= KRB5_USES_COM_ERR_FALSE='#' @@ -16753,6 +20170,7 @@ KRB5_USES_COM_ERR_FALSE= fi + KRB5_CPPFLAGS_GCC=`echo "$KRB5_CPPFLAGS" | sed -e 's/-I/-isystem /g'` fi else if false; then @@ -16765,29 +20183,36 @@ fi if test x"$KRB5_LIBS" != x; then : + rra_use_KRB5=true -$as_echo "#define HAVE_KERBEROS 1" >>confdefs.h +$as_echo "#define HAVE_KRB5 1" >>confdefs.h fi -rra_krb5_save_CPPFLAGS="$CPPFLAGS" +if test x"$rra_use_kerberos" != xfalse; then : + rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" LIBS="$KRB5_LIBS $LIBS" -if test x"$rra_use_kerberos" != xfalse; then : - 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 + ac_fn_c_check_type "$LINENO" "krb5_realm" "ac_cv_type_krb5_realm" " +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif + +" +if test "x$ac_cv_type_krb5_realm" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_KRB5_REALM 1 _ACEOF -fi -done +fi for ac_func in krb5_free_default_realm \ krb5_init_secure_context @@ -16802,17 +20227,6 @@ fi done - ac_fn_c_check_type "$LINENO" "krb5_realm" "ac_cv_type_krb5_realm" "#include -" -if test "x$ac_cv_type_krb5_realm" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_KRB5_REALM 1 -_ACEOF - - -fi - for ac_func in krb5_appdefault_string do : ac_fn_c_check_func "$LINENO" "krb5_appdefault_string" "ac_cv_func_krb5_appdefault_string" @@ -16833,6 +20247,19 @@ 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" @@ -16848,10 +20275,10 @@ ;; esac -fi -CPPFLAGS="$rra_krb5_save_CPPFLAGS" + CPPFLAGS="$rra_krb5_save_CPPFLAGS" LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" +fi rra_libkafs=true rra_build_kafs=false @@ -17005,7 +20432,7 @@ fi fi fi - if test x"$rra_use_kerberos" = xtrue; then : + if test x"$rra_use_KRB5" = xtrue; then : rra_krb5_save_CPPFLAGS="$CPPFLAGS" rra_krb5_save_LDFLAGS="$LDFLAGS" rra_krb5_save_LIBS="$LIBS" @@ -17163,7 +20590,7 @@ CPPFLAGS="$rra_kafs_save_CPPFLAGS" LDFLAGS="$rra_kafs_save_LDFLAGS" LIBS="$rra_kafs_save_LIBS" - if test x"$rra_use_kerberos" = xtrue; then : + if test x"$rra_use_KRB5" = xtrue; then : CPPFLAGS="$rra_krb5_save_CPPFLAGS" LDFLAGS="$rra_krb5_save_LDFLAGS" LIBS="$rra_krb5_save_LIBS" @@ -17802,60 +21229,60 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; + #include + #ifndef bool + "error: bool is not defined" + #endif + #ifndef false + "error: false is not defined" + #endif + #if false + "error: false is not 0" + #endif + #ifndef true + "error: true is not defined" + #endif + #if true != 1 + "error: true is not 1" + #endif + #ifndef __bool_true_false_are_defined + "error: __bool_true_false_are_defined is not defined" + #endif + + struct s { _Bool s: 1; _Bool t; } s; + + char a[true == 1 ? 1 : -1]; + char b[false == 0 ? 1 : -1]; + char c[__bool_true_false_are_defined == 1 ? 1 : -1]; + char d[(bool) 0.5 == true ? 1 : -1]; + /* See body of main program for 'e'. */ + char f[(_Bool) 0.0 == false ? 1 : -1]; + char g[true]; + char h[sizeof (_Bool)]; + char i[sizeof s.t]; + enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ + _Bool n[m]; + char o[sizeof n == m * sizeof n[0] ? 1 : -1]; + char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; + /* Catch a bug in an HP-UX C compiler. See + http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html + http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html + */ + _Bool q = true; + _Bool *pq = &q; int main () { - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); + bool e = &s; + *pq |= q; + *pq |= ! q; + /* Refer to every declared value, to avoid compiler optimizations. */ + return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + + !m + !n + !o + !p + !q + !pq); ; return 0; @@ -17870,7 +21297,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } -ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" + ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @@ -17880,6 +21307,7 @@ fi + if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h @@ -17909,6 +21337,26 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SNPRINTF $ac_have_decl _ACEOF +ac_fn_c_check_decl "$LINENO" "strlcat" "ac_cv_have_decl_strlcat" "$ac_includes_default" +if test "x$ac_cv_have_decl_strlcat" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRLCAT $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "strlcpy" "ac_cv_have_decl_strlcpy" "$ac_includes_default" +if test "x$ac_cv_have_decl_strlcpy" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STRLCPY $ac_have_decl +_ACEOF ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : ac_have_decl=1 @@ -17921,12 +21369,14 @@ _ACEOF - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 +$as_echo_n "checking for unsigned long long int... " >&6; } +if ${ac_cv_type_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + ac_cv_type_unsigned_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* For now, do not test the preprocessor; as of 2007 there are too many @@ -17959,37 +21409,64 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if test "$cross_compiling" = yes; then : + +else + ac_cv_type_unsigned_long_long_int=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 +$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } + if test $ac_cv_type_unsigned_long_long_int = yes; then + +$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h + + fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 +$as_echo_n "checking for long long int... " >&6; } +if ${ac_cv_type_long_long_int+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_type_long_long_int=yes + if test "x${ac_cv_prog_cc_c99-no}" = xno; then + ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int + if test $ac_cv_type_long_long_int = yes; then + if test "$cross_compiling" = yes; then : + : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif + #ifndef LLONG_MAX + # define HALF \ + (1LL << (sizeof (long long int) * CHAR_BIT - 2)) + # define LLONG_MAX (HALF - 1 + HALF) + #endif int main () { long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; + int i; + for (i = 0; ; i++) + { + long long int m = n << i; + if (m >> i != n) + return 1; + if (LLONG_MAX / 2 < m) + break; + } + return 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_type_long_long_int=yes + else ac_cv_type_long_long_int=no fi @@ -17997,11 +21474,8 @@ conftest.$ac_objext conftest.beam conftest.$ac_ext fi -else - ac_cv_type_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext + fi + fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 $as_echo "$ac_cv_type_long_long_int" >&6; } @@ -18030,9 +21504,21 @@ " if test "x$ac_cv_type_sig_atomic_t" = xyes; then : -else +cat >>confdefs.h <<_ACEOF +#define HAVE_SIG_ATOMIC_T 1 +_ACEOF + + +fi + +ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "#include +" +if test "x$ac_cv_type_ssize_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_SSIZE_T 1 +_ACEOF -$as_echo "#define sig_atomic_t int" >>confdefs.h fi @@ -18109,14 +21595,27 @@ fi -ac_fn_c_check_func "$LINENO" "issetuidgid" "ac_cv_func_issetuidgid" -if test "x$ac_cv_func_issetuidgid" = xyes; then : - $as_echo "#define HAVE_ISSETUIDGID 1" >>confdefs.h +ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid" +if test "x$ac_cv_func_issetugid" = xyes; then : + $as_echo "#define HAVE_ISSETUGID 1" >>confdefs.h + +else + case " $LIBOBJS " in + *" issetugid.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS issetugid.$ac_objext" + ;; +esac + +fi + +ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" +if test "x$ac_cv_func_reallocarray" = xyes; then : + $as_echo "#define HAVE_REALLOCARRAY 1" >>confdefs.h else case " $LIBOBJS " in - *" issetuidgid.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS issetuidgid.$ac_objext" + *" reallocarray.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" ;; esac @@ -18200,6 +21699,23 @@ ;; esac + if test x"$GCC" = xyes && test x"$CLANG" != xyes; then + WARNINGS_GCC_TRUE= + WARNINGS_GCC_FALSE='#' +else + WARNINGS_GCC_TRUE='#' + WARNINGS_GCC_FALSE= +fi + + if test x"$CLANG" = xyes; then + WARNINGS_CLANG_TRUE= + WARNINGS_CLANG_FALSE='#' +else + WARNINGS_CLANG_TRUE='#' + WARNINGS_CLANG_FALSE= +fi + + ac_config_headers="$ac_config_headers config.h" ac_config_files="$ac_config_files Makefile" @@ -18313,6 +21829,14 @@ LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -18353,6 +21877,14 @@ as_fn_error $? "conditional \"NEED_KAFS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${WARNINGS_GCC_TRUE}" && test -z "${WARNINGS_GCC_FALSE}"; then + as_fn_error $? "conditional \"WARNINGS_GCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${WARNINGS_CLANG_TRUE}" && test -z "${WARNINGS_CLANG_FALSE}"; then + as_fn_error $? "conditional \"WARNINGS_CLANG\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -18651,16 +22183,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -18720,28 +22252,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -18762,8 +22282,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by pam-afs-session $as_me 2.5, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by pam-afs-session $as_me 2.6, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -18822,17 +22342,17 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -pam-afs-session config.status 2.5 -configured by $0, generated by GNU Autoconf 2.68, +pam-afs-session config.status 2.6 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -18923,7 +22443,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -18965,6 +22485,7 @@ enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -19047,7 +22568,6 @@ allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -19103,6 +22623,7 @@ # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -19153,7 +22674,6 @@ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -19834,7 +23354,7 @@ case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # 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 @@ -19847,7 +23367,7 @@ # 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 + # 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. @@ -19881,21 +23401,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # 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 + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -19949,8 +23467,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -20004,6 +23522,9 @@ # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -20305,10 +23826,6 @@ # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff -Nru libpam-afs-session-2.5/configure.ac libpam-afs-session-2.6/configure.ac --- libpam-afs-session-2.5/configure.ac 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/configure.ac 2015-09-19 18:25:37.000000000 +0000 @@ -1,7 +1,8 @@ dnl Autoconf configuration for pam-afs-session. dnl -dnl Written by Russ Allbery -dnl Copyright 2006, 2007, 2008, 2010 +dnl Written by Russ Allbery +dnl Copyright 2015 Russ Allbery +dnl Copyright 2006, 2007, 2008, 2010, 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 @@ -9,7 +10,7 @@ dnl notice is preserved. AC_PREREQ([2.64]) -AC_INIT([pam-afs-session], [2.5], [rra@stanford.edu]) +AC_INIT([pam-afs-session], [2.6], [eagle@eyrie.org]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_LIBOBJ_DIR([portable]) AC_CONFIG_MACRO_DIR([m4]) @@ -17,9 +18,15 @@ -Wall -Werror]) AM_MAINTAINER_MODE +dnl Detect unexpanded macros. +m4_pattern_forbid([^_?RRA_]) + AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS +RRA_PROG_CC_CLANG +AC_SYS_LARGEFILE AM_PROG_CC_C_O +AM_PROG_AR AC_PROG_INSTALL LT_INIT([disable-static]) AC_CANONICAL_HOST @@ -30,14 +37,15 @@ AC_SEARCH_LIBS([pam_set_data], [pam]) AC_CHECK_FUNCS([pam_getenv pam_getenvlist pam_modutil_getpwnam]) AC_REPLACE_FUNCS([pam_syslog pam_vsyslog]) -AC_CHECK_HEADERS([security/pam_modutil.h], , +AC_CHECK_HEADERS([security/pam_modutil.h], [], [AC_CHECK_HEADERS([pam/pam_modutil.h])]) -AC_CHECK_HEADERS([security/pam_appl.h], , - [AC_CHECK_HEADERS([pam/pam_appl.h], , +AC_CHECK_HEADERS([security/pam_appl.h], [], + [AC_CHECK_HEADERS([pam/pam_appl.h], [], [AC_MSG_ERROR([No PAM header files found])])]) -AC_CHECK_HEADERS([security/pam_ext.h], , +AC_CHECK_HEADERS([security/pam_ext.h], [], [AC_CHECK_HEADERS([pam/pam_ext.h])]) RRA_HEADER_PAM_CONST +RRA_HEADER_PAM_STRERROR_CONST dnl Needed for the pam_vsyslog replacement function. AC_DEFINE([MODULE_NAME], ["pam_afs_session"], @@ -61,17 +69,17 @@ dnl Kerberos calls to get configuration information. Check this before dnl checking for libkafs. RRA_LIB_KRB5_OPTIONAL -RRA_LIB_KRB5_SWITCH AS_IF([test x"$rra_use_kerberos" != xfalse], - [AC_CHECK_HEADERS([k5profile.h profile.h]) + [RRA_LIB_KRB5_SWITCH + AC_CHECK_TYPES([krb5_realm], [], [], [RRA_INCLUDES_KRB5]) AC_CHECK_FUNCS([krb5_free_default_realm \ krb5_init_secure_context]) - AC_CHECK_TYPES([krb5_realm], , , [#include ]) - AC_CHECK_FUNCS([krb5_appdefault_string], , + 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])]) -RRA_LIB_KRB5_RESTORE + AC_LIBOBJ([krb5-extra]) + RRA_LIB_KRB5_RESTORE]) RRA_LIB_KAFS RRA_LIB_KAFS_SWITCH AC_CHECK_FUNCS([krb5_afslog]) @@ -81,16 +89,16 @@ dnl Other portability checks. AC_HEADER_STDBOOL AC_CHECK_HEADERS([strings.h sys/bittypes.h]) -AC_CHECK_DECLS([snprintf, vsnprintf]) +AC_CHECK_DECLS([snprintf, strlcat, strlcpy, vsnprintf]) AC_TYPE_LONG_LONG_INT AC_TYPE_UINT32_T -AC_CHECK_TYPE([sig_atomic_t], , - [AC_DEFINE([sig_atomic_t], [int], - [Define to int if does not define.])], +AC_CHECK_TYPES([sig_atomic_t], [], [], [#include #include ]) +AC_CHECK_TYPES([ssize_t], [], [], + [#include ]) RRA_FUNC_SNPRINTF -AC_REPLACE_FUNCS([asprintf issetuidgid strlcat strlcpy strndup]) +AC_REPLACE_FUNCS([asprintf issetugid reallocarray strlcat strlcpy strndup]) dnl Needed for correct handling of errno with threaded applications on dnl Solaris. @@ -131,6 +139,10 @@ [AM_LDFLAGS="-Wl,-Bsymbolic $AM_LDFLAGS"], [AM_LDFLAGS="-Wl,-xldscope=symbolic $AM_LDFLAGS"])]) +dnl Enable appropriate warnings. +AM_CONDITIONAL([WARNINGS_GCC], [test x"$GCC" = xyes && test x"$CLANG" != xyes]) +AM_CONDITIONAL([WARNINGS_CLANG], [test x"$CLANG" = xyes]) + AC_CONFIG_HEADER([config.h]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff -Nru libpam-afs-session-2.5/debian/changelog libpam-afs-session-2.6/debian/changelog --- libpam-afs-session-2.5/debian/changelog 2014-04-13 19:51:17.000000000 +0000 +++ libpam-afs-session-2.6/debian/changelog 2015-09-19 18:49:01.000000000 +0000 @@ -1,3 +1,18 @@ +libpam-afs-session (2.6-1) unstable; urgency=medium + + * New upstream release. + - Fix PAM_REINITIALIZE_CRED and PAM_REFRESH_CRED handling in + combination with opening a new session. Fixes failure to isolate + tokens when used with sudo. (Closes: #782589) + * Remove erroneous branch information from Vcs-Git. + * Prefer *.tar.xz in debian/watch to match packaging. + * Add debian/gbp.conf reflecting the branch layout of the default + packaging repository. + * Refresh upstream signing key. + * Update standards version to 3.6.6 (no changes required). + + -- Russ Allbery Sat, 19 Sep 2015 11:45:52 -0700 + libpam-afs-session (2.5-4) unstable; urgency=medium * Remove now-unnecessary dh_builddeb override to force xz compression. diff -Nru libpam-afs-session-2.5/debian/control libpam-afs-session-2.6/debian/control --- libpam-afs-session-2.5/debian/control 2014-04-13 19:51:17.000000000 +0000 +++ libpam-afs-session-2.6/debian/control 2015-09-19 18:49:01.000000000 +0000 @@ -3,11 +3,11 @@ Priority: optional Maintainer: Russ Allbery Uploaders: Sam Hartman -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Build-Depends: debhelper (>= 9), comerr-dev, dh-autoreconf, libkrb5-dev, libpam0g-dev, libtest-pod-perl Homepage: http://www.eyrie.org/~eagle/software/pam-afs-session/ -Vcs-Git: git://anonscm.debian.org/pkg-k5-afs/libpam-afs-session.git -b debian +Vcs-Git: git://anonscm.debian.org/pkg-k5-afs/libpam-afs-session.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-k5-afs/libpam-afs-session.git Package: libpam-afs-session diff -Nru libpam-afs-session-2.5/debian/copyright libpam-afs-session-2.6/debian/copyright --- libpam-afs-session-2.5/debian/copyright 2014-04-13 19:51:17.000000000 +0000 +++ libpam-afs-session-2.6/debian/copyright 2015-09-19 18:49:01.000000000 +0000 @@ -1,32 +1,38 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Contact: Russ Allbery Source: http://www.eyrie.org/~eagle/software/pam-afs-session/ -Copyright: 2007-2008, 2010-2014 +Copyright: 2000-2001, 2004, 2006-2015 Russ Allbery + 2001-2002, 2004-2014 The Board of Trustees of the Leland Stanford Junior University License: Expat Files: * -Copyright: 2000-2001, 2004, 2006-2011 Russ Allbery - 2001-2002, 2004-2011 +Copyright: 2000-2001, 2004, 2006-2015 Russ Allbery + 2001-2002, 2004-2014 The Board of Trustees of the Leland Stanford Junior University License: Expat Files: Makefile.in -Copyright: 1994-2009 Free Software Foundation, Inc. +Copyright: 1994-2014 Free Software Foundation, Inc. 2006-2007, 2010-2011 The Board of Trustees of the Leland Stanford Junior University + 2015 Russ Allbery License: FSF-unlimited and Expat Files: aclocal.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -Copyright: 1996-2010 Free Software Foundation, Inc. +Copyright: 1996-2015 Free Software Foundation, Inc. License: FSF-unlimited -Files: build-aux/compile build-aux/config.guess build-aux/config.sub - build-aux/depcomp build-aux/missing -Copyright: 1992-2011 Free Software Foundation, Inc. +Files: build-aux/ar-lib build-aux/compile build-aux/depcomp + build-aux/missing +Copyright: 1996-2014 Free Software Foundation, Inc. License: GPL-2+ with Autoconf exception or Expat +Files: build-aux/config.guess build-aux/config.sub +Copyright: 1992-2015 Free Software Foundation, Inc. +License: GPL-3+ with Autoconf exception or Expat + Files: build-aux/install-sh Copyright: 1994 X Consortium License: X11 @@ -55,18 +61,19 @@ Consortium. Files: build-aux/ltmain.sh -Copyright: 1996-2001, 2003-2010 Free Software Foundation, Inc. +Copyright: 1996-2001, 2003-2011 Free Software Foundation, Inc. License: GPL-2+ with Libtool exception or Expat Files: configure -Copyright: 1992-2010 Free Software Foundation, Inc. +Copyright: 1992-2012 Free Software Foundation, Inc. License: FSF-configure, and GPL-2+ with Libtool exception or Expat -Files: configure.ac m4/kafs.m4 m4/krb5.m4 m4/ld-version.m4 - m4/lib-depends.m4 m4/lib-pathname.m4 m4/pam-const.m4 m4/snprintf.m4 -Copyright: 2005-2010, 2013 +Files: configure.ac m4/clang.m4 m4/kafs.m4 m4/krb5-config.m4 m4/krb5.m4 + m4/ld-version.m4 m4/lib-depends.m4 m4/lib-pathname.m4 m4/pam-const.m4 + m4/snprintf.m4 +Copyright: 2005-2014 The Board of Trustees of the Leland Stanford Junior University - 2007 Russ Allbery + 2007, 2015 Russ Allbery 2007-2008 Markus Moeller 2008-2010 Free Software Foundation, Inc. License: unlimited @@ -74,12 +81,23 @@ and/or distribute it, with or without modifications, as long as this notice is preserved. +Files: examples/redhat/system-auth examples/solaris/pam.conf + pam_afs_session.5 pam_afs_session.pod tests/README tests/fakepam/README +Copyright: 2005-2011 + The Board of Trustees of the Leland Stanford Junior University + 2010-2012, 2015 Russ Allbery +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: kafs/sys-syscall.c pam-util/vector.c pam-util/vector.h - portable/asprintf.c portable/dummy.c portable/issetuidgid.c + portable/asprintf.c portable/dummy.c portable/issetugid.c portable/k_haspag.c portable/krb5-extra.c portable/krb5.h portable/macros.h portable/pam.h portable/pam_syslog.c - portable/pam_vsyslog.c portable/stdbool.h portable/strlcat.c - portable/strlcpy.c portable/strndup.c portable/system.h + portable/pam_vsyslog.c portable/reallocarray.c portable/stdbool.h + portable/strlcat.c portable/strlcpy.c portable/strndup.c portable/system.h tests/pam-util/vector-t.c tests/portable/asprintf-t.c tests/portable/strlcat-t.c tests/portable/strlcpy-t.c tests/portable/strndup-t.c @@ -94,7 +112,7 @@ works of this work. Files: m4/libtool.m4 -Copyright: 1996-2001, 2003-2010 Free Software Foundation, Inc. +Copyright: 1996-2001, 2003-2011 Free Software Foundation, Inc. License: FSF-unlimited, and GPL-2+ with Libtool exception or Expat Files: portable/krb5-profile.c @@ -138,7 +156,7 @@ Files: portable/snprintf.c tests/portable/snprintf-t.c Copyright: 1995 Patrick Powell - 2000-2006 Russ Allbery + 2000-2006 Russ Allbery 2001 Hrvoje Niksic 2009-2010 The Board of Trustees of the Leland Stanford Junior University License: Powell-snprintf @@ -146,14 +164,6 @@ It may be used for any purpose as long as this notice remains intact on all source code distributions -Files: tests/README -Copyright: 2010 Russ Allbery -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. - License: Expat Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the @@ -232,3 +242,28 @@ described at the top of this file. You can find the GPL version 2 in /usr/share/common-licenses/GPL-2 on Debian systems. +License: GPL-3+ with Autoconf exception + 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 the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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 . + . + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a configuration + script generated by Autoconf, you may include it under the same + distribution terms that you use for the rest of that program. This + Exception is an additional permission under section 7 of the GNU General + Public License, version 3 ("GPLv3"). +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 -Nru libpam-afs-session-2.5/debian/gbp.conf libpam-afs-session-2.6/debian/gbp.conf --- libpam-afs-session-2.5/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/debian/gbp.conf 2015-09-19 18:49:01.000000000 +0000 @@ -0,0 +1,6 @@ +# The Git repository referenced by the Vcs-Git field of debian/control +# combines upstream development (in master) with the Debian packaging (in the +# debian branch). Tell git-buildpackage about this layout. + +[DEFAULT] +debian-branch = debian diff -Nru libpam-afs-session-2.5/debian/patches/debian-changes libpam-afs-session-2.6/debian/patches/debian-changes --- libpam-afs-session-2.5/debian/patches/debian-changes 2014-04-13 19:51:25.000000000 +0000 +++ libpam-afs-session-2.6/debian/patches/debian-changes 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -Subject: Collected Debian patches for pam-afs-session -Author: Russ Allbery - -Since I am also upstream for this package, there will normally not be any -patches to apply to the upstream source. However, occasionally I'll pull -up specific upstream commits prior to making an upstream release. When -this happens, this patch will collect all of those modifications. - -I use Git to maintain both the upstream source and the Debian packages, -and generating individual patches rather than using git cherry-pick takes -extra work for no gain. Since I'm also upstream, there's no need to -separate the patches for later upstream submission. Hence, I take this -approach with a unified patch when it's necessary. - -For full commit history and separated commits, see the upstream Git -repsitory. ---- libpam-afs-session-2.5.orig/configure.ac -+++ libpam-afs-session-2.5/configure.ac -@@ -1,7 +1,7 @@ - dnl Autoconf configuration for pam-afs-session. - dnl - dnl Written by Russ Allbery --dnl Copyright 2006, 2007, 2008, 2010 -+dnl Copyright 2006, 2007, 2008, 2010, 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 -@@ -19,7 +19,9 @@ AM_MAINTAINER_MODE - - AC_PROG_CC - AC_USE_SYSTEM_EXTENSIONS -+AC_SYS_LARGEFILE - AM_PROG_CC_C_O -+AM_PROG_AR - AC_PROG_INSTALL - LT_INIT([disable-static]) - AC_CANONICAL_HOST diff -Nru libpam-afs-session-2.5/debian/patches/series libpam-afs-session-2.6/debian/patches/series --- libpam-afs-session-2.5/debian/patches/series 2014-04-13 19:51:25.000000000 +0000 +++ libpam-afs-session-2.6/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -debian-changes diff -Nru libpam-afs-session-2.5/debian/upstream/signing-key.asc libpam-afs-session-2.6/debian/upstream/signing-key.asc --- libpam-afs-session-2.5/debian/upstream/signing-key.asc 2014-04-13 19:51:17.000000000 +0000 +++ libpam-afs-session-2.6/debian/upstream/signing-key.asc 2015-09-19 18:49:01.000000000 +0000 @@ -1,5 +1,5 @@ -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 +Version: GnuPG v2 mQINBEofRrIBEADCOmbclGLGH2uSCQSM3xkvEwdB52ps8bMnrzujnsgjfw7crs8l DUjfcOxOVsLlgClntMxaVx764j1IXYF9smAheFfbWD/06gS+lkeuOjYSa1GEfmZG @@ -12,102 +12,179 @@ eUXmPIESNaz2YEmN5VEnHBhqHs4v+rUzAZXJo0g3lv5hMEsoqCxu+w4uVR7e+AbT dIHnydQxCNkG31ywslUZPR9QP92NleIqgXY/nL1eDXBb9EGoxBSHD99KgavFB+xp +dgmzpo8UzOpVM+1xvTAOLHZ+jwW9hGCx1ALpKvWI2qYeW3j+N3LsyGI5wARAQAB -tB9SdXNzIEFsbGJlcnkgPHJyYUBzdGFuZm9yZC5lZHU+iQJABBMBCAAqAhsDAh4B -AheABQsJCAcDBRUKCQgLBRYCAwEAAhkBBQJQVi5bBQkL2oIVAAoJENFdMTiCAEFz -O3oP/R6sfLszTVD7xx3s6IrOW+zqsFArCoOOpuMPEUW7UnJ2DWnAer3WD9QrIX3b -BfQr+0Y9bToh1zhDuGf3h8RJQP/TTzsiAaK3mGhJ8pKTZs9T3Ct5k591CdTWpmJT -Wj9PVwi5OH4SxOKy2MwvAA3AL1bZRKa26mIF/1VohI2XdoyyV+B2WWWYIyDu5bTd -uC8jEkJay7hazLArl36RWRmQAgZegBzom4O/T7CjQWxC4E5vFGXTH6kRdsK15cV9 -wJTnE1X2v4r+k2x/Y6RLMApFSE/tcO6a4ocoWYPDlECknxI6Ir2qtA9wDEPBqr75 -6msqx3S7M0GwQuO7KCT6fXZyKQQHSRepDivkDJLS3tTyrnX4clcirqfhYkMYL9UX -S2qpbtD1fFYu9zVQegTr5ElG3Oje4qNTKbB4Wj1Q6M9VutNtgMu33MoNtNUOeCOG -ZBVXO3sULPl/vqhbDzKNotg9dpafntWkrV8/k5z6O1kf16Cl9lPvizvn0mBjjTbo -m/p/jW/p613wYnMk5cry13quu/bROD4XWS6NaF7vxT6ykqaOFXUL2STidA9PAThg -bg5eBZpE7KKDb3xgl9HSudJ7mN1/x/6kidXJQqKPQPuAF1yrGxgGiUpLmA9uPTcF -fE4ws9w84uM2GYBdiIWa9hm0s/YIxndRoTMwP/4Wk+ibDyK5tB1SdXNzIEFsbGJl -cnkgPHJyYUBkZWJpYW4ub3JnPokCPQQTAQgAJwIbAwULCQgHAwUVCgkICwUWAgMB -AAIeAQIXgAUCUFYuZwUJC9qCFQAKCRDRXTE4ggBBc00ED/4959TDsiL/6FHj7VRC -eFdLAAF7fBTisV2cSgvRByp05oOwAvyffJeBsRQvzdGiqxHQ4AYt48WbE7YkpIQN -fUJkmr80GUn8M3SKTe+S0hV2LkixwdwHvx85pY4hbmsNjMimx02a3zqqrY23MOZe -v6zXae1bIUzpik+G+MLdSMh2WmFHcLJud9BxijZbsAiUVDSEpOttSZEkkHqdXkjb -Enkpqmox6RkLImvZRbP11nCIUSIYKrBE8043TX4JrPOcCa7tXx1LZwcT0z6R+SH0 -k6kCxChfNGYC7PCEkF4HnBi/b+SeL/Hljluvpw56OUF0ja+bGPSrjip2HxATQ2La -pB2f6ZwMFAjgP2eijB5Z/wC0UFBBaOGjH6lM0AP7q5aHZe46algmESTycrhicV9b -hyk3mD7ZTeHmAVox8OFNRr3NJU2q7JpjY2zPN2S0Gl4ReW9oZ35SfvnzWa/63hnF -v21qZkX3yULyVXNezoEAWYlcuEzJ3PB1KyeQ2ZcK0FJdO/sEcj1sJ9YgznJzAjIR -8RRjZL56Cybli6kyzEsBOFahZCNuSvBUSG+D/pXGWeRiLvOaW9DuA5xd3+NO09Ky -jd1CS6YaTVpNVIY9GmhJfG45Hpf2w03GFk3Te0h8Lx4S/JMkNtJNYLq00UWkCDHN -JcahI+3odu9XQ2C46dKMZ1n8IrQqUnVzcyBBbGxiZXJ5IDxlYWdsZUB3aW5kbG9y -ZC5zdGFuZm9yZC5lZHU+iQI9BBMBCAAnAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4B -AheABQJQVi5nBQkL2oIVAAoJENFdMTiCAEFz2WAP/1FPnGwIoeZYgogaHYZtemUV -1UfGPfWw5GCNzGuPmdppfQJ2Jhvrwl8Os/b18VfeETbct3s7tntyGyJgWLfje5y0 -fJ7GB1xbGzHujhA9aEG48Tu6BAda9v4SP4QfWr8TbwUVKRuNprvIIapBcEtovVu0 -eHH6KH0MWokoGImQARpYkT2RB2YD7XA2U9x5S2Rp4NJDnLwDIiNu/jfURE6EYnZa -MY2tbmFJaFEAkLuv9Pt2Cj3KKw4HHsi2kz4LjdI1st3YJUKxFK/J0fEzrIT5wcL2 -zGLGfGHHB//JV6Us25+9uVkkwUuIi7WvWVe80LRM4mpK2yn1TSsYy6xGO6wMWwDU -MrYTRqiIc5dwege7egzMOC9RAP92Imx4CH9rzPBzXJGxLBAqmNFznJ4APH2XCb/v -GM1R+I8y5o4Bk5BY0Vr4e1HLz+EwcgdjTLeIweZUjZ/mtVDG2W7xLTHHh83L3sbx -O+5fHNdxmIaRqVuGz/VcoJHA+KWIWkjzU3Nrctc4xZh2qff/pon9cn1Y/nwZj7OO -GWXIQvMK2cnQYzHbp6bF/ux++qwxmhdaa3OEXEQugRQ260Tpzq2JkLiNVMQ/ZdbB -1uNProrzUeP7bFJQ9ypLjVfr+u/Ujdoh2F6QfX6DXyuX0kZ3TsOebr1imTkVJE8e -i9QFuM37jzlBL+47+L5ttB5SdXNzIEFsbGJlcnkgPGVhZ2xlQGV5cmllLm9yZz6J -Aj0EEwEIACcCGwMFCwkIBwMFFQoJCAsFFgIDAQACHgECF4AFAlBWLmcFCQvaghUA -CgkQ0V0xOIIAQXMtug//WFg2jVKNPxU3fy0c6+V4qG1gL29R27SZTQtRMkpc3Sc/ -5j8eXfikqCwbIvemMGN/NamG6Qo3UPMfTN+3ddZzV6TAWnCqTsBTMwmSztzEOwmX -wWen//8AeKhIp53xe7CaQaevAqW6WE88GcnYfZM1zCvt3dnoI5fnvkPsG5CFc1rq -WYIxaws8Jo2eJPu5Tl9wvqcaMcNYMQ6iLKdqWM9Z4wihfe7hXqk2aPAArEldX532 -wwmcWKaksxcC8+tkJxcJTKBLHGuSQr/+jYSsjhEzKqKnGwulLuzQQk3rjVfC1ScA -s/tru4UKZpzF1CoYeq3DA1yvH6lwWmhHN4uANa1snuLDfMY++j/C/4PBqpz4/6tH -ArUMdUcsA2s+Q+nU1ZNHgJSeuiIOxHu2IwddkVm1fFDi7sqvlyYeEKLXbl1+zji2 -aa16jHcVYoVQamWr5IzUwSElq64oAqmaQv79TPCQ/XJRZoM2bUa+NJK9yzSNkmO+ -S0aS8fiec+WqXCp9H1wLTba2Ueya1a/kPjBNO2R5MTPDOr0Mh1S94moM5APxIIVM -W+dcLIJqgtsDC0PIfq4T6EkQo3TFJwlw+CEYR/luDaBN6pXuQxzZSVZuOrqGRX8d -XLD3kzDm9qCo9D/rvuwkQ8vhbdbVreojLrLmm6hr5KaOKhB7DlhyKQXqnvhrXXe5 -Ag0ESh9K6gEQALZuDF62F028dT9/ChFHuJN+vH7Qwb4PQG960gXxe9n7FQ4nfVuB -R953ismuJlckDN5RJ6gu0iXDAi5lXxEswynk+YGz8MeIfWRFuNcOzHEFa2Z6XFbV -k3+LVVPVHTvx2CD8t/4ZjeSJgDp4UWb6+jVPtHbUPaC9hKsZ1SKbORJA/eXyReLw -DPKlCuyxu+EbMqLOOCl082NOjzItu1WlKhliky4eSJxXZ3ad8C/BroxMj+3+QsMs -o/zafmpRFeGLc/7t8Sa+uUve7+k5gfubclHNG9J1paGLHGVKiKuP6x3qjDqV8LTz -jlclbPG0nUfAqRtLPbPR5AeqViY1JBHv+Xub/3bSWUtMOan97QdkfeakWmIbmVEg -W0n43gnklHIqJX69cUgF0HZdVKiJpyMl3rQF2NbYDMzzzzVjZ0lOqMukDh+Asl5W -46ayM9MDldn6rQZYizTjvY5Qpv9N5bWbJxI3dnr2YszCpeCvgNS7feCg9YIga5JS -nMX4Knn3Mk6JritKKm9m252jKroJpwJFYTjx6w8q126UaNr0iH+6/ZcVYq1eXP3C -rDDphy7d19C4foWib0KnjQg9z9VMbVD3mb1rv4Pq7tN8mFGgGt3MQIrmxigbCwgE -rniLOx8J7i/gozFyYhAOkM8zqBgIQCaWYei/SkYhr+eKMu75VWnJPrsHABEBAAGJ -AiUEGAEIAA8CGwwFAlBWLnoFCQvafgwACgkQ0V0xOIIAQXM9Sw/+Kjl8GIQVNr1v -ianJSu/EflOWwBRCqPYtmVupHWSx1z59SkfgDrLdfWUvIwelL6tTVzfBqACpuyme -YMnTdEJeBgjMlqc80PzP2fI+COmCjTa/d34oUkIbT5vewLofTGMxIJSFZCAReuXl -yU/c6hvmwi8Z6P9y7XNvA4LHFlcwAYgPKkPu9V03JwOKFelNzvz95HlG07wilWqk -w9zlfeiZFBGTj9G4F5diDYtxdk+8SwwJjjtRiQQXkRj9pPePyDq6RzVvTybTvNZl -YCouJrDBRfO7Jn3IIerYdfliYuqdAoyCv4+RK4K8ZJm/Z+rc9YzkG6OAXrGxnqFO -6/izQLQXaKGpH4nYstl9U/7A3N/177uZSJ/rzJVUJI5L5+ZZXhRFaU8swMybySgG -p9wlSoc3+GboX7f9afU3CLSi6Vu957dVx6ta6E7C4HPGo6bP9IfgPu7P+oDt+YNr -i43gWIz+vDzT1xG0WagXDYeg75m4w7Uuh/bcaHniaRi+7ZcdsWV4z11e9RjMuP2q -1QDI12R5Tbzr+9+s8bMLInagr3B9PHohQl1o+V5PcjV9y3I6MXHLshWcXyx7Tdgy -cZNPsbDkQZi6mwYfdHhHleVdQMfIakKgRASEZuHBiwunsuZyC+rS8ijiileEu7B0 -TST1E+kdatVrcKgWBG6Al6BmQvHhHDS5AQ0ETJP4JAEIAMAX+3WIpAzDwNrBrP4Z -KvVnxWHznj4AdnDjnDBaOlovWUUQThWqgNdzpngcM8almlJd/kp6gWNHQ/lI4Pro -1Y+XwJQiNjt/IMAVc1zWf7/eUdztW3+4i7ZMMEYDrgiXTPWvijKFOOzl2NmntBSh -aJPtQXItamem8h5KyCD4yt8w3khLGTpcVEUpKGkHa/9uanCXiGWdXnCms37ejy5r -k2l46g18pj7dAHbJfEMqSJkjS2uHvNPZdVRqGuiAopdozf1FVMA0pkuiKRI/7je7 -z825Q1xRkE8jRUBdPjZ3/I6wdq2w/vB1LBr3wV6listhedbXhwmND98bCSs5juoS -9q0AEQEAAYkDRAQYAQgADwIbAgUCUyYPOwUJCHNKjQEpwF0gBBkBCAAGBQJMk/gk -AAoJEH2AMVxXNt51KgEIAL/Sq5MU+dwz6h5JQQ7IgN+eWf8Ze/PW3dqFBBRbJAHs -lxqCIrXbNkuok2wkwYs807vJdVaONVPQCLhxjY71B0cKxZQG/Gml4kQImvyCXgby -PZLlrgK1+cut0Lf0zdXSVV1Zu9rNi6m2FkngGEsA9JWyfp33h/QC0/3HpWJO2Qko -kAdIPHURSQTbAVZEU5zO0UnFC690PUVx6ySvXXDwm30IwrgMYSPXfdxdYkp9yf/l -d64GUV2VHSLVLloscMItBRM/oGI/zzmmeBrU2xqRfQ9ZUdTs1jW2wxNLJbBTwXRC -/6jVdCw/130XWYdnBFs38eWKDsz/ng/EmAvdIR5C9pMJENFdMTiCAEFzs8MP/3TT -+1QNFf7pYeskzvhShjYi903/YYIDT1lJ8c4zs+sTLgVnlzmdjVYl4oJWDGUAsrkx -/Lvo/HQDQqQN8lJ49CUIDhV0jSxgWpNKHJFQAbl/bvPaN0LF1+9AkJAW9BaUmJ/K -4PCQpnwc2vYsKeifaLuIvcgVf4ZWK+3CsLQe5pVXSv1ZHU4DZQ+mFnp6xNH8aR6l -2mLe+znnVKxLaF4FDXzPcPEoBa/0+H+kfdB3uQQZb/R+JgMrQJ7r+qI7gCFOklAf -ypYB4pdSp7isCv9Me/x+EpjU6iwm1Jot4kKxw95HYMEQXVXNZ5NTFfvX8JbRRNSj -9XwP1uWTKbEKNUfPphKrQ4C8IZnqv3wOdDzG0znmx8oZLa7Q+lDbFgPhQ6N+fQzy -KgzBdfCu259USbtsciDSowlTmo+Wur460D7wOqAHWdHa+l0MiuWefjR0cUWMp/xx -8eiYQQr8XBJa+nEOX2yuyoSqK9ik/0unsEtK29CLMCAlm23lDMOTP4KWfVTbtSSH -VzW37ukmiulxp0hp133t6dBMMXOywp5hq9EdNyISijXYLy3SUQ+6bb3DtU0DrGfy -FVWn/pI6adD7aNhoFHVoMAb23bgjCSPTiLgWOIAqZFLp1TN/2In/cp7n0RdLA8th -ETbmKwL/z9tPHNFy0kMnqjQlwdlr5uA9GjNYzy/v -=8z8x +tB9SdXNzIEFsbGJlcnkgPHJyYUBzdGFuZm9yZC5lZHU+iQI9BBMBCAAnAhsDAh4B +AheABQsJCAcDBRUKCQgLBRYCAwEABQJUGjGGBQkPnoU6AAoJENFdMTiCAEFztuYQ +AKTKJLBDC7TnyYFbto3MGXhHEYe4sp/Bo2NaKupjGUajCJD8E51OOYkjecuuaiGF +FehyM01YlhhMXccPrzayopn69ZtZUgHM5G8iexcRG6trPXr1k8QHzDbPcboUshv1 +09W6C7ME/vkD6qGi8PoZaReGQFyUszo037ef3AtE3hstpqBklX86q9tRvmCmo/EU +KIbTwk5eMDjruhwF7lc7laLwbzjYc4peJlZ/mWF19cwRbRKJ0Eo1F2DpW5Jdf1Jq +OgHhGfof1A6aoeBwEYkLjVWg3OQYIkMONda/LpB50/LTYtxciQ3YoJ7TKm8GfRw+ +exLA8z6JBmBTKxFIL22rEHWnALdSMC0P/V25p43M6UAZUWZJghASvbhyG9dW1nGk ++rZRO7hPCZ+Ql6UUzGLqLfQyRmYTxwbplc3odrt3Yn08ks1pdX1fjXnVAPR7PTK2 +Yl9kA3wz5lzsqDO0SBITtE5/g4kJzlw5PKQuZubo6AMsW5MhK9OW0QCUjf/w45ic +eiCz8t6J/DDtXtjIZ1O22nylxG0F18f/rDt0vKF7j+4DjWk9IXkqmE0ZLdNQM2pJ +8mOfWXZDgpGkTC/GZNfdzTucMrHqZPc0LI94kALmG4lTGzIxQ3M0aMVjrsIaCs3n +yLLgD0/74j0VM4VlJ1jKziB1rhcIRFsPoLbuQg+Fo0drtB1SdXNzIEFsbGJlcnkg +PHJyYUBkZWJpYW4ub3JnPokCPQQTAQgAJwIbAwULCQgHAwUVCgkICwUWAgMBAAIe +AQIXgAUCVBoxhgUJD56FOgAKCRDRXTE4ggBBc0Y/D/wKuxO2XZbFjDEoQeN1+9qx +GYSZWY+8nQUw9P1ZdugGSDoevtb+G+uguSstuu4oNfjxWxgVLO6pFIRoLKn2oo6f +TJBW4LxPWJ36Wd0rtI1K2Z0qmu1Ed0kgE5XcXoSusfwfiocv7k6e+BI16KNEHFgz +WVDOvUdDFkG3xtAqU4HAJzsLw4uBSqpjIAO3DdsgtR77TTElk0DND3IlSvoSR2xC +nyWP1GULYFRp40qeFJzc3X5hOZKQ28UM0lXd4ADZrssqhkOAfmjxCAtcqAgn5PEq +ExlDMCC+5HH9EGjW6MfPOWUBNlv/Mb8uDZ68HnbVIrRIoRMY1weeTYXtEd50iVdk +/j+oppY65sMSJW5fPSHVk+KZ1L0eXAlJp66ApgahjDhgaba7cqoxxXniW2zFFpvj +VGlSPWqbbPyezgd/h6qd3xjJi3p+ITpwC6VUUzBX2+xHmykx9I0UlacVx+ixIzlE +kqrL2Py2NGbJf03bUf4kJC7PTEb7FmpLCDR37tO3INPwjHvz2uPdjmgMOSEIlqgV +VWD9KajKLkdNa3d4w9XH/qXpOm8MIwQWR1TzEV5Ss0rAbVwTqABosuJ8yLEsazhC +VbZGGc+qqmfRHCY/15o6xnhAJ75ah2R2VtQJwaTgRTEVHhr0tdt3YixN+ZCHUFS8 +EkFxsUwx6AX2p7mXWsy7b7QqUnVzcyBBbGxiZXJ5IDxlYWdsZUB3aW5kbG9yZC5z +dGFuZm9yZC5lZHU+iQJBBDABCAArBQJT7td9JB0gU3lzdGVtIGFuZCBhZGRyZXNz +IG5vIGxvbmdlciBleGlzdAAKCRDRXTE4ggBBc+vnD/9C6STYLWhUE3OhAEq2SXqa +dKkeI0hI9KwMcLkLSohT0TNLfZgaxkSwsFgxrLBqVJh+bNsW64Pn/NIDDy/OQhTt +jc0XQF/b2pPiedw4unZ+H9TKwEKLkD7f+d0fLcTenMnq6dxcpOuo/ClS2Urte3K6 +S8Sexh0zfFD4xx4ZoxBcUiO1YnzPf/UZSnhmNU4+vn5/EikTwycBBNh8KEg4Zprx +W6gyUHv35O02mhvxuhfokwEhbIqncCuX3w09WItfCt3mgh3LiG4F29Klxx+4WMSI +F0LgDi+rei0Jkc+RwrqQo1AcfVtuQCS06IHp49oYDWwXvCw22xCyORaMZ+A4W/un +aXqbwhAH1Iq8WIih3EbGQdBPA+qjm0FIF5lGeOWeN4yX/VpPCz1cZzei58tw1axo +BOa+7K/0Msw40bg0IEbGvbl6b+619imCqcmUrb4AOUjPl3WE8miJQ4BokyFYzVpG +/tywM6x11fArw0p+xQrr6Tmsfs9fnCV5xRQxTqxzf7Qv/MNlNvS/n5iUQniYY+zC +o0/yKG5Hcrkto7gQ4K+0A5rB3CNOxJW2RqeM4yp2WMeNoZIFcoyQSHFHVN1Bms07 +J5hfbexJPCa2TWp50btSguq4DnPLT/xbFSZpZYJ6+ewl2sxfvpC8u6sKoMNk/RAP +PVjLZGpCi8jKIrfOghONE7QeUnVzcyBBbGxiZXJ5IDxlYWdsZUBleXJpZS5vcmc+ +iQJABBMBCAAqAhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheAAhkBBQJUGjF7BQkP +noU6AAoJENFdMTiCAEFzxrkP/0PawWUqeMG2wPxE7P5Geh1YmDEmPLmC/JYYgsJz +kvZ6QFgV46ovr50tehpZgGmvRHvlCJqTdDkVdYuiofixmC6NrJHP6EzhvyA7zEj1 +n7JoJNzls0r7qZeiM2PElKmlILtKZjip8NAYHAedsFDIfWoT+VSrZA7Q6YHwi9OZ +Px0fG6Aav+p1tmabdMb1lGjR/i1yJ02HLIY30FedGiuHff6q7t8xfyQxPbChPSQ8 +jZ/568EqC9Xq2Sow+ZS/v5F/GFWrBEcPWbx735JMtdKGQ//Pdc3LgK73lDrvHnnS +35C0/6qxB3h8Udjjsqk18FVeEX03yzvEc63fLZ7X2SIl1RdG5QOkt7SqBFkYX2tj +FSW7lMUnkaXZcI0P6kxRauCXP7I4zxH3KEXP5y+Whh5L1jye17MS4oFXy8WFAr3M +qEhtWVo26sTPSyhRzfSFKPY50rrBxLwNgcSxTnZcExx3994bCp3s3lXO6oZXG/xE +764ph8IiuEKUTTB6YH4oviXyHeQYkHPiPlx6nVSQz7vvjEPVa4t3EPQoqRmCZexm +9lstoYK+tr0UURgJPRuTE7C06jc203obIZtSabR7AYVq3pwq895aiDDtXrXBZHze +3ga/25AG9Ko3HpRe4wjCe+rGGlBsTXNSpOuluecGCQrXYXUvVylQc70olFya8g/U +J6CitCJSdXNzIEFsbGJlcnkgPHJyYUBjcy5zdGFuZm9yZC5lZHU+iQI9BBMBCAAn +AhsDBQsJCAcDBRUKCQgLBRYCAwEAAh4BAheABQJUGjGGBQkPnoU6AAoJENFdMTiC +AEFzrhsP/3sityoNG18CNtmTU7GGvLufi8Yy56GZ3AQ4Gc5uvRntl80iIz5WG9rN +3un34YlOanm8+Zy8Gijc9Q1bmy1DcqOjicnHJUHk0rbBGIev+FEZlprhM0vH5Pq4 +SolfFOL9S+POZFU/5ZaciqwmvAYY2ztURfCcfQDBCYYiFN44aT1rChHuheDpML+V +IRsXYU2/YXqGS9hRlAti2ItjrF1+apCk4dzHoQSgzpECF1X1+zYGMXfd/cVeZZ6h +rW3Ti07zW6cb2+j4X6HCPCj3UBUbUa+sWC3SYhylRgUuoHZFK1+G0capnmg3IUG1 +LLYMMKcxiPyXGugmC4ucuoCo2R21yLYuf+C350cQdHfkcMY1H3Tzu2va8mohkrLO +DtV+Tv4deT0riHLNXgGbWLzwQIorHJ6WXwkd1QCKuD1IjkI+SqKfbysbm/iUIN6O +Qcx8v07sDGI2LiVU7IdalZfCAlAEQ8/2GCfpV94J2oFDoQKMuS1dk7b6hwa6OqFm +hd3MsshK3GUE6zJ2hWVEE1mrzRrfKD69ipcEHcT31FpSM7Zg+g+tAi9BgNr7zEgL +4oeEqThl5v8tjrkRuNbWaa1HZuMopQ8YfOf1rD873rleWFBaIoO4eNGS6WR/pYFz +psVrHuR/F+ETiq/9x2EIoDFZXIm2wmZrwPeR97hkAHliHez8UDqxuQINBEofSuoB +EAC2bgxethdNvHU/fwoRR7iTfrx+0MG+D0BvetIF8XvZ+xUOJ31bgUfed4rJriZX +JAzeUSeoLtIlwwIuZV8RLMMp5PmBs/DHiH1kRbjXDsxxBWtmelxW1ZN/i1VT1R07 +8dgg/Lf+GY3kiYA6eFFm+vo1T7R21D2gvYSrGdUimzkSQP3l8kXi8AzypQrssbvh +GzKizjgpdPNjTo8yLbtVpSoZYpMuHkicV2d2nfAvwa6MTI/t/kLDLKP82n5qURXh +i3P+7fEmvrlL3u/pOYH7m3JRzRvSdaWhixxlSoirj+sd6ow6lfC0845XJWzxtJ1H +wKkbSz2z0eQHqlYmNSQR7/l7m/920llLTDmp/e0HZH3mpFpiG5lRIFtJ+N4J5JRy +KiV+vXFIBdB2XVSoiacjJd60BdjW2AzM8881Y2dJTqjLpA4fgLJeVuOmsjPTA5XZ ++q0GWIs0472OUKb/TeW1mycSN3Z69mLMwqXgr4DUu33goPWCIGuSUpzF+Cp59zJO +ia4rSipvZtudoyq6CacCRWE48esPKtdulGja9Ih/uv2XFWKtXlz9wqww6Ycu3dfQ +uH6Fom9Cp40IPc/VTG1Q95m9a7+D6u7TfJhRoBrdzECK5sYoGwsIBK54izsfCe4v +4KMxcmIQDpDPM6gYCEAmlmHov0pGIa/nijLu+VVpyT67BwARAQABiQIlBBgBCAAP +AhsMBQJQVi56BQkL2n4MAAoJENFdMTiCAEFzPUsP/io5fBiEFTa9b4mpyUrvxH5T +lsAUQqj2LZlbqR1ksdc+fUpH4A6y3X1lLyMHpS+rU1c3wagAqbspnmDJ03RCXgYI +zJanPND8z9nyPgjpgo02v3d+KFJCG0+b3sC6H0xjMSCUhWQgEXrl5clP3Oob5sIv +Gej/cu1zbwOCxxZXMAGIDypD7vVdNycDihXpTc78/eR5RtO8IpVqpMPc5X3omRQR +k4/RuBeXYg2LcXZPvEsMCY47UYkEF5EY/aT3j8g6ukc1b08m07zWZWAqLiawwUXz +uyZ9yCHq2HX5YmLqnQKMgr+PkSuCvGSZv2fq3PWM5BujgF6xsZ6hTuv4s0C0F2ih +qR+J2LLZfVP+wNzf9e+7mUif68yVVCSOS+fmWV4URWlPLMDMm8koBqfcJUqHN/hm +6F+3/Wn1Nwi0oulbvee3VcerWuhOwuBzxqOmz/SH4D7uz/qA7fmDa4uN4FiM/rw8 +09cRtFmoFw2HoO+ZuMO1Lof23Gh54mkYvu2XHbFleM9dXvUYzLj9qtUAyNdkeU28 +6/vfrPGzCyJ2oK9wfTx6IUJdaPleT3I1fctyOjFxy7IVnF8se03YMnGTT7Gw5EGY +upsGH3R4R5XlXUDHyGpCoEQEhGbhwYsLp7Lmcgvq0vIo4opXhLuwdE0k9RPpHWrV +a3CoFgRugJegZkLx4Rw0iQIlBBgBCAAPAhsMBQJUGjGdBQkPnoEuAAoJENFdMTiC +AEFzDygP/0Iwj+eHVGKTv0Eqjt6M8hIXmSFaF6VCVKhDLtkUuKzhzPvWHH8nT6DF +f2S8x9y7te7bFgmKp/FAoS6Hc9ZaHg7Qbdt12EUyBXUyXZLAlGwerj/4z5g72/Bj +/1iirU7C/VjnivhwehWBG74H6eIVUtEGwm6KMyEuTgyvqqn3iMdfIxWtRGUuI8Sx +sTMXVpBq+gJcXXhyvoz3rp3L+HBBb57XbZh66GXYKHj+MnV/+QXTYcTL50MJQp1E +eArxRDfX6RjMK/6ieRSVp/rFLKcbz3bWQk3ruCmuYY5R6WwtWS40nZPtF0SpEQDW +QdR7xofUdhgsvfU0WVnV5qWNd0nK70azaxOtX4HLse99y2UQ2nhhrUevystbYRBe +O+48W2P9+hCkub11NMof9S7bwgkQXugJQkHDQYSKwvs3eISgalManaThbgD2M3fs +dPX9i54wgy3iMa5HSQjyMVthFs+Y2zcmKT1AV+cprbWetIUrsQFRYc6qn5kUtZfv +e9xN241SmdDD3oTuffrTynb2f6Q9sqmoclP/Z+uIRVfppY/fkrbWC6PgW/oLYhcH +/k96GGRmVdmR/WIrra3fIZi7MzklhjUhX++y4+onOkCbKY2mHY4YiGMCCltgtC+5 +MH+uOZkhdpKrfFwMCbQsJGp7KUsPvmiLSBNqOi64O1SZUv3b0ZFuuQENBEyT+CQB +CADAF/t1iKQMw8Dawaz+GSr1Z8Vh854+AHZw45wwWjpaL1lFEE4VqoDXc6Z4HDPG +pZpSXf5KeoFjR0P5SOD66NWPl8CUIjY7fyDAFXNc1n+/3lHc7Vt/uIu2TDBGA64I +l0z1r4oyhTjs5djZp7QUoWiT7UFyLWpnpvIeSsgg+MrfMN5ISxk6XFRFKShpB2v/ +bmpwl4hlnV5wprN+3o8ua5NpeOoNfKY+3QB2yXxDKkiZI0trh7zT2XVUahrogKKX +aM39RVTANKZLoikSP+43u8/NuUNcUZBPI0VAXT42d/yOsHatsP7wdSwa98FepYrL +YXnW14cJjQ/fGwkrOY7qEvatABEBAAGJA0QEGAEIAA8CGwIFAlFE6UkFCQaSJH0B +KcBdIAQZAQgABgUCTJP4JAAKCRB9gDFcVzbedSoBCAC/0quTFPncM+oeSUEOyIDf +nln/GXvz1t3ahQQUWyQB7JcagiK12zZLqJNsJMGLPNO7yXVWjjVT0Ai4cY2O9QdH +CsWUBvxppeJECJr8gl4G8j2S5a4CtfnLrdC39M3V0lVdWbvazYupthZJ4BhLAPSV +sn6d94f0AtP9x6ViTtkJKJAHSDx1EUkE2wFWRFOcztFJxQuvdD1Fceskr11w8Jt9 +CMK4DGEj133cXWJKfcn/5XeuBlFdlR0i1S5aLHDCLQUTP6BiP885pnga1NsakX0P +WVHU7NY1tsMTSyWwU8F0Qv+o1XQsP9d9F1mHZwRbN/Hlig7M/54PxJgL3SEeQvaT +CRDRXTE4ggBBc6CaEACDmPa4HLu2zhph86RaOOi+Yl8Gncf34rZWC3ya7YiNCTuT +YtXzAEmfscHKJQCrbCo+n4o3Y7z1MTDqUmybaEGgtZ2USyg7MdpAaEtiaMN8eQGo +lfChOXAKaifvsrahCT3lS+rH1bHKXJ8TTznePUQbiaQb355sMWwsuBFBR4Wqe83f +I25zSbODnmrd/eunGO6Add2dJNzMd5yV2YtklXghadPRsoxst7GjO3UwNN6vUc1W +QfCvmh8PtALVYQ1Wn83/mDylnYguuQbUfJLaLxYEVRbmdO//6RdYiCdTi+mQYyM+ +4omi60hnpE91vdZzJEH7SPPX3wjWry9oRdBRFhwhoDk5nFGuBnCvEr07d86ETkRV +K27PJwN9z0T/1uK7uQ9LcqvfNXbQg3O/rMKf9+MjVMGOKJII8sRgbRCg/IRPsRWy +VQKmtMIOi4jYdn6ORHEyyHrPuRzL/hD8/1DKFmcZP8csjym6ZhVkPewx9VtiF6ui +CFOiCG6wf1sSZMM+VoNPLwEjywvAspRU7hYXfgRHxYXQIc5A1UDzuMip2sM8oOnt +RnWgrGz5Xcn2RLjxAD+fN6Osr3P7KRYENsE7jd0XxRk1ijuQkz3GYY0iC6qMZwIu +tva40dtrHANE9HY7nCodEgw4t+swEbru2KPRa2E2CnC5QrjUxm14h0ngLqaR14kD +RAQYAQgADwIbAgUCUjdJ1gUJB4SFKAEpwF0gBBkBCAAGBQJMk/gkAAoJEH2AMVxX +Nt51KgEIAL/Sq5MU+dwz6h5JQQ7IgN+eWf8Ze/PW3dqFBBRbJAHslxqCIrXbNkuo +k2wkwYs807vJdVaONVPQCLhxjY71B0cKxZQG/Gml4kQImvyCXgbyPZLlrgK1+cut +0Lf0zdXSVV1Zu9rNi6m2FkngGEsA9JWyfp33h/QC0/3HpWJO2QkokAdIPHURSQTb +AVZEU5zO0UnFC690PUVx6ySvXXDwm30IwrgMYSPXfdxdYkp9yf/ld64GUV2VHSLV +LloscMItBRM/oGI/zzmmeBrU2xqRfQ9ZUdTs1jW2wxNLJbBTwXRC/6jVdCw/130X +WYdnBFs38eWKDsz/ng/EmAvdIR5C9pMJENFdMTiCAEFzAUwQAJ2yg5nEQyOBEFKU ++Ku4Wxs5TeFgUvcD+Z/tqzfX+i9lXxVFb4wUbGGBrO9762KfpINgAgPwJQcOO1kP +oipNTsFBXUMei8U13TQDOvQ22gC8wSdhQttwv9MXMrBfXJkmYL8EJlsBhxAikguU +sIFyg2GiHY7jIODnfi3KLwYflnz0iTguG2d0/kygUcX7MvlskjxvSizESAo1nf+o +hC1i57vM6grKVt5nqdrTefZGPUzbF3lRjmXWr/R4GrhJLVqAUoTctWRX00nLfDkT +cmirVz4AAdRxKEe8fcU7138b27bkiCwmLDFB2PiN/ww6S/lK1tydLvvbjgm3BjIG +MZN3UESN5jpeL4oTN5HKUk69CX3sUKx4I52h4BzdNcRl2lp+e6/f5emLaO5WEeg/ +L7Ob5SmgDZnamusBoT2LxJpCT3cPkutwGfkmFIjrS85QcXxaLc5m/BmDcjo7sGJ7 +Q2pzPu/N8qCRlPmNf4YnQnjZXLVio35G7gVCHx5+Si8VkORbHDdFnVeFzKnt6cvC +THJ2OroosJWBDYLrlj/fi+XTaubBEgp/eP8YjOxoSvrNhWb0MZvwFR80wC9gtO5T +KfaH68U2bYjC+PwFDaGQ4OuanXi0jhYy6nWE0OnXJWKYLnPtdJGxyH1VEQ5feTYg +Y2jG+XDcQWmoPemXd8Pmpc1UVjR3iQNEBBgBCAAPAhsCBQJTJg87BQkIc0qNASnA +XSAEGQEIAAYFAkyT+CQACgkQfYAxXFc23nUqAQgAv9KrkxT53DPqHklBDsiA355Z +/xl789bd2oUEFFskAeyXGoIitds2S6iTbCTBizzTu8l1Vo41U9AIuHGNjvUHRwrF +lAb8aaXiRAia/IJeBvI9kuWuArX5y63Qt/TN1dJVXVm72s2LqbYWSeAYSwD0lbJ+ +nfeH9ALT/celYk7ZCSiQB0g8dRFJBNsBVkRTnM7RScULr3Q9RXHrJK9dcPCbfQjC +uAxhI9d93F1iSn3J/+V3rgZRXZUdItUuWixwwi0FEz+gYj/POaZ4GtTbGpF9D1lR +1OzWNbbDE0slsFPBdEL/qNV0LD/XfRdZh2cEWzfx5YoOzP+eD8SYC90hHkL2kwkQ +0V0xOIIAQXOzww//dNP7VA0V/ulh6yTO+FKGNiL3Tf9hggNPWUnxzjOz6xMuBWeX +OZ2NViXiglYMZQCyuTH8u+j8dANCpA3yUnj0JQgOFXSNLGBak0ockVABuX9u89o3 +QsXX70CQkBb0FpSYn8rg8JCmfBza9iwp6J9ou4i9yBV/hlYr7cKwtB7mlVdK/Vkd +TgNlD6YWenrE0fxpHqXaYt77OedUrEtoXgUNfM9w8SgFr/T4f6R90He5BBlv9H4m +AytAnuv6ojuAIU6SUB/KlgHil1KnuKwK/0x7/H4SmNTqLCbUmi3iQrHD3kdgwRBd +Vc1nk1MV+9fwltFE1KP1fA/W5ZMpsQo1R8+mEqtDgLwhmeq/fA50PMbTOebHyhkt +rtD6UNsWA+FDo359DPIqDMF18K7bn1RJu2xyINKjCVOaj5a6vjrQPvA6oAdZ0dr6 +XQyK5Z5+NHRxRYyn/HHx6JhBCvxcElr6cQ5fbK7KhKor2KT/S6ewS0rb0IswICWb +beUMw5M/gpZ9VNu1JIdXNbfu6SaK6XGnSGnXfe3p0Ewxc7LCnmGr0R03IhKKNdgv +LdJRD7ptvcO1TQOsZ/IVVaf+kjpp0Pto2GgUdWgwBvbduCMJI9OIuBY4gCpkUunV +M3/Yif9ynufRF0sDy2ERNuYrAv/P208c0XLSQyeqNCXB2Wvm4D0aM1jPL++JA0QE +GAEIAA8CGwIFAlUNtrYFCQpa8fsBKcBdIAQZAQgABgUCTJP4JAAKCRB9gDFcVzbe +dSoBCAC/0quTFPncM+oeSUEOyIDfnln/GXvz1t3ahQQUWyQB7JcagiK12zZLqJNs +JMGLPNO7yXVWjjVT0Ai4cY2O9QdHCsWUBvxppeJECJr8gl4G8j2S5a4CtfnLrdC3 +9M3V0lVdWbvazYupthZJ4BhLAPSVsn6d94f0AtP9x6ViTtkJKJAHSDx1EUkE2wFW +RFOcztFJxQuvdD1Fceskr11w8Jt9CMK4DGEj133cXWJKfcn/5XeuBlFdlR0i1S5a +LHDCLQUTP6BiP885pnga1NsakX0PWVHU7NY1tsMTSyWwU8F0Qv+o1XQsP9d9F1mH +ZwRbN/Hlig7M/54PxJgL3SEeQvaTCRDRXTE4ggBBc38kD/9I56ymfjvMM9JfzqsK +J5w2CtDkNdTrEQuE2xXESQoI+wBjKjU/vzgMCnc6Xk55jJeov3xH2QCqJKXeT2ra +/PGVrF1Wm7ZATJWw+MHIWlDVGn6T3h/LInVv6kuTsUmYiaSrIFRZSR6QUgQWmAYt +wLCJiuPoKvKCmyxzVV4z7184RGy3OVrGqQgYT6S5jslZB0dJdDvJ7coLn6QakHmy +KKgx7oSwMg+WBrCDEV9Hv+/c3NNfhNOhjM6+X2qADN7ME0wynlRJdkxvz9Cz7MXk +PsahjV4jQ+lI5hgYejBCp4DwN3RMy8ZCRLd9l8WlXTuKCek/gNZ5kt+al2ekt4Ws +T1IWhHIykZVyIGfYbSXskQaAv5GjPM428DiI2J80wT1XRbJUTjKoX8Aq5PJfmhWf +uKfRdWYAI+2MMeSAZvZLT+ZMIsaDHBIkfKld6zUvwgHV/a7QB2OpQOvwMFLQpu51 +oIEOGjGA+yinTHloLPWBcOQgCjloIsM/jiydVp4McZv9bEpsu7l1kZGcoKpoE3Ko +eQeElLhmU1qN4ipjjignDQcJXZRgHC3utqtMLssR4UwBeFvY9uzLa7iRy9jy0oE2 +SW90ksztbX//BfwFvDveYSqGDzZplE11PxYrOrYI04WS9UUvJUXEPfjqmxwmWkgn +gucsGHfnmDbhd4T1qasSkFL5PQ== +=8bOz -----END PGP PUBLIC KEY BLOCK----- diff -Nru libpam-afs-session-2.5/debian/watch libpam-afs-session-2.6/debian/watch --- libpam-afs-session-2.5/debian/watch 2014-04-13 19:51:17.000000000 +0000 +++ libpam-afs-session-2.6/debian/watch 2015-09-19 18:49:01.000000000 +0000 @@ -1,3 +1,3 @@ version=3 opts=pgpsigurlmangle=s/$/.asc/ \ - http://archives.eyrie.org/software/afs/pam-afs-session-(.*)\.tar\.gz + http://archives.eyrie.org/software/afs/pam-afs-session-(.*)\.tar\.xz diff -Nru libpam-afs-session-2.5/examples/redhat/system-auth libpam-afs-session-2.6/examples/redhat/system-auth --- libpam-afs-session-2.5/examples/redhat/system-auth 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/examples/redhat/system-auth 2015-09-19 18:25:37.000000000 +0000 @@ -7,6 +7,14 @@ # from both the auth and session groups. program could also be set while # building pam_afs_session or in /etc/krb5.conf (if built with Kerberos # support). +# +# Copyright 2008 +# 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. auth required /lib/security/$ISA/pam_env.so auth sufficient /lib/security/$ISA/pam_unix.so likeauth nullok diff -Nru libpam-afs-session-2.5/examples/solaris/pam.conf libpam-afs-session-2.6/examples/solaris/pam.conf --- libpam-afs-session-2.5/examples/solaris/pam.conf 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/examples/solaris/pam.conf 2015-09-19 18:25:37.000000000 +0000 @@ -16,6 +16,14 @@ # Maciej Malek # Network Administrator # Ericpol Telecom, Poland +# +# Copyright 2008 +# 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. # Graphical login. This *requires* Kerberos login. diff -Nru libpam-afs-session-2.5/internal.h libpam-afs-session-2.6/internal.h --- libpam-afs-session-2.5/internal.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/internal.h 2015-09-19 18:25:37.000000000 +0000 @@ -1,7 +1,7 @@ /* * Internal prototypes and structures for pam-afs-session. * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2008, 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -17,10 +17,12 @@ #endif #include #include +#include #include /* Forward declarations to avoid unnecessary includes. */ +struct pam_args; struct passwd; struct vector; @@ -58,8 +60,8 @@ void pamafs_free(struct pam_args *); /* Token manipulation functions. */ -int pamafs_token_get(struct pam_args *args); -int pamafs_token_delete(struct pam_args *args); +int pamafs_token_get(struct pam_args *, bool reinitialize); +int pamafs_token_delete(struct pam_args *); /* Undo default visibility change. */ #pragma GCC visibility pop diff -Nru libpam-afs-session-2.5/kafs/kafs.c libpam-afs-session-2.6/kafs/kafs.c --- libpam-afs-session-2.5/kafs/kafs.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/kafs.c 2015-09-19 18:25:37.000000000 +0000 @@ -16,7 +16,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2009 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/kafs/sys-darwin10.c libpam-afs-session-2.6/kafs/sys-darwin10.c --- libpam-afs-session-2.5/kafs/sys-darwin10.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/sys-darwin10.c 2015-09-19 18:25:37.000000000 +0000 @@ -12,7 +12,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2009, 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/kafs/sys-darwin8.c libpam-afs-session-2.6/kafs/sys-darwin8.c --- libpam-afs-session-2.5/kafs/sys-darwin8.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/sys-darwin8.c 2015-09-19 18:25:37.000000000 +0000 @@ -14,7 +14,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2009, 2010 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/kafs/sys-linux.c libpam-afs-session-2.6/kafs/sys-linux.c --- libpam-afs-session-2.5/kafs/sys-linux.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/sys-linux.c 2015-09-19 18:25:37.000000000 +0000 @@ -13,7 +13,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2009 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/kafs/sys-solaris.c libpam-afs-session-2.6/kafs/sys-solaris.c --- libpam-afs-session-2.5/kafs/sys-solaris.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/sys-solaris.c 2015-09-19 18:25:37.000000000 +0000 @@ -13,7 +13,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2009, 2010 * The Board of Trustees of the Leland Stanford Junior University * @@ -77,7 +77,7 @@ int fd, code, oerrno, callnum; #ifdef _ILP32 - struct afssysargs32 syscall_data; + struct afssysargs syscall_data; syscall_data.syscall = call; syscall_data.param1 = param1; @@ -86,9 +86,9 @@ syscall_data.param4 = param4; syscall_data.param5 = 0; syscall_data.param6 = 0; - callnum = _IOW('C', 2, struct afssysargs32); + callnum = _IOW('C', 2, struct afssysargs); #else - struct afssysargs syscall_data; + struct afssysargs64 syscall_data; syscall_data.syscall = call; syscall_data.param1 = param1; @@ -97,7 +97,7 @@ syscall_data.param4 = param4; syscall_data.param5 = 0; syscall_data.param6 = 0; - callnum = _IOW('C', 1, struct afssysargs); + callnum = _IOW('C', 1, struct afssysargs64); #endif fd = open("/dev/afs", O_RDWR); diff -Nru libpam-afs-session-2.5/kafs/sys-syscall.c libpam-afs-session-2.6/kafs/sys-syscall.c --- libpam-afs-session-2.5/kafs/sys-syscall.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/kafs/sys-syscall.c 2015-09-19 18:25:37.000000000 +0000 @@ -13,7 +13,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 diff -Nru libpam-afs-session-2.5/LICENSE libpam-afs-session-2.6/LICENSE --- libpam-afs-session-2.5/LICENSE 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/LICENSE 2015-09-19 18:25:37.000000000 +0000 @@ -1,240 +1,270 @@ -The pam-afs-session package as a whole is: +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Comment: This file documents the copyright statements and licenses for + every file in this package in a machine-readable format. For a less + detailed, higher-level overview, see README. + . + For any copyright year range specified as YYYY-ZZZZ in this file, the + range specifies every single year in that closed interval. +Copyright: 2000-2001, 2004, 2006-2015 Russ Allbery + 2001-2002, 2004-2014 + The Board of Trustees of the Leland Stanford Junior University +License: Expat + +Files: * +Copyright: 2000-2001, 2004, 2006-2015 Russ Allbery + 2001-2002, 2004-2014 + The Board of Trustees of the Leland Stanford Junior University +License: Expat + +Files: Makefile.in +Copyright: 1994-2014 Free Software Foundation, Inc. + 2006-2007, 2010-2011 + The Board of Trustees of the Leland Stanford Junior University + 2015 Russ Allbery +License: FSF-unlimited and Expat + +Files: aclocal.m4 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 + m4/lt~obsolete.m4 +Copyright: 1996-2015 Free Software Foundation, Inc. +License: FSF-unlimited + +Files: build-aux/ar-lib build-aux/compile build-aux/depcomp + build-aux/missing +Copyright: 1996-2014 Free Software Foundation, Inc. +License: GPL-2+ with Autoconf exception or Expat + +Files: build-aux/config.guess build-aux/config.sub +Copyright: 1992-2015 Free Software Foundation, Inc. +License: GPL-3+ with Autoconf exception or Expat + +Files: build-aux/install-sh +Copyright: 1994 X Consortium +License: X11 + 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 X CONSORTIUM 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. + . + Except as contained in this notice, the name of the X Consortium shall + not be used in advertising or otherwise to promote the sale, use or other + dealings in this Software without prior written authorization from the X + Consortium. + +Files: build-aux/ltmain.sh +Copyright: 1996-2001, 2003-2011 Free Software Foundation, Inc. +License: GPL-2+ with Libtool exception or Expat + +Files: configure +Copyright: 1992-2012 Free Software Foundation, Inc. +License: FSF-configure, and GPL-2+ with Libtool exception or Expat + +Files: configure.ac m4/clang.m4 m4/kafs.m4 m4/krb5-config.m4 m4/krb5.m4 + m4/ld-version.m4 m4/lib-depends.m4 m4/lib-pathname.m4 m4/pam-const.m4 + m4/snprintf.m4 +Copyright: 2005-2014 + The Board of Trustees of the Leland Stanford Junior University + 2007, 2015 Russ Allbery + 2007-2008 Markus Moeller + 2008-2010 Free Software Foundation, Inc. +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 + notice is preserved. + +Files: examples/redhat/system-auth examples/solaris/pam.conf + pam_afs_session.5 pam_afs_session.pod tests/README tests/fakepam/README +Copyright: 2005-2011 + The Board of Trustees of the Leland Stanford Junior University + 2010-2012, 2015 Russ Allbery +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: kafs/sys-syscall.c pam-util/vector.c pam-util/vector.h + portable/asprintf.c portable/dummy.c portable/issetugid.c + portable/k_haspag.c portable/krb5-extra.c portable/krb5.h + portable/macros.h portable/pam.h portable/pam_syslog.c + portable/pam_vsyslog.c portable/reallocarray.c portable/stdbool.h + portable/strlcat.c portable/strlcpy.c portable/strndup.c portable/system.h + tests/pam-util/vector-t.c tests/portable/asprintf-t.c + tests/portable/strlcat-t.c tests/portable/strlcpy-t.c + tests/portable/strndup-t.c +Copyright: no copyright notice, see License +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: m4/libtool.m4 +Copyright: 1996-2001, 2003-2011 Free Software Foundation, Inc. +License: FSF-unlimited, and GPL-2+ with Libtool exception or Expat + +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 MERCHANTIBILITY 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 + 2001 Hrvoje Niksic + 2009-2010 The Board of Trustees of the Leland Stanford Junior University +License: Powell-snprintf + 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 + +License: Expat + 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. + +License: FSF-configure + This script is free software; the Free Software Foundation gives unlimited + permission to copy, distribute and modify it. + +License: FSF-unlimited + 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. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +License: GPL-2+ with Autoconf exception + 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 the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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 . + . + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a configuration + script generated by Autoconf, you may include it under the same + distribution terms that you use for the rest of that program. +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. + +License: GPL-2+ with Libtool exception + This file is part of GNU Libtool. + . + GNU Libtool is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + As a special exception to the GNU General Public License, if you + distribute this file as part of a program or library that is built using + GNU Libtool, you may include this file under the same distribution terms + that you use for the rest of that program. + . + GNU Libtool is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + Public License for more details. +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. + +License: GPL-3+ with Autoconf exception + 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 the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + . + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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 . + . + As a special exception to the GNU General Public License, if you + distribute this file as part of a program that contains a configuration + script generated by Autoconf, you may include it under the same + distribution terms that you use for the rest of that program. This + Exception is an additional permission under section 7 of the GNU General + Public License, version 3 ("GPLv3"). +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. - Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 - The Board of Trustees of the Leland Stanford Junior University - -and covered under the following license: - - 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 Stanford University not - be used in advertising or publicity pertaining to distribution of the - software without specific, written prior permission. Stanford - University 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. - -All individual files without an explicit exception below are released -under this license. Some files may have additional copyright holders as -noted in those files. - -Some files in this distribution are individually released under different -licenses, all of which are compatible with the above general package -license but which may require preservation of additional notices. All -required notices are preserved in this file. - -Collected copyright notices for the entire package: - - Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 - The Board of Trustees of the Leland Stanford Junior University - Copyright 2007, 2008, 2009, 2010, 2011 Russ Allbery - Copyright 2007, 2008 Markus Moeller - Copyright 1985-2005 Massachusetts Institute of Technology - Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. - Copyright 1994 X Consortium - -The files kafs/sys-syscall.c, pam-util/vector.c, pam-util/vector.h, -portable/asprintf.c, portable/dummy.c, portable/issetuidgid.c, -portable/k_haspag.c, portable/krb5-extra.c, portable/krb5.h, -portable/macros.h, portable/pam.h, portable/pam_syslog.c, -portable/pam_vsyslog.c, portable/stdbool.h, portable/strlcat.c, -portable/strlcpy.c, portable/strndup.c, portable/system.h, -tests/pam-util/vector-t.c, tests/portable/asprintf-t.c, -tests/portable/strlcat-t.c, tests/portable/strlcpy-t.c, and -tests/portable/strndup-t.c are covered by the following statement: - - 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. - -In other words, you can do anything you wish with this code, although I -would strongly prefer that any improvements or modifications be sent to me -(rra@stanford.edu) so that I can continue to maintain a canonical version. - -The files configure.ac, m4/kafs.m4, m4/krb5.m4, m4/ld-version.m4 -m4/lib-depends.m4, m4/lib-pathname.m4, m4/pam-const.m4, and m4/snprintf.m4 -are released under the following copyright and license: - - Copyright 2005, 2006, 2007, 2008, 2009, 2010 - The Board of Trustees of the Leland Stanford Junior University - Copyright 2007, 2008 Markus Moeller - Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc. - - This file is free software; the authors give unlimited permission to - copy and/or distribute it, with or without modifications, as long as - this notice is preserved. - -portable/krb5-profile.c is taken from the MIT Kerberos distribution and is -covered by the following copyright and license: - - 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 MERCHANTIBILITY 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). - -The files Makefile.in and aclocal.m4 are generated by GNU Automake and -released under the following copyright and license: - - Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY, to the extent permitted by law; without - even the implied warranty of MERCHANTABILITY or FITNESS FOR A - PARTICULAR PURPOSE. - -The files m4/libtool.m4, m4/ltoptions.m4, m4/ltsugar.m4, m4/ltversion.m4, -and m4/lt~obsolete.m4 are from GNU Libtool and are released under the -following copyright and license: - - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, - 2007, 2008 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. - -The file configure is generated by GNU Autoconf and is covered by the -following copyright and license: - - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software - Foundation, Inc. This configure script is free software; the Free - Software Foundation gives unlimited permission to copy, distribute and - modify it. - -The files build-aux/depcomp and build-aux/missing are taken from GNU -Automake. The files build-aux/config.guess and build-aux/config.sub are -taken from the Debian autotools-dev package. All of these files are -released under the following copyright and license: - - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2002, - 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, - Inc. - - 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 the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - As a special exception to the GNU General Public License, if you - distribute this file as part of a program that contains a configuration - script generated by Autoconf, you may include it under the same - distribution terms that you use for the rest of that program. - -For the pam-afs-session distribution, the option described in the last -paragraph has been accepted and these files are distributed under the same -terms as the pam-afs-session package as a whole, as described at the top -of this file. - -The file build-aux/ltmain.sh is taken from GNU Libtool and is released -under the following copyright and license: - - Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, - 2006, 2007, 2008 Free Software Foundation, Inc. - - GNU Libtool is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - As a special exception to the GNU General Public License, - if you distribute this file as part of a program or library that - is built using GNU Libtool, you may include this file under the - same distribution terms that you use for the rest of that program. - - GNU Libtool is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - -For the pam-afs-session distribution, the option described in the -second-to-last paragraph has been accepted and this file is distributed -under the same terms as the pam-afs-session package as a whole, as -described at the top of this file. - -The file build-aux/install-sh is covered by the following copyright and -license: - - Copyright (C) 1994 X Consortium. - - 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 X CONSORTIUM 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. - - Except as contained in this notice, the name of the X Consortium shall - not be used in advertising or otherwise to promote the sale, use or - other dealings in this Software without prior written authorization - from the X Consortium. - - FSF changes to this file are in the public domain. diff -Nru libpam-afs-session-2.5/m4/clang.m4 libpam-afs-session-2.6/m4/clang.m4 --- libpam-afs-session-2.5/m4/clang.m4 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/m4/clang.m4 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,26 @@ +dnl Determine whether the current compiler is Clang. +dnl +dnl If the current compiler is Clang, set the shell variable CLANG to yes. +dnl +dnl The canonical version of this file is maintained in the rra-c-util +dnl package, available at . +dnl +dnl Copyright 2015 Russ Allbery +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 Source used by RRA_PROG_CC_CLANG. +AC_DEFUN([_RRA_PROG_CC_CLANG_SOURCE], [[ +#if ! __clang__ +#error +#endif +]]) + +AC_DEFUN([RRA_PROG_CC_CLANG], +[AC_CACHE_CHECK([if the compiler is Clang], [rra_cv_prog_cc_clang], + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_RRA_PROG_CC_CLANG_SOURCE])], + [rra_cv_prog_cc_clang=yes], + [rra_cv_prog_cc_clang=no])]) + AS_IF([test x"$rra_cv_prog_cc_clang" = xyes], [CLANG=yes])]) diff -Nru libpam-afs-session-2.5/m4/kafs.m4 libpam-afs-session-2.6/m4/kafs.m4 --- libpam-afs-session-2.5/m4/kafs.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/kafs.m4 2015-09-19 18:25:37.000000000 +0000 @@ -34,7 +34,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery +dnl Written by Russ Allbery dnl Copyright 2008, 2009, 2010 dnl The Board of Trustees of the Leland Stanford Junior University dnl @@ -156,12 +156,12 @@ [rra_afs_root="$withval"])]) AC_ARG_WITH([afs-include], [AS_HELP_STRING([--with-afs-include=DIR], - [Location of Kerberos v5 headers])], + [Location of AFS headers])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_afs_includedir="$withval"])]) AC_ARG_WITH([afs-lib], [AS_HELP_STRING([--with-afs-lib=DIR], - [Location of Kerberos v5 libraries])], + [Location of AFS libraries])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_afs_libdir="$withval"])]) @@ -170,7 +170,7 @@ AC_CHECK_HEADERS([sys/ioccom.h]) AS_IF([test x"$rra_libkafs" != xfalse], [_RRA_LIB_KAFS_PATHS - AS_IF([test x"$rra_use_kerberos" = xtrue], + AS_IF([test x"$rra_use_KRB5" = xtrue], [RRA_LIB_KRB5_SWITCH]) RRA_LIB_KAFS_SWITCH AC_CHECK_LIB([kafs], [k_hasafs], @@ -185,7 +185,7 @@ AC_CHECK_FUNCS([k_pioctl]) AC_REPLACE_FUNCS([k_haspag]) RRA_LIB_KAFS_RESTORE - AS_IF([test x"$rra_use_kerberos" = xtrue], + AS_IF([test x"$rra_use_KRB5" = xtrue], [RRA_LIB_KRB5_RESTORE])]) dnl If we found a libkafs, we have k_hasafs. Set the appropriate diff -Nru libpam-afs-session-2.5/m4/krb5-config.m4 libpam-afs-session-2.6/m4/krb5-config.m4 --- libpam-afs-session-2.5/m4/krb5-config.m4 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/m4/krb5-config.m4 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,101 @@ +dnl Use krb5-config to get link paths for Kerberos libraries. +dnl +dnl Provides one macro, RRA_KRB5_CONFIG, which attempts to get compiler and +dnl linker flags for a library via krb5-config and sets the appropriate shell +dnl variables. Defines the Autoconf variable PATH_KRB5_CONFIG, which can be +dnl used to find the default path to krb5-config. +dnl +dnl Depends on RRA_ENABLE_REDUCED_DEPENDS. +dnl +dnl The canonical version of this file is maintained in the rra-c-util +dnl package, available at . +dnl +dnl Written by Russ Allbery +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 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, +dnl meaning it will only be run once even if we link with multiple krb5-config +dnl libraries. +AC_DEFUN([_RRA_KRB5_CONFIG_PATH], +[AC_ARG_VAR([PATH_KRB5_CONFIG], [Path to krb5-config]) + AC_PATH_PROG([PATH_KRB5_CONFIG], [krb5-config], [], + [${PATH}:/usr/kerberos/bin])]) + +dnl Check whether the --deps flag is supported by krb5-config. Takes the path +dnl to krb5-config to use. Note that this path is not embedded in the cache +dnl variable, so this macro implicitly assumes that we will always use the +dnl same krb5-config program. +AC_DEFUN([_RRA_KRB5_CONFIG_DEPS], +[AC_REQUIRE([_RRA_KRB5_CONFIG_PATH]) + AC_CACHE_CHECK([for --deps support in krb5-config], + [rra_cv_krb5_config_deps], + [AS_IF(["$1" 2>&1 | grep deps >/dev/null 2>&1], + [rra_cv_krb5_config_deps=yes], + [rra_cv_krb5_config_deps=no])])]) + +dnl Obtain the library flags for a particular library using krb5-config. +dnl Takes the path to the krb5-config program to use, the argument to +dnl krb5-config to use, and the variable prefix under which to store the +dnl library flags. +AC_DEFUN([_RRA_KRB5_CONFIG_LIBS], +[AC_REQUIRE([_RRA_KRB5_CONFIG_PATH]) + AC_REQUIRE([RRA_ENABLE_REDUCED_DEPENDS]) + _RRA_KRB5_CONFIG_DEPS([$1]) + AS_IF([test x"$rra_reduced_depends" = xfalse \ + && test x"$rra_cv_krb5_config_deps" = xyes], + [$3[]_LIBS=`"$1" --deps --libs $2 2>/dev/null`], + [$3[]_LIBS=`"$1" --libs $2 2>/dev/null`])]) + +dnl Attempt to find the flags for a library using krb5-config. Takes the +dnl following arguments (in order): +dnl +dnl 1. The root directory for the library in question, generally from an +dnl Autoconf --with flag. Used by preference as the path to krb5-config. +dnl +dnl 2. The argument to krb5-config to retrieve flags for this particular +dnl library. +dnl +dnl 3. The variable prefix to use when setting CPPFLAGS and LIBS variables +dnl based on the result of krb5-config. +dnl +dnl 4. Further actions to take if krb5-config was found and supported that +dnl library type. +dnl +dnl 5. Further actions to take if krb5-config could not be used to get flags +dnl for that library type. +dnl +dnl Special-case a krb5-config argument of krb5 and run krb5-config without an +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[]_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"]) + 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], + [rra_cv_lib_$3[]_config=yes], + [rra_cv_lib_$3[]_config=no])]) + AS_IF([test "$rra_cv_lib_$3[]_config" = yes], + [$3[]_CPPFLAGS=`"$rra_krb5_config_$3" --cflags $2 2>/dev/null` + _RRA_KRB5_CONFIG_LIBS([$rra_krb5_config_$3], [$2], [$3]) + rra_krb5_config_$3[]_ok=yes], + [AS_IF([test x"$2" = xkrb5], + [$3[]_CPPFLAGS=`"$rra_krb5_config_$3" --cflags 2>/dev/null` + $3[]_LIBS=`"$rra_krb5_config_$3" --libs $2 2>/dev/null` + rra_krb5_config_$3[]_ok=yes])])]) + AS_IF([test x"$rra_krb5_config_$3[]_ok" = xyes], + [$3[]_CPPFLAGS=`echo "$$3[]_CPPFLAGS" | sed 's%-I/usr/include %%'` + $3[]_CPPFLAGS=`echo "$$3[]_CPPFLAGS" | sed 's%-I/usr/include$%%'` + $4], + [$5])]) diff -Nru libpam-afs-session-2.5/m4/krb5.m4 libpam-afs-session-2.6/m4/krb5.m4 --- libpam-afs-session-2.5/m4/krb5.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/krb5.m4 2015-09-19 18:25:37.000000000 +0000 @@ -1,50 +1,78 @@ -dnl Find the compiler and linker flags for Kerberos v5. +dnl Find the compiler and linker flags for Kerberos. dnl -dnl Finds the compiler and linker flags for linking with Kerberos v5 -dnl libraries. Provides the --with-krb5, --with-krb5-include, and -dnl --with-krb5-lib configure options to specify non-standard paths to the -dnl Kerberos libraries. Uses krb5-config where available unless reduced -dnl dependencies is requested. +dnl Finds the compiler and linker flags for linking with Kerberos libraries. +dnl Provides the --with-krb5, --with-krb5-include, and --with-krb5-lib +dnl configure options to specify non-standard paths to the Kerberos libraries. +dnl Uses krb5-config where available unless reduced dependencies is requested +dnl or --with-krb5-include or --with-krb5-lib are given. dnl dnl Provides the macro RRA_LIB_KRB5 and sets the substitution variables dnl KRB5_CPPFLAGS, KRB5_LDFLAGS, and KRB5_LIBS. Also provides dnl RRA_LIB_KRB5_SWITCH to set CPPFLAGS, LDFLAGS, and LIBS to include the dnl Kerberos libraries, saving the current values first, and dnl RRA_LIB_KRB5_RESTORE to restore those settings to before the last -dnl RRA_LIB_KRB5_SWITCH. +dnl RRA_LIB_KRB5_SWITCH. HAVE_KRB5 will always be defined if RRA_LIB_KRB5 is +dnl used. dnl dnl If KRB5_CPPFLAGS, KRB5_LDFLAGS, or KRB5_LIBS are set before calling these dnl macros, their values will be added to whatever the macros discover. dnl +dnl KRB5_CPPFLAGS_GCC will be set to the same value as KRB5_CPPFLAGS but with +dnl any occurrences of -I changed to -isystem. This may be useful to suppress +dnl warnings from the Kerberos header files when building with GCC and +dnl aggressive warning flags. Be aware that this change will change the +dnl compiler header file search order as well. +dnl dnl Provides the RRA_LIB_KRB5_OPTIONAL macro, which should be used if Kerberos -dnl support is optional. This macro will still always set the substitution -dnl variables, but they'll be empty unless --with-krb5 is given. Also, -dnl HAVE_KERBEROS will be defined if --with-krb5 is given and -dnl $rra_use_kerberos will be set to "true". +dnl support is optional. In this case, Kerberos libraries are mandatory if +dnl --with-krb5 is given, and will not be probed for if --without-krb5 is +dnl given. Otherwise, they'll be probed for but will not be required. +dnl Defines HAVE_KRB5 and sets rra_use_KRB5 to true if the libraries are +dnl found. The substitution variables will always be set, but they will be +dnl empty unless Kerberos libraries are found and the user did not disable +dnl Kerberos support. dnl dnl Sets the Automake conditional KRB5_USES_COM_ERR saying whether we use dnl com_err, since if we're also linking with AFS libraries, we may have to dnl change library ordering in that case. dnl -dnl Depends on RRA_ENABLE_REDUCED_DEPENDS and RRA_SET_LDFLAGS. +dnl Depends on RRA_KRB5_CONFIG, RRA_ENABLE_REDUCED_DEPENDS, and +dnl RRA_SET_LDFLAGS. dnl dnl Also provides RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS, which checks dnl whether krb5_get_init_creds_opt_free takes one argument or two. Defines dnl HAVE_KRB5_GET_INIT_CREDS_OPT_FREE_2_ARGS if it takes two arguments. dnl +dnl Also provides RRA_INCLUDES_KRB5, which are the headers to include when +dnl probing the Kerberos library properties. +dnl dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery -dnl Copyright 2005, 2006, 2007, 2008, 2009, 2010 +dnl Written by Russ Allbery +dnl Copyright 2005, 2006, 2007, 2008, 2009, 2010, 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 Ignore Automake conditionals if not using Automake. +m4_define_default([AM_CONDITIONAL], [:]) + +dnl Headers to include when probing for Kerberos library properties. +AC_DEFUN([RRA_INCLUDES_KRB5], [[ +#if HAVE_KRB5_H +# include +#elif HAVE_KERBEROSV5_KRB5_H +# include +#else +# include +#endif +]]) + 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 Kerberos flags. Used as a wrapper, with dnl RRA_LIB_KRB5_RESTORE, around tests. AC_DEFUN([RRA_LIB_KRB5_SWITCH], [rra_krb5_save_CPPFLAGS="$CPPFLAGS" @@ -74,15 +102,46 @@ [AS_IF([test x"$rra_krb5_root" != x/usr], [KRB5_CPPFLAGS="-I${rra_krb5_root}/include"])])])]) -dnl Does the appropriate library checks for reduced-dependency Kerberos v5 +dnl Check for a header using a file existence check rather than using +dnl AC_CHECK_HEADERS. This is used if there were arguments to configure +dnl specifying the Kerberos header path, since we may have one header in the +dnl default include path and another under our explicitly-configured Kerberos +dnl location. +AC_DEFUN([_RRA_LIB_KRB5_CHECK_HEADER], +[AC_MSG_CHECKING([for $1]) + AS_IF([test -f "${rra_krb5_incroot}/$1"], + [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_$1]), [1], + [Define to 1 if you have the <$1> header file.]) + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])])]) + +dnl Check for the com_err header. Internal helper macro since we need +dnl to do the same checks in multiple places. +AC_DEFUN([_RRA_LIB_KRB5_CHECK_HEADER_COM_ERR], +[AS_IF([test x"$rra_krb5_incroot" = x], + [AC_CHECK_HEADERS([et/com_err.h kerberosv5/com_err.h])], + [_RRA_LIB_KRB5_CHECK_HEADER([et/com_err.h]) + _RRA_LIB_KRB5_CHECK_HEADER([kerberosv5/com_err.h])])]) + +dnl Check for the main Kerberos header. Internal helper macro since we need +dnl to do the same checks in multiple places. +AC_DEFUN([_RRA_LIB_KRB5_CHECK_HEADER_KRB5], +[AS_IF([test x"$rra_krb5_incroot" = x], + [AC_CHECK_HEADERS([krb5.h kerberosv5/krb5.h krb5/krb5.h])], + [_RRA_LIB_KRB5_CHECK_HEADER([krb5.h]) + _RRA_LIB_KRB5_CHECK_HEADER([kerberosv5/krb5.h]) + _RRA_LIB_KRB5_CHECK_HEADER([krb5/krb5.h])])]) + +dnl Does the appropriate library checks for reduced-dependency Kerberos 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"], [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable Kerberos v5 library])])]) + [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], [], @@ -91,14 +150,16 @@ [KRB5_LIBS="$KRB5_LIBS -lksvc" AC_DEFINE([HAVE_KRB5_SVC_GET_MSG], [1]) AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], - [#include ])], + [RRA_INCLUDES_KRB5])], [AC_CHECK_LIB([com_err], [com_err], [KRB5_LIBS="$KRB5_LIBS -lcom_err"], - [AC_MSG_ERROR([cannot find usable com_err library])]) - AC_CHECK_HEADERS([et/com_err.h])])])])]) + [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 v5 linkage when we don't +dnl Does the appropriate library checks for Kerberos linkage when we don't dnl have krb5-config or reduced dependencies. The single argument, if true, dnl says to fail if Kerberos could not be found. AC_DEFUN([_RRA_LIB_KRB5_MANUAL], @@ -112,7 +173,7 @@ [AC_CHECK_LIB([nsl], [socket], [LIBS="-lnsl -lsocket $LIBS"], [], [-lsocket])]) AC_SEARCH_LIBS([crypt], [crypt]) - AC_SEARCH_LIBS([rk_simple_execve], [roken]) + AC_SEARCH_LIBS([roken_concat], [roken]) rra_krb5_extra="$LIBS" LIBS="$rra_krb5_save_LIBS" AC_CHECK_LIB([krb5], [krb5_init_context], @@ -138,18 +199,19 @@ AC_CHECK_LIB([krb5], [krb5_cc_default], [KRB5_LIBS="-lkrb5 $rra_krb5_extra"], [AS_IF([test x"$1" = xtrue], - [AC_MSG_ERROR([cannot find usable Kerberos v5 library])])], + [AC_MSG_ERROR([cannot find usable Kerberos library])])], [$rra_krb5_extra])], [-lasn1 -lcom_err -lcrypto $rra_krb5_extra]) 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_FUNCS([krb5_svc_get_msg], [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], - [#include ])], - [AC_CHECK_HEADERS([et/com_err.h])])])])]) + [RRA_INCLUDES_KRB5])], + [_RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])]) RRA_LIB_KRB5_RESTORE]) dnl Sanity-check the results of krb5-config and be sure we can really link a @@ -166,115 +228,123 @@ _RRA_LIB_KRB5_PATHS _RRA_LIB_KRB5_MANUAL([$1])])]) +dnl Determine Kerberos compiler and linker flags from krb5-config. Does the +dnl additional probing we need to do to uncover error handling features, and +dnl falls back on the manual checks. +AC_DEFUN([_RRA_LIB_KRB5_CONFIG], +[RRA_KRB5_CONFIG([${rra_krb5_root}], [krb5], [KRB5], + [_RRA_LIB_KRB5_CHECK([$1]) + RRA_LIB_KRB5_SWITCH + _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_FUNCS([krb5_svc_get_msg], + [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], + [RRA_INCLUDES_KRB5])], + [_RRA_LIB_KRB5_CHECK_HEADER_COM_ERR])])])]) + RRA_LIB_KRB5_RESTORE], + [_RRA_LIB_KRB5_PATHS + _RRA_LIB_KRB5_MANUAL([$1])])]) + dnl The core of the library checking, shared between RRA_LIB_KRB5 and dnl RRA_LIB_KRB5_OPTIONAL. The single argument, if "true", says to fail if -dnl Kerberos could not be found. +dnl Kerberos could not be found. Set up rra_krb5_incroot for later header +dnl checking. AC_DEFUN([_RRA_LIB_KRB5_INTERNAL], [AC_REQUIRE([RRA_ENABLE_REDUCED_DEPENDS]) + rra_krb5_incroot= + AC_SUBST([KRB5_CPPFLAGS]) + AC_SUBST([KRB5_CPPFLAGS_GCC]) + AC_SUBST([KRB5_LDFLAGS]) + AC_SUBST([KRB5_LIBS]) + AS_IF([test x"$rra_krb5_includedir" != x], + [rra_krb5_incroot="$rra_krb5_includedir"], + [AS_IF([test x"$rra_krb5_root" != x], + [rra_krb5_incroot="${rra_krb5_root}/include"])]) AS_IF([test x"$rra_reduced_depends" = xtrue], [_RRA_LIB_KRB5_PATHS _RRA_LIB_KRB5_REDUCED([$1])], - [AC_ARG_VAR([KRB5_CONFIG], [Path to krb5-config]) - AS_IF([test x"$rra_krb5_root" != x && test -z "$KRB5_CONFIG"], - [AS_IF([test -x "${rra_krb5_root}/bin/krb5-config"], - [KRB5_CONFIG="${rra_krb5_root}/bin/krb5-config"])], - [AC_PATH_PROG([KRB5_CONFIG], [krb5-config], [], - [${PATH}:/usr/kerberos/bin])]) - AS_IF([test x"$KRB5_CONFIG" != x && test -x "$KRB5_CONFIG"], - [AC_CACHE_CHECK([for krb5 support in krb5-config], - [rra_cv_lib_krb5_config], - [AS_IF(["$KRB5_CONFIG" 2>&1 | grep krb5 >/dev/null 2>&1], - [rra_cv_lib_krb5_config=yes], - [rra_cv_lib_krb5_config=no])]) - AS_IF([test x"$rra_cv_lib_krb5_config" = xyes], - [KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags krb5 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs krb5 2>/dev/null`], - [KRB5_CPPFLAGS=`"$KRB5_CONFIG" --cflags 2>/dev/null` - KRB5_LIBS=`"$KRB5_CONFIG" --libs 2>/dev/null`]) - KRB5_CPPFLAGS=`echo "$KRB5_CPPFLAGS" | sed 's%-I/usr/include ?%%'` - _RRA_LIB_KRB5_CHECK([$1]) - RRA_LIB_KRB5_SWITCH - 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_FUNCS([krb5_svc_get_msg], - [AC_CHECK_HEADERS([ibm_svc/krb5_svc.h], [], [], - [#include ])], - [AC_CHECK_HEADERS([et/com_err.h])])])])]) - RRA_LIB_KRB5_RESTORE], - [_RRA_LIB_KRB5_PATHS - _RRA_LIB_KRB5_MANUAL([$1])])]) + [AS_IF([test x"$rra_krb5_includedir" = x && test x"$rra_krb5_libdir" = x], + [_RRA_LIB_KRB5_CONFIG([$1])], + [_RRA_LIB_KRB5_PATHS + _RRA_LIB_KRB5_MANUAL([$1])])]) rra_krb5_uses_com_err=false - case "$LIBS" in - *-lcom_err*) - rra_krb5_uses_com_err=true - ;; - esac - AM_CONDITIONAL([KRB5_USES_COM_ERR], [test x"$rra_krb5_uses_com_err" = xtrue])]) + AS_CASE([$KRB5_LIBS], [*-lcom_err*], [rra_krb5_uses_com_err=true]) + AM_CONDITIONAL([KRB5_USES_COM_ERR], + [test x"$rra_krb5_uses_com_err" = xtrue]) + KRB5_CPPFLAGS_GCC=`echo "$KRB5_CPPFLAGS" | sed -e 's/-I/-isystem /g'`]) dnl The main macro for packages with mandatory Kerberos support. AC_DEFUN([RRA_LIB_KRB5], [rra_krb5_root= rra_krb5_libdir= rra_krb5_includedir= - rra_use_kerberos=true - AC_SUBST([KRB5_CPPFLAGS]) - AC_SUBST([KRB5_LDFLAGS]) - AC_SUBST([KRB5_LIBS]) + rra_use_KRB5=true AC_ARG_WITH([krb5], [AS_HELP_STRING([--with-krb5=DIR], - [Location of Kerberos v5 headers and libraries])], + [Location of Kerberos headers and libraries])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_krb5_root="$withval"])]) AC_ARG_WITH([krb5-include], [AS_HELP_STRING([--with-krb5-include=DIR], - [Location of Kerberos v5 headers])], + [Location of Kerberos headers])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_krb5_includedir="$withval"])]) AC_ARG_WITH([krb5-lib], [AS_HELP_STRING([--with-krb5-lib=DIR], - [Location of Kerberos v5 libraries])], + [Location of Kerberos libraries])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_krb5_libdir="$withval"])]) - _RRA_LIB_KRB5_INTERNAL([true])]) + _RRA_LIB_KRB5_INTERNAL([true]) + AC_DEFINE([HAVE_KRB5], 1, [Define to enable Kerberos features.])]) dnl The main macro for packages with optional Kerberos support. AC_DEFUN([RRA_LIB_KRB5_OPTIONAL], [rra_krb5_root= rra_krb5_libdir= rra_krb5_includedir= - rra_use_kerberos= - AC_SUBST([KRB5_CPPFLAGS]) - AC_SUBST([KRB5_LDFLAGS]) - AC_SUBST([KRB5_LIBS]) + rra_use_KRB5= AC_ARG_WITH([krb5], [AS_HELP_STRING([--with-krb5@<:@=DIR@:>@], - [Location of Kerberos v5 headers and libraries])], + [Location of Kerberos headers and libraries])], [AS_IF([test x"$withval" = xno], - [rra_use_kerberos=false], + [rra_use_KRB5=false], [AS_IF([test x"$withval" != xyes], [rra_krb5_root="$withval"]) - rra_use_kerberos=true])]) + rra_use_KRB5=true])]) AC_ARG_WITH([krb5-include], [AS_HELP_STRING([--with-krb5-include=DIR], - [Location of Kerberos v5 headers])], + [Location of Kerberos headers])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_krb5_includedir="$withval"])]) AC_ARG_WITH([krb5-lib], [AS_HELP_STRING([--with-krb5-lib=DIR], - [Location of Kerberos v5 libraries])], + [Location of Kerberos libraries])], [AS_IF([test x"$withval" != xyes && test x"$withval" != xno], [rra_krb5_libdir="$withval"])]) - AS_IF([test x"$rra_use_kerberos" != xfalse], - [AS_IF([test x"$rra_use_kerberos" = xtrue], + AS_IF([test x"$rra_use_KRB5" != xfalse], + [AS_IF([test x"$rra_use_KRB5" = xtrue], [_RRA_LIB_KRB5_INTERNAL([true])], [_RRA_LIB_KRB5_INTERNAL([false])])], [AM_CONDITIONAL([KRB5_USES_COM_ERR], [false])]) AS_IF([test x"$KRB5_LIBS" != x], - [AC_DEFINE([HAVE_KERBEROS], 1, [Define to enable Kerberos features.])])]) + [rra_use_KRB5=true + AC_DEFINE([HAVE_KRB5], 1, [Define to enable Kerberos features.])])]) + +dnl Source used by RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS. +AC_DEFUN([_RRA_FUNC_KRB5_OPT_FREE_ARGS_SOURCE], [RRA_INCLUDES_KRB5] [[ +int +main(void) +{ + krb5_get_init_creds_opt *opts; + krb5_context c; + krb5_get_init_creds_opt_free(c, opts); +} +]]) dnl Check whether krb5_get_init_creds_opt_free takes one argument or two. dnl Early Heimdal used to take a single argument. Defines @@ -284,9 +354,7 @@ AC_DEFUN([RRA_FUNC_KRB5_GET_INIT_CREDS_OPT_FREE_ARGS], [AC_CACHE_CHECK([if krb5_get_init_creds_opt_free takes two arguments], [rra_cv_func_krb5_get_init_creds_opt_free_args], - [AC_TRY_COMPILE([#include ], - [krb5_get_init_creds_opt *opts; krb5_context c; - krb5_get_init_creds_opt_free(c, opts);], + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_RRA_FUNC_KRB5_OPT_FREE_ARGS_SOURCE])], [rra_cv_func_krb5_get_init_creds_opt_free_args=yes], [rra_cv_func_krb5_get_init_creds_opt_free_args=no])]) AS_IF([test $rra_cv_func_krb5_get_init_creds_opt_free_args = yes], diff -Nru libpam-afs-session-2.5/m4/ld-version.m4 libpam-afs-session-2.6/m4/ld-version.m4 --- libpam-afs-session-2.5/m4/ld-version.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/ld-version.m4 2015-09-19 18:25:37.000000000 +0000 @@ -7,7 +7,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery +dnl Written by Russ Allbery dnl Based on the gnulib ld-version-script macro from Simon Josefsson dnl Copyright 2010 dnl The Board of Trustees of the Leland Stanford Junior University diff -Nru libpam-afs-session-2.5/m4/lib-depends.m4 libpam-afs-session-2.6/m4/lib-depends.m4 --- libpam-afs-session-2.5/m4/lib-depends.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/lib-depends.m4 2015-09-19 18:25:37.000000000 +0000 @@ -12,7 +12,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery +dnl Written by Russ Allbery dnl Copyright 2005, 2006, 2007 dnl The Board of Trustees of the Leland Stanford Junior University dnl diff -Nru libpam-afs-session-2.5/m4/lib-pathname.m4 libpam-afs-session-2.6/m4/lib-pathname.m4 --- libpam-afs-session-2.5/m4/lib-pathname.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/lib-pathname.m4 2015-09-19 18:25:37.000000000 +0000 @@ -15,7 +15,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery +dnl Written by Russ Allbery dnl Copyright 2008, 2009 dnl The Board of Trustees of the Leland Stanford Junior University dnl diff -Nru libpam-afs-session-2.5/m4/libtool.m4 libpam-afs-session-2.6/m4/libtool.m4 --- libpam-afs-session-2.5/m4/libtool.m4 2011-07-26 00:53:11.000000000 +0000 +++ libpam-afs-session-2.6/m4/libtool.m4 2015-09-19 18:26:44.000000000 +0000 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1268,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1280,9 +1324,19 @@ LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - LD="${LD-ld} -m elf_i386" + case `/usr/bin/file conftest.o` in + *x86-64*) + LD="${LD-ld} -m elf32_x86_64" + ;; + *) + LD="${LD-ld} -m elf_i386" + ;; + esac + ;; + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1301,7 +1355,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1330,14 +1387,27 @@ CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1484,13 @@ if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1670,11 @@ lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1626,7 +1701,8 @@ ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len" && \ + test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else @@ -1639,7 +1715,7 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2261,7 @@ case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2270,7 @@ ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2335,7 @@ ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2474,7 @@ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2482,6 @@ shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2489,7 @@ objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2507,7 @@ esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2454,19 +2526,8 @@ esac ;; -gnu*) - version_type=linux - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2588,7 @@ ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2543,7 +2604,7 @@ nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2641,9 @@ dynamic_linker=no ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2657,7 +2718,7 @@ ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2787,7 @@ ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2751,7 +2812,7 @@ ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2775,7 +2836,7 @@ sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2867,7 @@ tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2816,7 +2877,7 @@ ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3197,10 +3258,6 @@ fi ;; -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -3238,8 +3295,8 @@ lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) +# This must be glibc/ELF. +linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3715,7 @@ # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -3990,7 +4048,7 @@ ;; esac ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler @@ -4242,7 +4300,9 @@ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4287,7 +4347,7 @@ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) @@ -4334,18 +4394,33 @@ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4580,9 @@ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4610,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4863,7 @@ xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5159,7 @@ # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5206,6 @@ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5218,7 @@ ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5185,7 +5257,6 @@ fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5698,6 @@ _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5855,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6224,7 @@ esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6173,9 +6240,6 @@ _LT_TAGVAR(ld_shlibs, $1)=yes ;; - gnu*) - ;; - haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -6337,7 +6401,7 @@ _LT_TAGVAR(inherit_rpath, $1)=yes ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) + linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler @@ -6918,12 +6982,18 @@ } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7190,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7322,6 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7508,77 @@ ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7648,13 @@ dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff -Nru libpam-afs-session-2.5/m4/ltoptions.m4 libpam-afs-session-2.6/m4/ltoptions.m4 --- libpam-afs-session-2.5/m4/ltoptions.m4 2011-07-26 00:53:11.000000000 +0000 +++ libpam-afs-session-2.6/m4/ltoptions.m4 2015-09-19 18:26:45.000000000 +0000 @@ -326,9 +326,24 @@ # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff -Nru libpam-afs-session-2.5/m4/ltversion.m4 libpam-afs-session-2.6/m4/ltversion.m4 --- libpam-afs-session-2.5/m4/ltversion.m4 2011-07-26 00:53:11.000000000 +0000 +++ libpam-afs-session-2.6/m4/ltversion.m4 2015-09-19 18:26:45.000000000 +0000 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff -Nru libpam-afs-session-2.5/m4/pam-const.m4 libpam-afs-session-2.6/m4/pam-const.m4 --- libpam-afs-session-2.5/m4/pam-const.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/pam-const.m4 2015-09-19 18:25:37.000000000 +0000 @@ -2,8 +2,10 @@ dnl dnl Linux marks several PAM arguments const, including the argument to dnl pam_get_item and some arguments to conversation functions, which Solaris -dnl doesn't. This test tries to determine which style is in use to select -dnl whether to declare variables const in order to avoid compiler warnings. +dnl doesn't. Mac OS X marks the first argument to pam_strerror const, and +dnl other platforms don't. This test tries to determine which style is in use +dnl to select whether to declare variables const and how to prototype +dnl functions in order to avoid compiler warnings. dnl dnl Since this is just for compiler warnings, it's not horribly important if dnl we guess wrong. This test is ugly, but it seems to work. @@ -13,7 +15,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Copyright 2007 Russ Allbery +dnl Copyright 2007, 2015 Russ Allbery dnl Copyright 2007, 2008 Markus Moeller dnl dnl This file is free software; the authors give unlimited permission to copy @@ -33,7 +35,18 @@ [AC_CACHE_CHECK([whether PAM prefers const], [rra_cv_header_pam_const], [AC_EGREP_CPP([const void \*\* *_?item], _RRA_HEADER_PAM_CONST_SOURCE(), [rra_cv_header_pam_const=yes], [rra_cv_header_pam_const=no])]) -AS_IF([test x"$rra_cv_header_pam_const" = xyes], + AS_IF([test x"$rra_cv_header_pam_const" = xyes], [rra_header_pam_const=const], [rra_header_pam_const=]) -AC_DEFINE_UNQUOTED([PAM_CONST], [$rra_header_pam_const], + AC_DEFINE_UNQUOTED([PAM_CONST], [$rra_header_pam_const], [Define to const if PAM uses const in pam_get_item, empty otherwise.])]) + +AC_DEFUN([RRA_HEADER_PAM_STRERROR_CONST], +[AC_CACHE_CHECK([whether pam_strerror uses const], + [rra_cv_header_pam_strerror_const], + [AC_EGREP_CPP([pam_strerror *\(const], _RRA_HEADER_PAM_CONST_SOURCE(), + [rra_cv_header_pam_strerror_const=yes], + [rra_cv_header_pam_strerror_const=no])]) + AS_IF([test x"$rra_cv_header_pam_strerror_const" = xyes], + [rra_header_pam_strerror_const=const], [rra_header_pam_strerror_const=]) + AC_DEFINE_UNQUOTED([PAM_STRERROR_CONST], [$rra_header_pam_strerror_const], + [Define to const if PAM uses const in pam_strerror, empty otherwise.])]) diff -Nru libpam-afs-session-2.5/m4/snprintf.m4 libpam-afs-session-2.6/m4/snprintf.m4 --- libpam-afs-session-2.5/m4/snprintf.m4 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/m4/snprintf.m4 2015-09-19 18:25:37.000000000 +0000 @@ -12,7 +12,7 @@ dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl -dnl Written by Russ Allbery +dnl Written by Russ Allbery dnl Copyright 2006, 2008, 2009 dnl The Board of Trustees of the Leland Stanford Junior University dnl diff -Nru libpam-afs-session-2.5/Makefile.am libpam-afs-session-2.6/Makefile.am --- libpam-afs-session-2.5/Makefile.am 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/Makefile.am 2015-09-19 18:25:37.000000000 +0000 @@ -1,19 +1,24 @@ # Automake makefile for pam-afs-session. # -# Written by Russ Allbery +# Written by Russ Allbery +# Copyright 2015 Russ Allbery # Copyright 2006, 2007, 2010, 2011 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = .gitignore LICENSE autogen examples/debian/common-account \ - examples/debian/common-auth examples/debian/common-session \ - examples/redhat/system-auth examples/solaris/pam.conf \ - pam_afs_session.map pam_afs_session.pod pam_afs_session.sym \ - tests/README tests/TESTS tests/data/fake-aklog tests/data/krb5.conf \ - tests/docs/pod-spelling-t tests/docs/pod-t tests/fakepam/README \ - tests/kafs/basic-t tests/module/full-t tests/tap/libtap.sh +EXTRA_DIST = .gitignore LICENSE autogen examples/debian/common-account \ + examples/debian/common-auth examples/debian/common-session \ + examples/redhat/system-auth examples/solaris/pam.conf \ + pam_afs_session.map pam_afs_session.pod pam_afs_session.sym \ + tests/README tests/TESTS tests/data/krb5-pam.conf \ + tests/data/fake-aklog tests/data/krb5.conf tests/data/perl.conf \ + tests/data/scripts tests/docs/pod-spelling-t tests/docs/pod-t \ + tests/fakepam/README tests/kafs/basic-t tests/module/full-t \ + tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm \ + tests/tap/perl/Test/RRA/Automake.pm \ + tests/tap/perl/Test/RRA/Config.pm # The following library order matters for annoying reasons. libafsauthent # contains its own com_err implementation, which we do not want to pick up. @@ -85,12 +90,21 @@ # # -Wconversion http://bugs.debian.org/488884 (htons warnings) # -# Last checked against gcc 4.6.1 (2011-05-04). -WARNINGS = -g -O -Wall -Wextra -Wendif-labels -Wformat=2 -Winit-self \ - -Wswitch-enum -Wdeclaration-after-statement -Wshadow \ - -Wpointer-arith -Wbad-function-cast -Wwrite-strings \ - -Wjump-misses-init -Wlogical-op -Wstrict-prototypes \ - -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Werror +# Last checked against gcc 4.8.2 (2014-04-12). -D_FORTIFY_SOURCE=2 enables +# warn_unused_result attribute markings on glibc functions on Linux, which +# catches a few more issues. +if WARNINGS_GCC + WARNINGS = -g -O -fstrict-overflow -fstrict-aliasing -D_FORTIFY_SOURCE=2 \ + -Wall -Wextra -Wendif-labels -Wformat=2 -Winit-self -Wswitch-enum \ + -Wstrict-overflow=5 -Wfloat-equal -Wdeclaration-after-statement \ + -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align \ + -Wwrite-strings -Wjump-misses-init -Wlogical-op -Wstrict-prototypes \ + -Wold-style-definition -Wmissing-prototypes -Wnormalized=nfc \ + -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wvla -Werror +endif +if WARNINGS_CLANG + WARINGS = -Weverything -Wno-padded +endif warnings: $(MAKE) V=0 CFLAGS='$(WARNINGS)' @@ -109,12 +123,15 @@ -DBUILD='"$(abs_top_builddir)/tests"' check_LIBRARIES = tests/fakepam/libfakepam.a tests/module/libfakekafs.a \ tests/tap/libtap.a -tests_fakepam_libfakepam_a_SOURCES = tests/fakepam/data.c \ - tests/fakepam/logging.c tests/fakepam/testing.c \ - tests/fakepam/testing.h +tests_fakepam_libfakepam_a_SOURCES = tests/fakepam/config.c \ + tests/fakepam/data.c tests/fakepam/general.c \ + tests/fakepam/internal.h tests/fakepam/logging.c \ + tests/fakepam/pam.h tests/fakepam/script.c tests/fakepam/script.h \ + tests/fakepam/stubs.c tests_module_libfakekafs_a_SOURCES = tests/module/fakekafs.c tests_tap_libtap_a_CPPFLAGS = -I$(abs_top_srcdir)/tests -tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h +tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h \ + tests/tap/macros.h tests/tap/string.c tests/tap/string.h # All of the test programs. tests_kafs_basic_LDFLAGS = $(KAFS_LDFLAGS) @@ -122,14 +139,10 @@ tests_kafs_haspag_t_LDFLAGS = $(KAFS_LDFLAGS) tests_kafs_haspag_t_LDADD = tests/tap/libtap.a portable/libportable.la \ $(LIBKAFS) $(DEPEND_LIBS) -tests_module_basic_t_SOURCES = tests/module/basic-t.c tests/module/util.c \ - tests/module/util.h tests_module_basic_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_basic_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la $(LIBKAFS) $(DEPEND_LIBS) -tests_module_cells_t_SOURCES = tests/module/cells-t.c tests/module/util.c \ - tests/module/util.h tests_module_cells_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_cells_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a tests/tap/libtap.a \ @@ -137,23 +150,18 @@ tests_module_full_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_full_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ - portable/libportable.la $(LIBKAFS) $(DEPEND_LIBS) -tests_module_hasafs_t_SOURCES = tests/module/hasafs-t.c tests/module/util.c \ - tests/module/util.h + tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ + $(DEPEND_LIBS) tests_module_hasafs_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_hasafs_t_LDADD = options.lo public.lo tokens.lo \ tests/module/libfakekafs.a pam-util/libpamutil.la \ tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la -tests_module_pag_t_SOURCES = tests/module/pag-t.c tests/module/util.c \ - tests/module/util.h tests_module_pag_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_pag_t_LDADD = options.lo public.lo tokens.lo \ tests/module/libfakekafs.a pam-util/libpamutil.la \ tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la -tests_module_sigchld_t_SOURCES = tests/module/sigchld-t.c \ - tests/module/util.c tests/module/util.h tests_module_sigchld_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_sigchld_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ @@ -193,4 +201,4 @@ tests_portable_strndup_t_LDADD = tests/tap/libtap.a portable/libportable.la check-local: $(check_PROGRAMS) - cd tests && ./runtests $(abs_top_srcdir)/tests/TESTS + cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS diff -Nru libpam-afs-session-2.5/Makefile.in libpam-afs-session-2.6/Makefile.in --- libpam-afs-session-2.5/Makefile.in 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/Makefile.in 2015-09-19 18:26:48.000000000 +0000 @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + # This Makefile.in 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. @@ -17,13 +16,69 @@ # Automake makefile for pam-afs-session. # -# Written by Russ Allbery +# Written by Russ Allbery +# Copyright 2015 Russ Allbery # Copyright 2006, 2007, 2010, 2011 # The Board of Trustees of the Leland Stanford Junior University # # See LICENSE for licensing terms. VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -58,18 +113,9 @@ tests/portable/strlcpy-t$(EXEEXT) \ tests/portable/strndup-t$(EXEEXT) subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_man_MANS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(top_srcdir)/configure NEWS TODO \ - 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 portable/asprintf.c portable/issetuidgid.c \ - portable/k_haspag.c portable/krb5-extra.c \ - portable/krb5-profile.c portable/pam_syslog.c \ - portable/pam_vsyslog.c portable/snprintf.c portable/strlcat.c \ - portable/strlcpy.c portable/strndup.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/kafs.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/m4/clang.m4 \ + $(top_srcdir)/m4/kafs.m4 $(top_srcdir)/m4/krb5-config.m4 \ $(top_srcdir)/m4/krb5.m4 $(top_srcdir)/m4/ld-version.m4 \ $(top_srcdir)/m4/lib-depends.m4 \ $(top_srcdir)/m4/lib-pathname.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -79,6 +125,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d @@ -86,18 +134,18 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = ARFLAGS = cru -AM_V_AR = $(am__v_AR_$(V)) -am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) -am__v_AR_0 = @echo " AR " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +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_fakepam_libfakepam_a_AR = $(AR) $(ARFLAGS) tests_fakepam_libfakepam_a_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp -am_tests_fakepam_libfakepam_a_OBJECTS = tests/fakepam/data.$(OBJEXT) \ - tests/fakepam/logging.$(OBJEXT) \ - tests/fakepam/testing.$(OBJEXT) +am_tests_fakepam_libfakepam_a_OBJECTS = \ + tests/fakepam/config.$(OBJEXT) tests/fakepam/data.$(OBJEXT) \ + tests/fakepam/general.$(OBJEXT) \ + tests/fakepam/logging.$(OBJEXT) tests/fakepam/script.$(OBJEXT) \ + tests/fakepam/stubs.$(OBJEXT) tests_fakepam_libfakepam_a_OBJECTS = \ $(am_tests_fakepam_libfakepam_a_OBJECTS) tests_module_libfakekafs_a_AR = $(AR) $(ARFLAGS) @@ -109,7 +157,8 @@ tests_tap_libtap_a_AR = $(AR) $(ARFLAGS) tests_tap_libtap_a_LIBADD = am_tests_tap_libtap_a_OBJECTS = \ - tests/tap/tests_tap_libtap_a-basic.$(OBJEXT) + tests/tap/tests_tap_libtap_a-basic.$(OBJEXT) \ + tests/tap/tests_tap_libtap_a-string.$(OBJEXT) tests_tap_libtap_a_OBJECTS = $(am_tests_tap_libtap_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -132,6 +181,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pamdir)" "$(DESTDIR)$(man5dir)" LTLIBRARIES = $(noinst_LTLIBRARIES) $(pam_LTLIBRARIES) kafs_libkafs_la_LIBADD = @@ -142,9 +197,10 @@ kafs/sys-darwin8.c kafs/sys-linux.c kafs/sys-solaris.c \ kafs/sys-syscall.c kafs_libkafs_la_OBJECTS = $(am_kafs_libkafs_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = kafs_libkafs_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(kafs_libkafs_la_LDFLAGS) $(LDFLAGS) \ @@ -192,9 +248,8 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(tests_kafs_haspag_t_LDFLAGS) \ $(LDFLAGS) -o $@ -am_tests_module_basic_t_OBJECTS = tests/module/basic-t.$(OBJEXT) \ - tests/module/util.$(OBJEXT) -tests_module_basic_t_OBJECTS = $(am_tests_module_basic_t_OBJECTS) +tests_module_basic_t_SOURCES = tests/module/basic-t.c +tests_module_basic_t_OBJECTS = tests/module/basic-t.$(OBJEXT) tests_module_basic_t_DEPENDENCIES = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ @@ -203,9 +258,8 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(tests_module_basic_t_LDFLAGS) \ $(LDFLAGS) -o $@ -am_tests_module_cells_t_OBJECTS = tests/module/cells-t.$(OBJEXT) \ - tests/module/util.$(OBJEXT) -tests_module_cells_t_OBJECTS = $(am_tests_module_cells_t_OBJECTS) +tests_module_cells_t_SOURCES = tests/module/cells-t.c +tests_module_cells_t_OBJECTS = tests/module/cells-t.$(OBJEXT) tests_module_cells_t_DEPENDENCIES = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ @@ -218,14 +272,14 @@ tests_module_full_OBJECTS = tests/module/full.$(OBJEXT) tests_module_full_DEPENDENCIES = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ - portable/libportable.la $(LIBKAFS) $(am__DEPENDENCIES_2) + tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ + $(am__DEPENDENCIES_2) tests_module_full_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(tests_module_full_LDFLAGS) $(LDFLAGS) \ -o $@ -am_tests_module_hasafs_t_OBJECTS = tests/module/hasafs-t.$(OBJEXT) \ - tests/module/util.$(OBJEXT) -tests_module_hasafs_t_OBJECTS = $(am_tests_module_hasafs_t_OBJECTS) +tests_module_hasafs_t_SOURCES = tests/module/hasafs-t.c +tests_module_hasafs_t_OBJECTS = tests/module/hasafs-t.$(OBJEXT) tests_module_hasafs_t_DEPENDENCIES = options.lo public.lo tokens.lo \ tests/module/libfakekafs.a pam-util/libpamutil.la \ tests/fakepam/libfakepam.a tests/tap/libtap.a \ @@ -234,9 +288,8 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(tests_module_hasafs_t_LDFLAGS) \ $(LDFLAGS) -o $@ -am_tests_module_pag_t_OBJECTS = tests/module/pag-t.$(OBJEXT) \ - tests/module/util.$(OBJEXT) -tests_module_pag_t_OBJECTS = $(am_tests_module_pag_t_OBJECTS) +tests_module_pag_t_SOURCES = tests/module/pag-t.c +tests_module_pag_t_OBJECTS = tests/module/pag-t.$(OBJEXT) tests_module_pag_t_DEPENDENCIES = options.lo public.lo tokens.lo \ tests/module/libfakekafs.a pam-util/libpamutil.la \ tests/fakepam/libfakepam.a tests/tap/libtap.a \ @@ -245,9 +298,8 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(tests_module_pag_t_LDFLAGS) \ $(LDFLAGS) -o $@ -am_tests_module_sigchld_t_OBJECTS = tests/module/sigchld-t.$(OBJEXT) \ - tests/module/util.$(OBJEXT) -tests_module_sigchld_t_OBJECTS = $(am_tests_module_sigchld_t_OBJECTS) +tests_module_sigchld_t_SOURCES = tests/module/sigchld-t.c +tests_module_sigchld_t_OBJECTS = tests/module/sigchld-t.$(OBJEXT) tests_module_sigchld_t_DEPENDENCIES = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ @@ -330,6 +382,18 @@ tests_runtests_SOURCES = tests/runtests.c tests_runtests_OBJECTS = tests/tests_runtests-runtests.$(OBJEXT) tests_runtests_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -340,19 +404,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(tests_fakepam_libfakepam_a_SOURCES) \ $(tests_module_libfakekafs_a_SOURCES) \ $(tests_tap_libtap_a_SOURCES) $(kafs_libkafs_la_SOURCES) \ @@ -360,10 +423,10 @@ $(pam_util_libpamutil_la_SOURCES) \ $(pam_afs_session_la_SOURCES) \ $(portable_libportable_la_SOURCES) tests/kafs/basic.c \ - tests/kafs/haspag-t.c $(tests_module_basic_t_SOURCES) \ - $(tests_module_cells_t_SOURCES) tests/module/full.c \ - $(tests_module_hasafs_t_SOURCES) $(tests_module_pag_t_SOURCES) \ - $(tests_module_sigchld_t_SOURCES) tests/pam-util/args-t.c \ + tests/kafs/haspag-t.c tests/module/basic-t.c \ + tests/module/cells-t.c tests/module/full.c \ + tests/module/hasafs-t.c tests/module/pag-t.c \ + tests/module/sigchld-t.c tests/pam-util/args-t.c \ tests/pam-util/fakepam-t.c tests/pam-util/logging-t.c \ tests/pam-util/options-t.c tests/pam-util/vector-t.c \ $(tests_portable_asprintf_t_SOURCES) \ @@ -379,10 +442,10 @@ $(pam_util_libpamutil_la_SOURCES) \ $(pam_afs_session_la_SOURCES) \ $(portable_libportable_la_SOURCES) tests/kafs/basic.c \ - tests/kafs/haspag-t.c $(tests_module_basic_t_SOURCES) \ - $(tests_module_cells_t_SOURCES) tests/module/full.c \ - $(tests_module_hasafs_t_SOURCES) $(tests_module_pag_t_SOURCES) \ - $(tests_module_sigchld_t_SOURCES) tests/pam-util/args-t.c \ + tests/kafs/haspag-t.c tests/module/basic-t.c \ + tests/module/cells-t.c tests/module/full.c \ + tests/module/hasafs-t.c tests/module/pag-t.c \ + tests/module/sigchld-t.c tests/pam-util/args-t.c \ tests/pam-util/fakepam-t.c tests/pam-util/logging-t.c \ tests/pam-util/options-t.c tests/pam-util/vector-t.c \ $(tests_portable_asprintf_t_SOURCES) \ @@ -390,21 +453,76 @@ $(tests_portable_strlcat_t_SOURCES) \ $(tests_portable_strlcpy_t_SOURCES) \ $(tests_portable_strndup_t_SOURCES) tests/runtests.c +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac man5dir = $(mandir)/man5 NROFF = nroff MANS = $(dist_man_MANS) +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. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope +AM_RECURSIVE_TARGETS = cscope +am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ + $(srcdir)/config.h.in $(top_srcdir)/build-aux/ar-lib \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing \ + $(top_srcdir)/portable/asprintf.c \ + $(top_srcdir)/portable/issetugid.c \ + $(top_srcdir)/portable/k_haspag.c \ + $(top_srcdir)/portable/krb5-extra.c \ + $(top_srcdir)/portable/krb5-profile.c \ + $(top_srcdir)/portable/pam_syslog.c \ + $(top_srcdir)/portable/pam_vsyslog.c \ + $(top_srcdir)/portable/reallocarray.c \ + $(top_srcdir)/portable/snprintf.c \ + $(top_srcdir)/portable/strlcat.c \ + $(top_srcdir)/portable/strlcpy.c \ + $(top_srcdir)/portable/strndup.c NEWS README TODO \ + 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 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -440,8 +558,8 @@ KAFS_CPPFLAGS = @KAFS_CPPFLAGS@ KAFS_LDFLAGS = @KAFS_LDFLAGS@ KAFS_LIBS = @KAFS_LIBS@ -KRB5_CONFIG = @KRB5_CONFIG@ KRB5_CPPFLAGS = @KRB5_CPPFLAGS@ +KRB5_CPPFLAGS_GCC = @KRB5_CPPFLAGS_GCC@ KRB5_LDFLAGS = @KRB5_LDFLAGS@ KRB5_LIBS = @KRB5_LIBS@ LD = @LD@ @@ -470,6 +588,7 @@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_AKLOG = @PATH_AKLOG@ +PATH_KRB5_CONFIG = @PATH_KRB5_CONFIG@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ @@ -521,6 +640,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -530,13 +650,17 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 -EXTRA_DIST = .gitignore LICENSE autogen examples/debian/common-account \ - examples/debian/common-auth examples/debian/common-session \ - examples/redhat/system-auth examples/solaris/pam.conf \ - pam_afs_session.map pam_afs_session.pod pam_afs_session.sym \ - tests/README tests/TESTS tests/data/fake-aklog tests/data/krb5.conf \ - tests/docs/pod-spelling-t tests/docs/pod-t tests/fakepam/README \ - tests/kafs/basic-t tests/module/full-t tests/tap/libtap.sh +EXTRA_DIST = .gitignore LICENSE autogen examples/debian/common-account \ + examples/debian/common-auth examples/debian/common-session \ + examples/redhat/system-auth examples/solaris/pam.conf \ + pam_afs_session.map pam_afs_session.pod pam_afs_session.sym \ + tests/README tests/TESTS tests/data/krb5-pam.conf \ + tests/data/fake-aklog tests/data/krb5.conf tests/data/perl.conf \ + tests/data/scripts tests/docs/pod-spelling-t tests/docs/pod-t \ + tests/fakepam/README tests/kafs/basic-t tests/module/full-t \ + tests/tap/libtap.sh tests/tap/perl/Test/RRA.pm \ + tests/tap/perl/Test/RRA/Automake.pm \ + tests/tap/perl/Test/RRA/Config.pm @KRB5_USES_COM_ERR_FALSE@DEPEND_LIBS = $(KAFS_LIBS) $(KRB5_LIBS) @@ -602,26 +726,35 @@ # # -Wconversion http://bugs.debian.org/488884 (htons warnings) # -# Last checked against gcc 4.6.1 (2011-05-04). -WARNINGS = -g -O -Wall -Wextra -Wendif-labels -Wformat=2 -Winit-self \ - -Wswitch-enum -Wdeclaration-after-statement -Wshadow \ - -Wpointer-arith -Wbad-function-cast -Wwrite-strings \ - -Wjump-misses-init -Wlogical-op -Wstrict-prototypes \ - -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Werror +# Last checked against gcc 4.8.2 (2014-04-12). -D_FORTIFY_SOURCE=2 enables +# warn_unused_result attribute markings on glibc functions on Linux, which +# catches a few more issues. +@WARNINGS_GCC_TRUE@WARNINGS = -g -O -fstrict-overflow -fstrict-aliasing -D_FORTIFY_SOURCE=2 \ +@WARNINGS_GCC_TRUE@ -Wall -Wextra -Wendif-labels -Wformat=2 -Winit-self -Wswitch-enum \ +@WARNINGS_GCC_TRUE@ -Wstrict-overflow=5 -Wfloat-equal -Wdeclaration-after-statement \ +@WARNINGS_GCC_TRUE@ -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align \ +@WARNINGS_GCC_TRUE@ -Wwrite-strings -Wjump-misses-init -Wlogical-op -Wstrict-prototypes \ +@WARNINGS_GCC_TRUE@ -Wold-style-definition -Wmissing-prototypes -Wnormalized=nfc \ +@WARNINGS_GCC_TRUE@ -Wpacked -Wredundant-decls -Wnested-externs -Winline -Wvla -Werror +@WARNINGS_CLANG_TRUE@WARINGS = -Weverything -Wno-padded tests_runtests_CPPFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \ -DBUILD='"$(abs_top_builddir)/tests"' check_LIBRARIES = tests/fakepam/libfakepam.a tests/module/libfakekafs.a \ tests/tap/libtap.a -tests_fakepam_libfakepam_a_SOURCES = tests/fakepam/data.c \ - tests/fakepam/logging.c tests/fakepam/testing.c \ - tests/fakepam/testing.h +tests_fakepam_libfakepam_a_SOURCES = tests/fakepam/config.c \ + tests/fakepam/data.c tests/fakepam/general.c \ + tests/fakepam/internal.h tests/fakepam/logging.c \ + tests/fakepam/pam.h tests/fakepam/script.c tests/fakepam/script.h \ + tests/fakepam/stubs.c tests_module_libfakekafs_a_SOURCES = tests/module/fakekafs.c tests_tap_libtap_a_CPPFLAGS = -I$(abs_top_srcdir)/tests -tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h +tests_tap_libtap_a_SOURCES = tests/tap/basic.c tests/tap/basic.h \ + tests/tap/macros.h tests/tap/string.c tests/tap/string.h + # All of the test programs. tests_kafs_basic_LDFLAGS = $(KAFS_LDFLAGS) @@ -630,17 +763,11 @@ tests_kafs_haspag_t_LDADD = tests/tap/libtap.a portable/libportable.la \ $(LIBKAFS) $(DEPEND_LIBS) -tests_module_basic_t_SOURCES = tests/module/basic-t.c tests/module/util.c \ - tests/module/util.h - tests_module_basic_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_basic_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la $(LIBKAFS) $(DEPEND_LIBS) -tests_module_cells_t_SOURCES = tests/module/cells-t.c tests/module/util.c \ - tests/module/util.h - tests_module_cells_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_cells_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a tests/tap/libtap.a \ @@ -649,10 +776,8 @@ tests_module_full_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_full_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ - portable/libportable.la $(LIBKAFS) $(DEPEND_LIBS) - -tests_module_hasafs_t_SOURCES = tests/module/hasafs-t.c tests/module/util.c \ - tests/module/util.h + tests/tap/libtap.a portable/libportable.la $(LIBKAFS) \ + $(DEPEND_LIBS) tests_module_hasafs_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_hasafs_t_LDADD = options.lo public.lo tokens.lo \ @@ -660,18 +785,12 @@ tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la -tests_module_pag_t_SOURCES = tests/module/pag-t.c tests/module/util.c \ - tests/module/util.h - tests_module_pag_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_pag_t_LDADD = options.lo public.lo tokens.lo \ tests/module/libfakekafs.a pam-util/libpamutil.la \ tests/fakepam/libfakepam.a tests/tap/libtap.a \ portable/libportable.la -tests_module_sigchld_t_SOURCES = tests/module/sigchld-t.c \ - tests/module/util.c tests/module/util.h - tests_module_sigchld_t_LDFLAGS = $(KAFS_LDFLAGS) $(KRB5_LDFLAGS) tests_module_sigchld_t_LDADD = options.lo public.lo tokens.lo \ pam-util/libpamutil.la tests/fakepam/libfakepam.a \ @@ -725,7 +844,7 @@ .SUFFIXES: .SUFFIXES: .c .lo .o .obj -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -740,7 +859,6 @@ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ @@ -761,10 +879,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -785,13 +901,20 @@ tests/fakepam/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tests/fakepam/$(DEPDIR) @: > tests/fakepam/$(DEPDIR)/$(am__dirstamp) +tests/fakepam/config.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ + tests/fakepam/$(DEPDIR)/$(am__dirstamp) tests/fakepam/data.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ tests/fakepam/$(DEPDIR)/$(am__dirstamp) +tests/fakepam/general.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ + tests/fakepam/$(DEPDIR)/$(am__dirstamp) tests/fakepam/logging.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ tests/fakepam/$(DEPDIR)/$(am__dirstamp) -tests/fakepam/testing.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ +tests/fakepam/script.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ tests/fakepam/$(DEPDIR)/$(am__dirstamp) -tests/fakepam/libfakepam.a: $(tests_fakepam_libfakepam_a_OBJECTS) $(tests_fakepam_libfakepam_a_DEPENDENCIES) tests/fakepam/$(am__dirstamp) +tests/fakepam/stubs.$(OBJEXT): tests/fakepam/$(am__dirstamp) \ + tests/fakepam/$(DEPDIR)/$(am__dirstamp) + +tests/fakepam/libfakepam.a: $(tests_fakepam_libfakepam_a_OBJECTS) $(tests_fakepam_libfakepam_a_DEPENDENCIES) $(EXTRA_tests_fakepam_libfakepam_a_DEPENDENCIES) tests/fakepam/$(am__dirstamp) $(AM_V_at)-rm -f tests/fakepam/libfakepam.a $(AM_V_AR)$(tests_fakepam_libfakepam_a_AR) tests/fakepam/libfakepam.a $(tests_fakepam_libfakepam_a_OBJECTS) $(tests_fakepam_libfakepam_a_LIBADD) $(AM_V_at)$(RANLIB) tests/fakepam/libfakepam.a @@ -803,7 +926,8 @@ @: > tests/module/$(DEPDIR)/$(am__dirstamp) tests/module/fakekafs.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/libfakekafs.a: $(tests_module_libfakekafs_a_OBJECTS) $(tests_module_libfakekafs_a_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/libfakekafs.a: $(tests_module_libfakekafs_a_OBJECTS) $(tests_module_libfakekafs_a_DEPENDENCIES) $(EXTRA_tests_module_libfakekafs_a_DEPENDENCIES) tests/module/$(am__dirstamp) $(AM_V_at)-rm -f tests/module/libfakekafs.a $(AM_V_AR)$(tests_module_libfakekafs_a_AR) tests/module/libfakekafs.a $(tests_module_libfakekafs_a_OBJECTS) $(tests_module_libfakekafs_a_LIBADD) $(AM_V_at)$(RANLIB) tests/module/libfakekafs.a @@ -815,22 +939,27 @@ @: > tests/tap/$(DEPDIR)/$(am__dirstamp) tests/tap/tests_tap_libtap_a-basic.$(OBJEXT): \ tests/tap/$(am__dirstamp) tests/tap/$(DEPDIR)/$(am__dirstamp) -tests/tap/libtap.a: $(tests_tap_libtap_a_OBJECTS) $(tests_tap_libtap_a_DEPENDENCIES) tests/tap/$(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 clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + install-pamLTLIBRARIES: $(pam_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(pamdir)" || $(MKDIR_P) "$(DESTDIR)$(pamdir)" @list='$(pam_LTLIBRARIES)'; test -n "$(pamdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -838,6 +967,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(pamdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pamdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pamdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pamdir)"; \ } @@ -853,12 +984,14 @@ clean-pamLTLIBRARIES: -test -z "$(pam_LTLIBRARIES)" || rm -f $(pam_LTLIBRARIES) - @list='$(pam_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(pam_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } kafs/$(am__dirstamp): @$(MKDIR_P) kafs @: > kafs/$(am__dirstamp) @@ -875,7 +1008,8 @@ kafs/$(DEPDIR)/$(am__dirstamp) kafs/sys-syscall.lo: kafs/$(am__dirstamp) \ kafs/$(DEPDIR)/$(am__dirstamp) -kafs/libkafs.la: $(kafs_libkafs_la_OBJECTS) $(kafs_libkafs_la_DEPENDENCIES) kafs/$(am__dirstamp) + +kafs/libkafs.la: $(kafs_libkafs_la_OBJECTS) $(kafs_libkafs_la_DEPENDENCIES) $(EXTRA_kafs_libkafs_la_DEPENDENCIES) kafs/$(am__dirstamp) $(AM_V_CCLD)$(kafs_libkafs_la_LINK) $(am_kafs_libkafs_la_rpath) $(kafs_libkafs_la_OBJECTS) $(kafs_libkafs_la_LIBADD) $(LIBS) pam-util/$(am__dirstamp): @$(MKDIR_P) pam-util @@ -891,9 +1025,11 @@ pam-util/$(DEPDIR)/$(am__dirstamp) pam-util/vector.lo: pam-util/$(am__dirstamp) \ pam-util/$(DEPDIR)/$(am__dirstamp) -pam-util/libpamutil.la: $(pam_util_libpamutil_la_OBJECTS) $(pam_util_libpamutil_la_DEPENDENCIES) pam-util/$(am__dirstamp) + +pam-util/libpamutil.la: $(pam_util_libpamutil_la_OBJECTS) $(pam_util_libpamutil_la_DEPENDENCIES) $(EXTRA_pam_util_libpamutil_la_DEPENDENCIES) pam-util/$(am__dirstamp) $(AM_V_CCLD)$(pam_util_libpamutil_la_LINK) $(pam_util_libpamutil_la_OBJECTS) $(pam_util_libpamutil_la_LIBADD) $(LIBS) -pam_afs_session.la: $(pam_afs_session_la_OBJECTS) $(pam_afs_session_la_DEPENDENCIES) + +pam_afs_session.la: $(pam_afs_session_la_OBJECTS) $(pam_afs_session_la_DEPENDENCIES) $(EXTRA_pam_afs_session_la_DEPENDENCIES) $(AM_V_CCLD)$(pam_afs_session_la_LINK) -rpath $(pamdir) $(pam_afs_session_la_OBJECTS) $(pam_afs_session_la_LIBADD) $(LIBS) portable/$(am__dirstamp): @$(MKDIR_P) portable @@ -903,7 +1039,8 @@ @: > portable/$(DEPDIR)/$(am__dirstamp) portable/dummy.lo: portable/$(am__dirstamp) \ portable/$(DEPDIR)/$(am__dirstamp) -portable/libportable.la: $(portable_libportable_la_OBJECTS) $(portable_libportable_la_DEPENDENCIES) 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) clean-checkPROGRAMS: @@ -922,44 +1059,50 @@ @: > tests/kafs/$(DEPDIR)/$(am__dirstamp) tests/kafs/basic.$(OBJEXT): tests/kafs/$(am__dirstamp) \ tests/kafs/$(DEPDIR)/$(am__dirstamp) -tests/kafs/basic$(EXEEXT): $(tests_kafs_basic_OBJECTS) $(tests_kafs_basic_DEPENDENCIES) tests/kafs/$(am__dirstamp) + +tests/kafs/basic$(EXEEXT): $(tests_kafs_basic_OBJECTS) $(tests_kafs_basic_DEPENDENCIES) $(EXTRA_tests_kafs_basic_DEPENDENCIES) tests/kafs/$(am__dirstamp) @rm -f tests/kafs/basic$(EXEEXT) $(AM_V_CCLD)$(tests_kafs_basic_LINK) $(tests_kafs_basic_OBJECTS) $(tests_kafs_basic_LDADD) $(LIBS) tests/kafs/haspag-t.$(OBJEXT): tests/kafs/$(am__dirstamp) \ tests/kafs/$(DEPDIR)/$(am__dirstamp) -tests/kafs/haspag-t$(EXEEXT): $(tests_kafs_haspag_t_OBJECTS) $(tests_kafs_haspag_t_DEPENDENCIES) tests/kafs/$(am__dirstamp) + +tests/kafs/haspag-t$(EXEEXT): $(tests_kafs_haspag_t_OBJECTS) $(tests_kafs_haspag_t_DEPENDENCIES) $(EXTRA_tests_kafs_haspag_t_DEPENDENCIES) tests/kafs/$(am__dirstamp) @rm -f tests/kafs/haspag-t$(EXEEXT) $(AM_V_CCLD)$(tests_kafs_haspag_t_LINK) $(tests_kafs_haspag_t_OBJECTS) $(tests_kafs_haspag_t_LDADD) $(LIBS) tests/module/basic-t.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/util.$(OBJEXT): tests/module/$(am__dirstamp) \ - tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/basic-t$(EXEEXT): $(tests_module_basic_t_OBJECTS) $(tests_module_basic_t_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/basic-t$(EXEEXT): $(tests_module_basic_t_OBJECTS) $(tests_module_basic_t_DEPENDENCIES) $(EXTRA_tests_module_basic_t_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/basic-t$(EXEEXT) $(AM_V_CCLD)$(tests_module_basic_t_LINK) $(tests_module_basic_t_OBJECTS) $(tests_module_basic_t_LDADD) $(LIBS) tests/module/cells-t.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/cells-t$(EXEEXT): $(tests_module_cells_t_OBJECTS) $(tests_module_cells_t_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/cells-t$(EXEEXT): $(tests_module_cells_t_OBJECTS) $(tests_module_cells_t_DEPENDENCIES) $(EXTRA_tests_module_cells_t_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/cells-t$(EXEEXT) $(AM_V_CCLD)$(tests_module_cells_t_LINK) $(tests_module_cells_t_OBJECTS) $(tests_module_cells_t_LDADD) $(LIBS) tests/module/full.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/full$(EXEEXT): $(tests_module_full_OBJECTS) $(tests_module_full_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/full$(EXEEXT): $(tests_module_full_OBJECTS) $(tests_module_full_DEPENDENCIES) $(EXTRA_tests_module_full_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/full$(EXEEXT) $(AM_V_CCLD)$(tests_module_full_LINK) $(tests_module_full_OBJECTS) $(tests_module_full_LDADD) $(LIBS) tests/module/hasafs-t.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/hasafs-t$(EXEEXT): $(tests_module_hasafs_t_OBJECTS) $(tests_module_hasafs_t_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/hasafs-t$(EXEEXT): $(tests_module_hasafs_t_OBJECTS) $(tests_module_hasafs_t_DEPENDENCIES) $(EXTRA_tests_module_hasafs_t_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/hasafs-t$(EXEEXT) $(AM_V_CCLD)$(tests_module_hasafs_t_LINK) $(tests_module_hasafs_t_OBJECTS) $(tests_module_hasafs_t_LDADD) $(LIBS) tests/module/pag-t.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/pag-t$(EXEEXT): $(tests_module_pag_t_OBJECTS) $(tests_module_pag_t_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/pag-t$(EXEEXT): $(tests_module_pag_t_OBJECTS) $(tests_module_pag_t_DEPENDENCIES) $(EXTRA_tests_module_pag_t_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/pag-t$(EXEEXT) $(AM_V_CCLD)$(tests_module_pag_t_LINK) $(tests_module_pag_t_OBJECTS) $(tests_module_pag_t_LDADD) $(LIBS) tests/module/sigchld-t.$(OBJEXT): tests/module/$(am__dirstamp) \ tests/module/$(DEPDIR)/$(am__dirstamp) -tests/module/sigchld-t$(EXEEXT): $(tests_module_sigchld_t_OBJECTS) $(tests_module_sigchld_t_DEPENDENCIES) tests/module/$(am__dirstamp) + +tests/module/sigchld-t$(EXEEXT): $(tests_module_sigchld_t_OBJECTS) $(tests_module_sigchld_t_DEPENDENCIES) $(EXTRA_tests_module_sigchld_t_DEPENDENCIES) tests/module/$(am__dirstamp) @rm -f tests/module/sigchld-t$(EXEEXT) $(AM_V_CCLD)$(tests_module_sigchld_t_LINK) $(tests_module_sigchld_t_OBJECTS) $(tests_module_sigchld_t_LDADD) $(LIBS) tests/pam-util/$(am__dirstamp): @@ -970,27 +1113,32 @@ @: > tests/pam-util/$(DEPDIR)/$(am__dirstamp) tests/pam-util/args-t.$(OBJEXT): tests/pam-util/$(am__dirstamp) \ tests/pam-util/$(DEPDIR)/$(am__dirstamp) -tests/pam-util/args-t$(EXEEXT): $(tests_pam_util_args_t_OBJECTS) $(tests_pam_util_args_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) + +tests/pam-util/args-t$(EXEEXT): $(tests_pam_util_args_t_OBJECTS) $(tests_pam_util_args_t_DEPENDENCIES) $(EXTRA_tests_pam_util_args_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) @rm -f tests/pam-util/args-t$(EXEEXT) $(AM_V_CCLD)$(tests_pam_util_args_t_LINK) $(tests_pam_util_args_t_OBJECTS) $(tests_pam_util_args_t_LDADD) $(LIBS) tests/pam-util/fakepam-t.$(OBJEXT): tests/pam-util/$(am__dirstamp) \ tests/pam-util/$(DEPDIR)/$(am__dirstamp) -tests/pam-util/fakepam-t$(EXEEXT): $(tests_pam_util_fakepam_t_OBJECTS) $(tests_pam_util_fakepam_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) + +tests/pam-util/fakepam-t$(EXEEXT): $(tests_pam_util_fakepam_t_OBJECTS) $(tests_pam_util_fakepam_t_DEPENDENCIES) $(EXTRA_tests_pam_util_fakepam_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) @rm -f tests/pam-util/fakepam-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_pam_util_fakepam_t_OBJECTS) $(tests_pam_util_fakepam_t_LDADD) $(LIBS) tests/pam-util/logging-t.$(OBJEXT): tests/pam-util/$(am__dirstamp) \ tests/pam-util/$(DEPDIR)/$(am__dirstamp) -tests/pam-util/logging-t$(EXEEXT): $(tests_pam_util_logging_t_OBJECTS) $(tests_pam_util_logging_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) + +tests/pam-util/logging-t$(EXEEXT): $(tests_pam_util_logging_t_OBJECTS) $(tests_pam_util_logging_t_DEPENDENCIES) $(EXTRA_tests_pam_util_logging_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) @rm -f tests/pam-util/logging-t$(EXEEXT) $(AM_V_CCLD)$(tests_pam_util_logging_t_LINK) $(tests_pam_util_logging_t_OBJECTS) $(tests_pam_util_logging_t_LDADD) $(LIBS) tests/pam-util/options-t.$(OBJEXT): tests/pam-util/$(am__dirstamp) \ tests/pam-util/$(DEPDIR)/$(am__dirstamp) -tests/pam-util/options-t$(EXEEXT): $(tests_pam_util_options_t_OBJECTS) $(tests_pam_util_options_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) + +tests/pam-util/options-t$(EXEEXT): $(tests_pam_util_options_t_OBJECTS) $(tests_pam_util_options_t_DEPENDENCIES) $(EXTRA_tests_pam_util_options_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) @rm -f tests/pam-util/options-t$(EXEEXT) $(AM_V_CCLD)$(tests_pam_util_options_t_LINK) $(tests_pam_util_options_t_OBJECTS) $(tests_pam_util_options_t_LDADD) $(LIBS) tests/pam-util/vector-t.$(OBJEXT): tests/pam-util/$(am__dirstamp) \ tests/pam-util/$(DEPDIR)/$(am__dirstamp) -tests/pam-util/vector-t$(EXEEXT): $(tests_pam_util_vector_t_OBJECTS) $(tests_pam_util_vector_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) + +tests/pam-util/vector-t$(EXEEXT): $(tests_pam_util_vector_t_OBJECTS) $(tests_pam_util_vector_t_DEPENDENCIES) $(EXTRA_tests_pam_util_vector_t_DEPENDENCIES) tests/pam-util/$(am__dirstamp) @rm -f tests/pam-util/vector-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_pam_util_vector_t_OBJECTS) $(tests_pam_util_vector_t_LDADD) $(LIBS) tests/portable/$(am__dirstamp): @@ -1003,35 +1151,40 @@ tests/portable/$(DEPDIR)/$(am__dirstamp) tests/portable/asprintf.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) -tests/portable/asprintf-t$(EXEEXT): $(tests_portable_asprintf_t_OBJECTS) $(tests_portable_asprintf_t_DEPENDENCIES) tests/portable/$(am__dirstamp) + +tests/portable/asprintf-t$(EXEEXT): $(tests_portable_asprintf_t_OBJECTS) $(tests_portable_asprintf_t_DEPENDENCIES) $(EXTRA_tests_portable_asprintf_t_DEPENDENCIES) tests/portable/$(am__dirstamp) @rm -f tests/portable/asprintf-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_portable_asprintf_t_OBJECTS) $(tests_portable_asprintf_t_LDADD) $(LIBS) tests/portable/snprintf-t.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) tests/portable/snprintf.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) -tests/portable/snprintf-t$(EXEEXT): $(tests_portable_snprintf_t_OBJECTS) $(tests_portable_snprintf_t_DEPENDENCIES) tests/portable/$(am__dirstamp) + +tests/portable/snprintf-t$(EXEEXT): $(tests_portable_snprintf_t_OBJECTS) $(tests_portable_snprintf_t_DEPENDENCIES) $(EXTRA_tests_portable_snprintf_t_DEPENDENCIES) tests/portable/$(am__dirstamp) @rm -f tests/portable/snprintf-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_portable_snprintf_t_OBJECTS) $(tests_portable_snprintf_t_LDADD) $(LIBS) tests/portable/strlcat-t.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) tests/portable/strlcat.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) -tests/portable/strlcat-t$(EXEEXT): $(tests_portable_strlcat_t_OBJECTS) $(tests_portable_strlcat_t_DEPENDENCIES) tests/portable/$(am__dirstamp) + +tests/portable/strlcat-t$(EXEEXT): $(tests_portable_strlcat_t_OBJECTS) $(tests_portable_strlcat_t_DEPENDENCIES) $(EXTRA_tests_portable_strlcat_t_DEPENDENCIES) tests/portable/$(am__dirstamp) @rm -f tests/portable/strlcat-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_portable_strlcat_t_OBJECTS) $(tests_portable_strlcat_t_LDADD) $(LIBS) tests/portable/strlcpy-t.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) tests/portable/strlcpy.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) -tests/portable/strlcpy-t$(EXEEXT): $(tests_portable_strlcpy_t_OBJECTS) $(tests_portable_strlcpy_t_DEPENDENCIES) tests/portable/$(am__dirstamp) + +tests/portable/strlcpy-t$(EXEEXT): $(tests_portable_strlcpy_t_OBJECTS) $(tests_portable_strlcpy_t_DEPENDENCIES) $(EXTRA_tests_portable_strlcpy_t_DEPENDENCIES) tests/portable/$(am__dirstamp) @rm -f tests/portable/strlcpy-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_portable_strlcpy_t_OBJECTS) $(tests_portable_strlcpy_t_LDADD) $(LIBS) tests/portable/strndup-t.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) tests/portable/strndup.$(OBJEXT): tests/portable/$(am__dirstamp) \ tests/portable/$(DEPDIR)/$(am__dirstamp) -tests/portable/strndup-t$(EXEEXT): $(tests_portable_strndup_t_OBJECTS) $(tests_portable_strndup_t_DEPENDENCIES) tests/portable/$(am__dirstamp) + +tests/portable/strndup-t$(EXEEXT): $(tests_portable_strndup_t_OBJECTS) $(tests_portable_strndup_t_DEPENDENCIES) $(EXTRA_tests_portable_strndup_t_DEPENDENCIES) tests/portable/$(am__dirstamp) @rm -f tests/portable/strndup-t$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_portable_strndup_t_OBJECTS) $(tests_portable_strndup_t_LDADD) $(LIBS) tests/$(am__dirstamp): @@ -1042,64 +1195,26 @@ @: > tests/$(DEPDIR)/$(am__dirstamp) tests/tests_runtests-runtests.$(OBJEXT): tests/$(am__dirstamp) \ tests/$(DEPDIR)/$(am__dirstamp) -tests/runtests$(EXEEXT): $(tests_runtests_OBJECTS) $(tests_runtests_DEPENDENCIES) tests/$(am__dirstamp) + +tests/runtests$(EXEEXT): $(tests_runtests_OBJECTS) $(tests_runtests_DEPENDENCIES) $(EXTRA_tests_runtests_DEPENDENCIES) tests/$(am__dirstamp) @rm -f tests/runtests$(EXEEXT) $(AM_V_CCLD)$(LINK) $(tests_runtests_OBJECTS) $(tests_runtests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f kafs/kafs.$(OBJEXT) - -rm -f kafs/kafs.lo - -rm -f kafs/sys-darwin10.$(OBJEXT) - -rm -f kafs/sys-darwin10.lo - -rm -f kafs/sys-darwin8.$(OBJEXT) - -rm -f kafs/sys-darwin8.lo - -rm -f kafs/sys-linux.$(OBJEXT) - -rm -f kafs/sys-linux.lo - -rm -f kafs/sys-solaris.$(OBJEXT) - -rm -f kafs/sys-solaris.lo - -rm -f kafs/sys-syscall.$(OBJEXT) - -rm -f kafs/sys-syscall.lo - -rm -f pam-util/args.$(OBJEXT) - -rm -f pam-util/args.lo - -rm -f pam-util/logging.$(OBJEXT) - -rm -f pam-util/logging.lo - -rm -f pam-util/options.$(OBJEXT) - -rm -f pam-util/options.lo - -rm -f pam-util/vector.$(OBJEXT) - -rm -f pam-util/vector.lo - -rm -f portable/dummy.$(OBJEXT) - -rm -f portable/dummy.lo - -rm -f tests/fakepam/data.$(OBJEXT) - -rm -f tests/fakepam/logging.$(OBJEXT) - -rm -f tests/fakepam/testing.$(OBJEXT) - -rm -f tests/kafs/basic.$(OBJEXT) - -rm -f tests/kafs/haspag-t.$(OBJEXT) - -rm -f tests/module/basic-t.$(OBJEXT) - -rm -f tests/module/cells-t.$(OBJEXT) - -rm -f tests/module/fakekafs.$(OBJEXT) - -rm -f tests/module/full.$(OBJEXT) - -rm -f tests/module/hasafs-t.$(OBJEXT) - -rm -f tests/module/pag-t.$(OBJEXT) - -rm -f tests/module/sigchld-t.$(OBJEXT) - -rm -f tests/module/util.$(OBJEXT) - -rm -f tests/pam-util/args-t.$(OBJEXT) - -rm -f tests/pam-util/fakepam-t.$(OBJEXT) - -rm -f tests/pam-util/logging-t.$(OBJEXT) - -rm -f tests/pam-util/options-t.$(OBJEXT) - -rm -f tests/pam-util/vector-t.$(OBJEXT) - -rm -f tests/portable/asprintf-t.$(OBJEXT) - -rm -f tests/portable/asprintf.$(OBJEXT) - -rm -f tests/portable/snprintf-t.$(OBJEXT) - -rm -f tests/portable/snprintf.$(OBJEXT) - -rm -f tests/portable/strlcat-t.$(OBJEXT) - -rm -f tests/portable/strlcat.$(OBJEXT) - -rm -f tests/portable/strlcpy-t.$(OBJEXT) - -rm -f tests/portable/strlcpy.$(OBJEXT) - -rm -f tests/portable/strndup-t.$(OBJEXT) - -rm -f tests/portable/strndup.$(OBJEXT) - -rm -f tests/tap/tests_tap_libtap_a-basic.$(OBJEXT) - -rm -f tests/tests_runtests-runtests.$(OBJEXT) + -rm -f kafs/*.$(OBJEXT) + -rm -f kafs/*.lo + -rm -f pam-util/*.$(OBJEXT) + -rm -f pam-util/*.lo + -rm -f portable/*.$(OBJEXT) + -rm -f portable/*.lo + -rm -f tests/*.$(OBJEXT) + -rm -f tests/fakepam/*.$(OBJEXT) + -rm -f tests/kafs/*.$(OBJEXT) + -rm -f tests/module/*.$(OBJEXT) + -rm -f tests/pam-util/*.$(OBJEXT) + -rm -f tests/portable/*.$(OBJEXT) + -rm -f tests/tap/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -1119,20 +1234,24 @@ @AMDEP_TRUE@@am__include@ @am__quote@pam-util/$(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)/issetuidgid.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/issetugid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/k_haspag.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/krb5-extra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/krb5-profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/pam_syslog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/pam_vsyslog.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)/strlcat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@portable/$(DEPDIR)/strlcpy.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/fakepam/$(DEPDIR)/config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/data.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/general.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/logging.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/testing.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/script.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@tests/fakepam/$(DEPDIR)/stubs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/kafs/$(DEPDIR)/basic.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/kafs/$(DEPDIR)/haspag-t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/module/$(DEPDIR)/basic-t.Po@am__quote@ @@ -1142,7 +1261,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@tests/module/$(DEPDIR)/hasafs-t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/module/$(DEPDIR)/pag-t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/module/$(DEPDIR)/sigchld-t.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@tests/module/$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/pam-util/$(DEPDIR)/args-t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/pam-util/$(DEPDIR)/fakepam-t.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tests/pam-util/$(DEPDIR)/logging-t.Po@am__quote@ @@ -1159,65 +1277,73 @@ @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-string.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/tap/basic.c' object='tests/tap/tests_tap_libtap_a-basic.o' libtool=no @AMDEPBACKSLASH@ +@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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(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/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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/tap/basic.c' object='tests/tap/tests_tap_libtap_a-basic.obj' libtool=no @AMDEPBACKSLASH@ +@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@ +@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` + +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@ +@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 + +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@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(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/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` 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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/runtests.c' object='tests/tests_runtests-runtests.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/runtests.c' object='tests/tests_runtests-runtests.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(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/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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tests/runtests.c' object='tests/tests_runtests-runtests.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tests/runtests.c' object='tests/tests_runtests-runtests.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(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/tests_runtests-runtests.obj `if test -f 'tests/runtests.c'; then $(CYGPATH_W) 'tests/runtests.c'; else $(CYGPATH_W) '$(srcdir)/tests/runtests.c'; fi` mostlyclean-libtool: -rm -f *.lo @@ -1237,11 +1363,18 @@ -rm -f libtool config.lt install-man5: $(dist_man_MANS) @$(NORMAL_INSTALL) - test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)" - @list=''; test -n "$(man5dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.5[a-z]*$$/p'; \ + @list1=''; \ + list2='$(dist_man_MANS)'; \ + test -n "$(man5dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.5[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -1270,30 +1403,17 @@ sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags -TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1305,15 +1425,11 @@ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1322,9 +1438,31 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files 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) @case `sed 15q $(srcdir)/NEWS` in \ @@ -1333,19 +1471,6 @@ echo "NEWS not updated; not releasing" 1>&2; \ exit 1;; \ esac - @list='$(MANS)'; if test -n "$$list"; then \ - list=`for p in $$list; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ - if test -n "$$list" && \ - grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ - grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ - echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ - exit 1; \ - else :; fi; \ - else :; fi $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -1386,36 +1511,42 @@ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) 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 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -1426,8 +1557,8 @@ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -1437,17 +1568,19 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -1470,13 +1603,21 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -1511,10 +1652,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(LIBOBJS)" || rm -f $(LIBOBJS) -test -z "$(LTLIBOBJS)" || rm -f $(LTLIBOBJS) @@ -1628,24 +1774,27 @@ .MAKE: all check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am check-local \ - clean clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool clean-noinstLTLIBRARIES clean-pamLTLIBRARIES \ - ctags dist dist-all dist-bzip2 dist-gzip dist-lzma 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-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-man5 install-pamLTLIBRARIES install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ +.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am \ + check-local clean clean-checkLIBRARIES clean-checkPROGRAMS \ + clean-cscope clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-pamLTLIBRARIES 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-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-man5 install-pamLTLIBRARIES install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-man uninstall-man5 \ - uninstall-pamLTLIBRARIES + tags tags-am uninstall uninstall-am uninstall-man \ + uninstall-man5 uninstall-pamLTLIBRARIES + +.PRECIOUS: Makefile warnings: @@ -1653,7 +1802,7 @@ $(MAKE) V=0 CFLAGS='$(WARNINGS)' $(check_PROGRAMS) check-local: $(check_PROGRAMS) - cd tests && ./runtests $(abs_top_srcdir)/tests/TESTS + cd tests && ./runtests -l $(abs_top_srcdir)/tests/TESTS # 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 -Nru libpam-afs-session-2.5/NEWS libpam-afs-session-2.6/NEWS --- libpam-afs-session-2.5/NEWS 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/NEWS 2015-09-19 18:25:37.000000000 +0000 @@ -1,5 +1,52 @@ User-Visible pam-afs-session Changes +pam-afs-session 2.6 (2015-09-19) + + When pam_setcred is called with PAM_REINITIALIZE_CRED or + PAM_REFRESH_CRED, don't set the PAM data item that says to skip a + subsequent pam_open_session and delete tokens on pam_close_session. + This fixes a problem with sudo when pam_setcred is enabled, since sudo + first calls pam_setcred with PAM_REINITIALIZE_CRED and then opens a + new session. The previous code would not create a new PAG for the new + session and then would delete the caller's tokens after sudo + completed. The new behavior is more conceptually correct, since + reinitializing creds doesn't take ownership of the session, and + therefore shouldn't mean deleting them on session close. + + Fix compilation failure on Solaris 11 and later with the built-in kafs + implementation. + + Use the PATH_KRB5_CONFIG environment variable or command-line setting + to configure instead of KRB5_CONFIG to get the path to krb5-config. + The latter is used to point to an alternative krb5.conf file. + + Update to rra-c-util 5.8: + + * Improve robustness of PAM entry and exit handling. + * Do not append a PAM error message if the status is PAM_SUCCESS. + * Fix a memory leak in PAM logging. + * Pass --deps to krb5-config except with --enable-reduced-depends. + * Avoid calling krb5_get_error_message with a NULL context. + * Use krb5/krb5.h if krb5.h is not present, for NetBSD portability. + * Fix stripping of -I/usr/include from krb5-config output. + * Use manual Kerberos library probing if lib or include paths given. + * Do not assume string is nul-terminated in replacement strdup. + * Avoid using local in the shell TAP library for Solaris portability. + * Silence __attribute__ warnings on more compilers. + * Add more __format__ annotations on various utility functions. + * Adjust POD tests to handle multiple .. paths in build directory. + + Update to C TAP Harness 3.4: + + * Suppress plan and summary if bail is called before any tests run. + * Only use feature-test macros when requested or built with gcc -ansi. + * Drop is_double from the C TAP library to avoid requiring -lm. + * Avoid using local in the shell libtap.sh library. + * Silence __attribute__ warnings on more compilers. + * runtests now frees all allocated resources on exit. + * Fix runtests to honor -s even if BUILD and -b aren't given. + * Fix segfault with an empty test list. + pam-afs-session 2.5 (2011-07-25) Reset the SIGCHLD handler while spawning an external aklog program so diff -Nru libpam-afs-session-2.5/options.c libpam-afs-session-2.6/options.c --- libpam-afs-session-2.5/options.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/options.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * Parses the PAM command line for options to pam-afs-session and fills out an * allocated structure with those details. * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2008, 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -66,10 +66,14 @@ args->config = calloc(1, sizeof(struct pam_config)); if (args->config == NULL) { putil_crit(args, "cannot allocate memory: %s", strerror(errno)); + putil_args_free(args); + return NULL; + } + if (!putil_args_defaults(args, options, optlen)) { + free(args->config); + putil_args_free(args); return NULL; } - if (!putil_args_defaults(args, options, optlen)) - goto fail; if (!putil_args_krb5(args, "pam-afs-session", options, optlen)) goto fail; if (!putil_args_parse(args, argc, argv, options, optlen)) @@ -77,6 +81,10 @@ if (args->config->debug) args->debug = true; + /* UIDs are unsigned on some systems. */ + if (args->config->minimum_uid < 0) + args->config->minimum_uid = 0; + /* Warn if kdestroy was set and we can't honor it. */ #ifndef HAVE_KERBEROS if (args->config->kdestroy) @@ -87,7 +95,7 @@ return args; fail: - putil_args_free(args); + pamafs_free(args); return NULL; } diff -Nru libpam-afs-session-2.5/pam_afs_session.5 libpam-afs-session-2.6/pam_afs_session.5 --- libpam-afs-session-2.5/pam_afs_session.5 2011-07-26 00:53:16.000000000 +0000 +++ libpam-afs-session-2.6/pam_afs_session.5 2015-09-19 18:26:48.000000000 +0000 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 2.23 (Pod::Simple 3.16) +.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== @@ -38,6 +38,8 @@ . ds PI \(*p . ds L" `` . ds R" '' +. ds C` +. ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. @@ -48,17 +50,24 @@ .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" +.\" +.\" Avoid warning from groff about undefined register 'F'. +.de IX .. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX +.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 +. \} +. \} .\} +.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. @@ -124,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "PAM_AFS_SESSION 5" -.TH PAM_AFS_SESSION 5 "2011-07-25" "2.5" "pam-afs-session" +.TH PAM_AFS_SESSION 5 "2015-09-19" "2.6" "pam-afs-session" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -139,7 +148,7 @@ .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" -The \s-1AFS\s0 session service module for \s-1PAM\s0, typically installed at +The \s-1AFS\s0 session service module for \s-1PAM,\s0 typically installed at \&\fI/lib/security/pam_afs_session.so\fR, establishes new \s-1AFS\s0 sessions and obtains \s-1AFS\s0 tokens when a new session is opened for a user. It is a shared object that is dynamically loaded by the \s-1PAM\s0 subsystem as @@ -150,7 +159,7 @@ how to configure \s-1PAM\s0 on your system, see the \s-1PAM\s0 man page, often \fIpam\fR\|(7). .PP This module provides pam_setcred, pam_open_session, and pam_close_session -implementations for \s-1AFS\s0. Because pam_setcred is part of the auth \s-1PAM\s0 +implementations for \s-1AFS. \s0 Because pam_setcred is part of the auth \s-1PAM\s0 group, it also implements a dummy pam_authenticate that always succeeds (otherwise, it can't provide a pam_setcred). .PP @@ -158,7 +167,7 @@ \&\f(CW\*(C`required\*(C'\fR module in the auth group. Doing so will potentially allow users to log on without any password. There unfortunately isn't a way to work around this and still provide pam_setcred without running afoul of a -bug in (at least) Linux \s-1PAM\s0 0.99.7.1 and probably earlier that causes +bug in (at least) Linux \s-1PAM 0.99.7.1\s0 and probably earlier that causes authentication to fail when the final module in the auth group returns \&\s-1PAM_IGNORE\s0 and \f(CW\*(C`[default=done]\*(C'\fR was given as the action. .PP @@ -168,7 +177,7 @@ When a new session is opened, this module will first check to see if \s-1AFS\s0 is running on the system. If not, it will log a message and exit successfully. If \s-1AFS\s0 is running, it will place the user's session in a -new \s-1PAG\s0 (Process Authentication Group, often implemented as supplemental +new \s-1PAG \s0(Process Authentication Group, often implemented as supplemental groups, which limits user tokens to only processes in that \s-1PAG\s0). It will then attempt to obtain tokens, either directly if built with the Heimdal libkafs library and Kerberos support or by running an external \fBaklog\fR @@ -177,12 +186,12 @@ .Sp The module will only attempt to obtain tokens if the environment variable \&\s-1KRB5CCNAME\s0 is set in the environment, unless otherwise configured (see the -always_aklog option). It will always create a new \s-1PAG\s0, however. +always_aklog option). It will always create a new \s-1PAG,\s0 however. .IP "pam_close_session" 4 .IX Item "pam_close_session" If and only if pam_open_session successfully obtained \s-1AFS\s0 tokens and \s-1AFS\s0 is still running on the system, pam_close_session will delete the tokens -in the current \s-1PAG\s0 (equivalent to running \fBunlog\fR). To leave the tokens +in the current \s-1PAG \s0(equivalent to running \fBunlog\fR). To leave the tokens after session close, set the retain_after_close option. .IP "pam_setcred" 4 .IX Item "pam_setcred" @@ -194,12 +203,12 @@ attempt to get new tokens (still skipping this unless \s-1KRB5CCNAME\s0 is set in the environment or always_aklog is set). .PP -This module is primarily intended for use with a Kerberos v5 -authentication module. It does not itself do any user authentication; it -cannot, for instance, be used to authenticate users to a \fBkaserver\fR. -While it is intended for use with an \fBaklog\fR that uses Kerberos v5 ticket -caches to obtain tokens, it can be used with any \fBaklog\fR implementation -(always_aklog may have to be set if no Kerberos v5 ticket cache will be +This module is primarily intended for use with a Kerberos authentication +module. It does not itself do any user authentication; it cannot, for +instance, be used to authenticate users to a \fBkaserver\fR. While it is +intended for use with an \fBaklog\fR that uses Kerberos ticket caches to +obtain tokens, it can be used with any \fBaklog\fR implementation +(always_aklog may have to be set if no Kerberos ticket cache will be present). .PP This module performs no authorization checks and does not hook into @@ -268,7 +277,7 @@ the session is being opened or refreshed. This generally will tell \&\fBaklog\fR to check that path, find all \s-1AFS\s0 cells involved in access to that path, and attempt to obtain tokens for each one. Note that this means -that if the user's home directory is not in \s-1AFS\s0, no tokens will be +that if the user's home directory is not in \s-1AFS,\s0 no tokens will be obtained. .Sp In either case, the user's home directory is obtained via \fIgetpwnam()\fR based @@ -287,7 +296,7 @@ .IP "debug" 4 .IX Item "debug" If this option is set, additional trace information will be logged to -syslog with priority \s-1LOG_DEBUG\s0. +syslog with priority \s-1LOG_DEBUG.\s0 .IP "ignore_root" 4 .IX Item "ignore_root" If this option is set, the \s-1AFS\s0 session \s-1PAM\s0 module won't take any action @@ -313,11 +322,11 @@ .IX Item "nopag" If this option is set, no \s-1PAG\s0 will be created. Be careful when using this option, since it means that the user will inherit a \s-1PAG\s0 from the process -managing the login. If \fBsshd\fR, for instance, is started in a \s-1PAG\s0, every +managing the login. If \fBsshd\fR, for instance, is started in a \s-1PAG,\s0 every user who logs in via ssh will be put in the same \s-1PAG\s0 and will share tokens if this option is used. .Sp -This is the default on Mac \s-1OS\s0 X, where PAGs are not supported. +This is the default on Mac \s-1OS X,\s0 where PAGs are not supported. .IP "notokens" 4 .IX Item "notokens" If this option is set, the \s-1AFS\s0 session \s-1PAM\s0 module will only create a \s-1PAG\s0 @@ -417,6 +426,17 @@ to the [appdefaults] section of their \fIkrb5.conf\fR files to disable use of the krb524 service. See the Heimdal \fIkafs\fR\|(3) man page for more information. +.SH "COPYRIGHT AND LICENSE" +.IX Header "COPYRIGHT AND LICENSE" +Copyright 2015 Russ Allbery +.PP +Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIaklog\fR\|(1), \fIkafs\fR\|(3), \fIpam\fR\|(7), \fIsyslog\fR\|(3), \fIunlog\fR\|(1) diff -Nru libpam-afs-session-2.5/pam_afs_session.pod libpam-afs-session-2.6/pam_afs_session.pod --- libpam-afs-session-2.5/pam_afs_session.pod 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam_afs_session.pod 2015-09-19 18:25:37.000000000 +0000 @@ -76,12 +76,12 @@ =back -This module is primarily intended for use with a Kerberos v5 -authentication module. It does not itself do any user authentication; it -cannot, for instance, be used to authenticate users to a B. -While it is intended for use with an B that uses Kerberos v5 ticket -caches to obtain tokens, it can be used with any B implementation -(always_aklog may have to be set if no Kerberos v5 ticket cache will be +This module is primarily intended for use with a Kerberos authentication +module. It does not itself do any user authentication; it cannot, for +instance, be used to authenticate users to a B. While it is +intended for use with an B that uses Kerberos ticket caches to +obtain tokens, it can be used with any B implementation +(always_aklog may have to be set if no Kerberos ticket cache will be present). This module performs no authorization checks and does not hook into @@ -317,6 +317,18 @@ the krb524 service. See the Heimdal kafs(3) man page for more information. +=head1 COPYRIGHT AND LICENSE + +Copyright 2015 Russ Allbery + +Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 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. + =head1 SEE ALSO aklog(1), kafs(3), pam(7), syslog(3), unlog(1) diff -Nru libpam-afs-session-2.5/pam-util/args.c libpam-afs-session-2.6/pam-util/args.c --- libpam-afs-session-2.5/pam-util/args.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/args.c 2015-09-19 18:25:37.000000000 +0000 @@ -14,8 +14,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2012, 2013, 2014 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -38,7 +38,7 @@ */ #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include @@ -52,14 +52,14 @@ /* * Allocate a new pam_args struct and return it, or NULL on memory allocation - * or Kerberos initialization failure. If HAVE_KERBEROS is defined, we also + * or Kerberos initialization failure. If HAVE_KRB5 is defined, we also * allocate a Kerberos context. */ struct pam_args * putil_args_new(pam_handle_t *pamh, int flags) { struct pam_args *args; -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 krb5_error_code status; #endif @@ -69,13 +69,10 @@ return NULL; } args->pamh = pamh; - args->config = NULL; - args->user = NULL; args->silent = ((flags & PAM_SILENT) == PAM_SILENT); -#ifdef HAVE_KERBEROS - args->realm = NULL; - if (issetuidgid()) +#ifdef HAVE_KRB5 + if (issetugid()) status = krb5_init_secure_context(&args->ctx); else status = krb5_init_context(&args->ctx); @@ -84,7 +81,7 @@ free(args); return NULL; } -#endif /* HAVE_KERBEROS */ +#endif /* HAVE_KRB5 */ return args; } @@ -95,9 +92,10 @@ void putil_args_free(struct pam_args *args) { -#ifdef HAVE_KERBEROS - if (args->realm != NULL) - free(args->realm); + if (args == NULL) + return; +#ifdef HAVE_KRB5 + free(args->realm); if (args->ctx != NULL) krb5_free_context(args->ctx); #endif diff -Nru libpam-afs-session-2.5/pam-util/args.h libpam-afs-session-2.6/pam-util/args.h --- libpam-afs-session-2.5/pam-util/args.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/args.h 2015-09-19 18:25:37.000000000 +0000 @@ -12,8 +12,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -39,7 +39,7 @@ #define PAM_UTIL_ARGS_H 1 #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include @@ -55,7 +55,7 @@ bool silent; /* Do not pass text to the application. */ const char *user; /* User being authenticated. */ -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 krb5_context ctx; /* Context for Kerberos operations. */ char *realm; /* Kerberos realm for configuration. */ #endif diff -Nru libpam-afs-session-2.5/pam-util/logging.c libpam-afs-session-2.6/pam-util/logging.c --- libpam-afs-session-2.5/pam-util/logging.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/logging.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,8 +8,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2005, 2006, 2007, 2009, 2010 + * Written by Russ Allbery + * Copyright 2005, 2006, 2007, 2009, 2010, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -32,7 +32,7 @@ */ #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include @@ -47,12 +47,34 @@ # define LOG_AUTHPRIV LOG_AUTH #endif +/* Used for iterating through arrays. */ +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + +/* + * Mappings of PAM flags to symbolic names for logging when entering a PAM + * module function. + */ +static const struct { + int flag; + const char *name; +} FLAGS[] = { + { PAM_CHANGE_EXPIRED_AUTHTOK, "expired" }, + { PAM_DELETE_CRED, "delete" }, + { PAM_DISALLOW_NULL_AUTHTOK, "nonull" }, + { PAM_ESTABLISH_CRED, "establish" }, + { PAM_PRELIM_CHECK, "prelim" }, + { PAM_REFRESH_CRED, "refresh" }, + { PAM_REINITIALIZE_CRED, "reinit" }, + { PAM_SILENT, "silent" }, + { PAM_UPDATE_AUTHTOK, "update" }, +}; + /* * Utility function to format a message into newly allocated memory, reporting * an error via syslog if vasprintf fails. */ -static char * +static char * __attribute__((__format__(printf, 1, 0))) format(const char *fmt, va_list args) { char *msg; @@ -70,7 +92,7 @@ * priority, prefixed by (user ) with the account name being * authenticated if known. */ -static void +static void __attribute__((__format__(printf, 3, 0))) log_vplain(struct pam_args *pargs, int priority, const char *fmt, va_list args) { char *msg; @@ -98,7 +120,7 @@ /* * Wrapper around log_vplain with variadic arguments. */ -static void +static void __attribute__((__format__(printf, 3, 4))) log_plain(struct pam_args *pargs, int priority, const char *fmt, ...) { va_list args; @@ -113,8 +135,10 @@ * Log wrapper function for reporting a PAM error. Log a message with the * given priority, prefixed by (user ) with the account name being * authenticated if known, followed by a colon and the formatted PAM error. + * However, do not include the colon and the PAM error if the PAM status is + * PAM_SUCCESS. */ -static void +static void __attribute__((__format__(printf, 4, 0))) log_pam(struct pam_args *pargs, int priority, int status, const char *fmt, va_list args) { @@ -127,6 +151,8 @@ return; if (pargs == NULL) log_plain(NULL, priority, "%s", msg); + else if (status == PAM_SUCCESS) + log_plain(pargs, priority, "%s", msg); else log_plain(pargs, priority, "%s: %s", msg, pam_strerror(pargs->pamh, status)); @@ -140,7 +166,7 @@ * preprocessor to save duplicate code. */ #define LOG_FUNCTION(level, priority) \ - void \ + void __attribute__((__format__(printf, 2, 3))) \ putil_ ## level(struct pam_args *pargs, const char *fmt, ...) \ { \ va_list args; \ @@ -149,7 +175,7 @@ log_vplain(pargs, priority, fmt, args); \ va_end(args); \ } \ - void \ + void __attribute__((__format__(printf, 3, 4))) \ putil_ ## level ## _pam(struct pam_args *pargs, int status, \ const char *fmt, ...) \ { \ @@ -166,12 +192,56 @@ /* + * Report entry into a function. Takes the PAM arguments, the function name, + * and the flags and maps the flags to symbolic names. + */ +void +putil_log_entry(struct pam_args *pargs, const char *func, int flags) +{ + size_t i, length, offset; + char *out = NULL, *nout; + + if (!pargs->debug) + return; + if (flags != 0) + for (i = 0; i < ARRAY_SIZE(FLAGS); i++) { + if (!(flags & FLAGS[i].flag)) + continue; + if (out == NULL) { + out = strdup(FLAGS[i].name); + if (out == NULL) + break; + } else { + length = strlen(FLAGS[i].name); + nout = realloc(out, strlen(out) + length + 2); + if (nout == NULL) { + free(out); + out = NULL; + break; + } + out = nout; + offset = strlen(out); + out[offset] = '|'; + memcpy(out + offset + 1, FLAGS[i].name, length); + out[offset + 1 + length] = '\0'; + } + } + if (out == NULL) + pam_syslog(pargs->pamh, LOG_DEBUG, "%s: entry", func); + else { + pam_syslog(pargs->pamh, LOG_DEBUG, "%s: entry (%s)", func, out); + free(out); + } +} + + +/* * Report an authentication failure. This is a separate function since we * want to include various PAM metadata in the log message and put it in a * standard format. The format here is modeled after the pam_unix * authentication failure message from Linux PAM. */ -void +void __attribute__((__format__(printf, 2, 3))) putil_log_failure(struct pam_args *pargs, const char *fmt, ...) { char *msg; @@ -198,6 +268,7 @@ (tty != NULL) ? tty : "", (ruser != NULL) ? ruser : "", (rhost != NULL) ? rhost : ""); + free(msg); } @@ -205,7 +276,7 @@ * Below are the additional logging functions enabled if built with Kerberos * support, used to report Kerberos errors. */ -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 /* @@ -214,7 +285,7 @@ * authenticated if known, followed by a colon and the formatted Kerberos * error. */ -static void +static void __attribute__((__format__(printf, 4, 0))) log_krb5(struct pam_args *pargs, int priority, int status, const char *fmt, va_list args) { @@ -226,13 +297,14 @@ msg = format(fmt, args); if (msg == NULL) return; - if (pargs != NULL && pargs->ctx != NULL) + if (pargs != NULL && pargs->ctx != NULL) { k5_msg = krb5_get_error_message(pargs->ctx, status); - else - k5_msg = krb5_get_error_message(NULL, status); - log_plain(pargs, priority, "%s: %s", msg, k5_msg); + log_plain(pargs, priority, "%s: %s", msg, k5_msg); + } else { + log_plain(pargs, priority, "%s", msg); + } free(msg); - if (pargs != NULL && pargs->ctx != NULL) + if (k5_msg != NULL) krb5_free_error_message(pargs->ctx, k5_msg); } @@ -242,7 +314,7 @@ * code. */ #define LOG_FUNCTION_KRB5(level, priority) \ - void \ + void __attribute__((__format__(printf, 3, 4))) \ putil_ ## level ## _krb5(struct pam_args *pargs, int status, \ const char *fmt, ...) \ { \ @@ -257,4 +329,4 @@ LOG_FUNCTION_KRB5(notice, LOG_NOTICE) LOG_FUNCTION_KRB5(debug, LOG_DEBUG) -#endif /* HAVE_KERBEROS */ +#endif /* HAVE_KRB5 */ diff -Nru libpam-afs-session-2.5/pam-util/logging.h libpam-afs-session-2.6/pam-util/logging.h --- libpam-afs-session-2.5/pam-util/logging.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/logging.h 2015-09-19 18:25:37.000000000 +0000 @@ -4,8 +4,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2006, 2007, 2008, 2009, 2010 + * Written by Russ Allbery + * Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -32,10 +32,12 @@ #include #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include + +#include #include /* Forward declarations to avoid extra includes. */ @@ -47,9 +49,10 @@ #pragma GCC visibility push(hidden) /* - * Error reporting and debugging functions. For each log level, there are - * two functions. The _log function just prints out the message it's given. - * The _log_pam function reports a PAM error using pam_strerror. + * Error reporting and debugging functions. For each log level, there are two + * functions. The _log function just prints out the message it's given. The + * _log_pam function does the same but appends the pam_strerror results for + * the provided status code if it is not PAM_SUCCESS. */ void putil_crit(struct pam_args *, const char *, ...) __attribute__((__format__(printf, 2, 3))); @@ -73,7 +76,7 @@ * report the last Kerberos error. These are only available if built with * Kerberos support. */ -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 void putil_crit_krb5(struct pam_args *, int, const char *, ...) __attribute__((__format__(printf, 3, 4))); void putil_err_krb5(struct pam_args *, int, const char *, ...) @@ -84,9 +87,13 @@ __attribute__((__format__(printf, 3, 4))); #endif +/* Log entry to a PAM function. */ +void putil_log_entry(struct pam_args *, const char *, int flags) + __attribute__((__nonnull__)); + /* Log an authentication failure. */ void putil_log_failure(struct pam_args *, const char *, ...) - __attribute__((__format__(printf, 2, 3))); + __attribute__((__nonnull__, __format__(printf, 2, 3))); /* Undo default visibility change. */ #pragma GCC visibility pop @@ -94,8 +101,8 @@ END_DECLS /* __func__ is C99, but not provided by all implementations. */ -#if __STDC_VERSION__ < 199901L -# if __GNUC__ >= 2 +#if (__STDC_VERSION__ < 199901L) && !defined(__func__) +# if (__GNUC__ >= 2) # define __func__ __FUNCTION__ # else # define __func__ "" @@ -105,10 +112,9 @@ /* Macros to record entry and exit from the main PAM functions. */ #define ENTRY(args, flags) \ if (args->debug) \ - pam_syslog((args)->pamh, LOG_DEBUG, \ - "%s: entry (0x%x)", __func__, (flags)) + putil_log_entry((args), __func__, (flags)); #define EXIT(args, pamret) \ - if (args->debug) \ + if (args != NULL && args->debug) \ pam_syslog((args)->pamh, LOG_DEBUG, "%s: exit (%s)", __func__, \ ((pamret) == PAM_SUCCESS) ? "success" \ : (((pamret) == PAM_IGNORE) ? "ignore" : "failure")) diff -Nru libpam-afs-session-2.5/pam-util/options.c libpam-afs-session-2.6/pam-util/options.c --- libpam-afs-session-2.5/pam-util/options.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/options.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,8 +8,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2006, 2007, 2008, 2010, 2011 + * Written by Russ Allbery + * Copyright 2006, 2007, 2008, 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 @@ -32,7 +32,7 @@ */ #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include @@ -57,6 +57,16 @@ #define CONF_STRING(c, o) (char **) (void *)((char *) (c) + (o)) #define CONF_LIST(c, o) (struct vector **)(void *)((char *) (c) + (o)) +/* + * We can only process times properly if we have Kerberos. If not, they fall + * back to longs and we convert them as numbers. + */ +#ifdef HAVE_KRB5 +# define CONF_TIME(c, o) (krb5_deltat *)(void *)((char *) (c) + (o)) +#else +# define CONF_TIME(c, o) (long *) (void *)((char *) (c) + (o)) +#endif + /* * Set a vector argument to its default. This needs to do a deep copy of the @@ -128,6 +138,11 @@ for (opt = 0; opt < optlen; opt++) { bool *bp; long *lp; +#ifdef HAVE_KRB5 + krb5_deltat *tp; +#else + long *tp; +#endif char **sp; struct vector **vp; @@ -140,6 +155,10 @@ lp = CONF_NUMBER(args->config, options[opt].location); *lp = options[opt].defaults.number; break; + case TYPE_TIME: + tp = CONF_TIME(args->config, options[opt].location); + *tp = options[opt].defaults.number; + break; case TYPE_STRING: sp = CONF_STRING(args->config, options[opt].location); if (options[opt].defaults.string == NULL) @@ -169,7 +188,7 @@ } -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 /* * Load a boolean option from Kerberos appdefaults. Takes the PAM argument * struct, the section name, the realm, the option, and the result location. @@ -244,10 +263,52 @@ if (errno != 0 || *end != '\0') putil_err(args, "invalid number in krb5.conf setting for %s: %s", opt, tmp); - *result = value; + else + *result = value; } - if (tmp != NULL) - free(tmp); + free(tmp); +} + + +/* + * Load a time option from Kerberos appdefaults. Takes the PAM argument + * struct, the section name, the realm, the option, and the result location. + * The native interface doesn't support numbers, so we actually read a string + * and then convert using krb5_string_to_deltat. + */ +static void +default_time(struct pam_args *args, const char *section, const char *realm, + const char *opt, krb5_deltat *result) +{ + char *tmp = NULL; + krb5_deltat value; + krb5_error_code retval; +#ifdef HAVE_KRB5_REALM + krb5_const_realm rdata = realm; +#else + krb5_data realm_struct; + const krb5_data *rdata; + + if (realm == NULL) + rdata = NULL; + else { + rdata = &realm_struct; + realm_struct.magic = KV5M_DATA; + realm_struct.data = (void *) realm; + realm_struct.length = strlen(realm); + } +#endif + + krb5_appdefault_string(args->ctx, section, rdata, opt, "", &tmp); + if (tmp != NULL && tmp[0] != '\0') { + retval = krb5_string_to_deltat(tmp, &value); + if (retval != 0) + putil_err(args, "invalid time in krb5.conf setting for %s: %s", + opt, tmp); + else + *result = value; + } + free(tmp); } @@ -286,8 +347,11 @@ if (value != NULL) { if (value[0] == '\0') free(value); - else + else { + if (*result != NULL) + free(*result); *result = value; + } } } @@ -310,10 +374,14 @@ if (tmp != NULL) { value = vector_split_multi(tmp, " \t,", NULL); if (value == NULL) { + free(tmp); putil_crit(args, "cannot allocate vector: %s", strerror(errno)); return false; } + if (*result != NULL) + vector_free(*result); *result = value; + free(tmp); } return true; } @@ -362,6 +430,10 @@ default_number(args, section, realm, opt->name, CONF_NUMBER(args->config, opt->location)); break; + case TYPE_TIME: + default_time(args, section, realm, opt->name, + CONF_TIME(args->config, opt->location)); + break; case TYPE_STRING: default_string(args, section, realm, opt->name, CONF_STRING(args->config, opt->location)); @@ -379,7 +451,7 @@ return true; } -#else /* !HAVE_KERBEROS */ +#else /* !HAVE_KRB5 */ /* * Stub function for getting configuration information from krb5.conf used @@ -393,7 +465,7 @@ return true; } -#endif /* !HAVE_KERBEROS */ +#endif /* !HAVE_KRB5 */ /* @@ -485,6 +557,43 @@ /* + * Given a PAM argument, convert the value portion of the argument from a + * Kerberos time string to a krb5_deltat and store it in the provided + * location. If the value is missing or isn't a number, report an error and + * leave the location unchanged. + */ +#ifdef HAVE_KRB5 +static void +convert_time(struct pam_args *args, const char *arg, krb5_deltat *setting) +{ + const char *value; + krb5_deltat result; + krb5_error_code retval; + + value = strchr(arg, '='); + if (value == NULL || value[1] == '\0') { + putil_err(args, "value missing for option %s", arg); + return; + } + retval = krb5_string_to_deltat((char *) value + 1, &result); + if (retval != 0) + putil_err(args, "bad time value in setting: %s", arg); + else + *setting = result; +} + +#else /* HAVE_KRB5 */ + +static void +convert_time(struct pam_args *args, const char *arg, long *setting) +{ + convert_number(args, arg, setting); +} + +#endif /* !HAVE_KRB5 */ + + +/* * Given a PAM argument, convert the value portion of the argument to a string * and store it in the provided location. If the value is missing, report an * error and leave the location unchanged, returning true since that's a @@ -507,6 +616,7 @@ putil_crit(args, "cannot allocate memory: %s", strerror(errno)); return false; } + free(*setting); *setting = result; return true; } @@ -535,8 +645,7 @@ putil_crit(args, "cannot allocate vector: %s", strerror(errno)); return false; } - if (*setting != NULL) - vector_free(*setting); + vector_free(*setting); *setting = result; return true; } @@ -581,6 +690,10 @@ convert_number(args, argv[i], CONF_NUMBER(args->config, option->location)); break; + case TYPE_TIME: + convert_time(args, argv[i], + CONF_TIME(args->config, option->location)); + break; case TYPE_STRING: if (!convert_string(args, argv[i], CONF_STRING(args->config, option->location))) diff -Nru libpam-afs-session-2.5/pam-util/options.h libpam-afs-session-2.6/pam-util/options.h --- libpam-afs-session-2.5/pam-util/options.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/options.h 2015-09-19 18:25:37.000000000 +0000 @@ -9,8 +9,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010, 2011 + * Written by Russ Allbery + * Copyright 2010, 2011, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -36,13 +36,13 @@ #define PAM_UTIL_OPTIONS_H 1 #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include #include -#include +#include /* Forward declarations to avoid additional includes. */ struct vector; @@ -57,6 +57,7 @@ enum type { TYPE_BOOLEAN, TYPE_NUMBER, + TYPE_TIME, TYPE_STRING, TYPE_LIST, TYPE_STRLIST @@ -78,6 +79,10 @@ * Note that numbers set in the configuration struct created by this interface * must be longs, not ints. There is currently no provision for unsigned * numbers. + * + * Times take their default from defaults.number. The difference between time + * and number is in the parsing of a user-supplied value and the type of the + * stored attribute. */ struct option { const char *name; @@ -99,6 +104,7 @@ */ #define BOOL(def) TYPE_BOOLEAN, { (def), 0, NULL, NULL } #define NUMBER(def) TYPE_NUMBER, { 0, (def), NULL, NULL } +#define TIME(def) TYPE_TIME, { 0, (def), NULL, NULL } #define STRING(def) TYPE_STRING, { 0, 0, (def), NULL } #define LIST(def) TYPE_LIST, { 0, 0, NULL, (def) } #define STRLIST(def) TYPE_STRLIST, { 0, 0, (def), NULL } diff -Nru libpam-afs-session-2.5/pam-util/vector.c libpam-afs-session-2.6/pam-util/vector.c --- libpam-afs-session-2.5/pam-util/vector.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/vector.c 2015-09-19 18:25:37.000000000 +0000 @@ -20,7 +20,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -43,15 +43,7 @@ struct vector * vector_new(void) { - struct vector *vector; - - vector = malloc(sizeof(struct vector)); - if (vector == NULL) - return NULL; - vector->count = 0; - vector->allocated = 0; - vector->strings = NULL; - return vector; + return calloc(1, sizeof(struct vector)); } @@ -83,7 +75,7 @@ /* - * Resize a vector (using realloc to resize the table). Return false if + * Resize a vector (using reallocarray to resize the table). Return false if * memory allocation fails. */ bool @@ -101,7 +93,7 @@ free(vector->strings); vector->strings = NULL; } else { - strings = realloc(vector->strings, size * sizeof(char *)); + strings = reallocarray(vector->strings, size, sizeof(char *)); if (strings == NULL) return false; vector->strings = strings; @@ -154,6 +146,8 @@ void vector_free(struct vector *vector) { + if (vector == NULL) + return; vector_clear(vector); free(vector->strings); free(vector); @@ -231,7 +225,7 @@ goto fail; vector->count = 0; - for (start = string, p = string, i = 0; *p; p++) + 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)); diff -Nru libpam-afs-session-2.5/pam-util/vector.h libpam-afs-session-2.6/pam-util/vector.h --- libpam-afs-session-2.5/pam-util/vector.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/pam-util/vector.h 2015-09-19 18:25:37.000000000 +0000 @@ -19,7 +19,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -37,7 +37,7 @@ #include #include -#include +#include struct vector { size_t count; @@ -85,8 +85,7 @@ __attribute__((__nonnull__)); /* Free the vector and all resources allocated for it. */ -void vector_free(struct vector *) - __attribute__((__nonnull__)); +void vector_free(struct vector *); /* * Split functions build a vector from a string. vector_split_multi splits on @@ -96,7 +95,9 @@ * to only have partial results. * * Empty strings will yield zero-length vectors. Adjacent delimiters are - * treated as a single delimiter by vector_split_multi. + * treated as a single delimiter by vector_split_multi. Any leading or + * trailing delimiters are ignored, so this function will never create + * zero-length strings (similar to the behavior of strtok). */ struct vector *vector_split_multi(const char *string, const char *seps, struct vector *) diff -Nru libpam-afs-session-2.5/portable/asprintf.c libpam-afs-session-2.6/portable/asprintf.c --- libpam-afs-session-2.5/portable/asprintf.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/asprintf.c 2015-09-19 18:25:37.000000000 +0000 @@ -7,7 +7,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -19,20 +19,27 @@ */ #include +#include #include +#include + /* * If we're running the test suite, rename the functions to avoid conflicts * with the system versions. */ #if TESTING +# 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); +int test_vasprintf(char **, const char *, va_list) + __attribute__((__format__(printf, 2, 0))); #endif + int asprintf(char **strp, const char *fmt, ...) { @@ -45,11 +52,12 @@ return status; } + int vasprintf(char **strp, const char *fmt, va_list args) { va_list args_copy; - int status, needed; + int status, needed, oerrno; va_copy(args_copy, args); needed = vsnprintf(NULL, 0, fmt, args_copy); @@ -65,8 +73,10 @@ if (status >= 0) return status; else { + oerrno = errno; free(*strp); *strp = NULL; + errno = oerrno; return status; } } diff -Nru libpam-afs-session-2.5/portable/dummy.c libpam-afs-session-2.6/portable/dummy.c --- libpam-afs-session-2.5/portable/dummy.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/dummy.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,7 +8,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -19,8 +19,10 @@ * work. */ -/* Prototype to avoid gcc warnings. */ -int portable_dummy(void); +#include + +/* Prototype to avoid gcc warnings and set visibility. */ +int portable_dummy(void) __attribute__((__visibility__("hidden"))); int portable_dummy(void) diff -Nru libpam-afs-session-2.5/portable/issetugid.c libpam-afs-session-2.6/portable/issetugid.c --- libpam-afs-session-2.5/portable/issetugid.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/portable/issetugid.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,34 @@ +/* + * Replacement for a missing issetugid. + * + * Simulates the functionality as the Solaris function issetugid, which + * returns true if the running program was setuid or setgid. The replacement + * test is not quite as comprehensive as what the Solaris function does, but + * it should be good enough. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * + * 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. + */ + +#include +#include + +int +issetugid(void) +{ + if (getuid() != geteuid()) + return 1; + if (getgid() != getegid()) + return 1; + return 0; +} diff -Nru libpam-afs-session-2.5/portable/issetuidgid.c libpam-afs-session-2.6/portable/issetuidgid.c --- libpam-afs-session-2.5/portable/issetuidgid.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/issetuidgid.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,34 +0,0 @@ -/* - * Replacement for a missing issetuidgid. - * - * Simulates the functionality as the Solaris function issetuidgid, which - * returns true if the running program was setuid or setgid. The replacement - * test is not quite as comprehensive as what the Solaris function does, but - * it should be good enough. - * - * The canonical version of this file is maintained in the rra-c-util package, - * which can be found at . - * - * Written by Russ Allbery - * - * 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. - */ - -#include -#include - -int -issetuidgid(void) -{ - if (getuid() != geteuid()) - return 1; - if (getgid() != getegid()) - return 1; - return 0; -} diff -Nru libpam-afs-session-2.5/portable/kafs.h libpam-afs-session-2.6/portable/kafs.h --- libpam-afs-session-2.5/portable/kafs.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/kafs.h 2015-09-19 18:25:37.000000000 +0000 @@ -15,8 +15,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2006, 2007, 2008, 2010 + * Written by Russ Allbery + * Copyright 2006, 2007, 2008, 2010, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -42,7 +42,7 @@ #define PORTABLE_KAFS_H 1 #include -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 # include #endif #include @@ -64,9 +64,23 @@ # include # elif HAVE_KOPENAFS_H # include +# else +struct ViceIoctl { + void *in, *out; + short in_size; + short out_size; +}; +int k_hasafs(void); +int k_pioctl(char *, struct ViceIoctl *, void *, int); +int k_setpag(void); +int k_unlog(void); # endif -# ifndef HAVE_K_HASPAG +# ifdef HAVE_K_HASPAG +# if !defined(HAVE_KAFS_H) && !defined(HAVE_KOPENAFS_H) int k_haspag(void); +# endif +# else +int k_haspag(void) __attribute__((__visibility__("hidden"))); # endif /* We're linking directly to the OpenAFS libraries. */ @@ -75,12 +89,14 @@ # include # else int lsetpag(void); +int lpioctl(char *, int, void *, int); # endif -# define k_hasafs() (1) -# define k_setpag() lsetpag() -# define k_unlog() (errno = ENOSYS, -1) +# define k_hasafs() (1) +# define k_pioctl(p, c, a, f) lpioctl((p), (c), (a), (f)) +# define k_setpag() lsetpag() +# define k_unlog() (errno = ENOSYS, -1) -int k_haspag(void); +int k_haspag(void) __attribute__((__visibility__("hidden"))); /* We're using our local kafs replacement. */ #elif HAVE_KAFS_REPLACEMENT @@ -92,19 +108,26 @@ short out_size; }; +/* Default to a hidden visibility for all portability functions. */ +#pragma GCC visibility push(hidden) + int k_hasafs(void); int k_haspag(void); int k_pioctl(char *, int, struct ViceIoctl *, int); int k_setpag(void); int k_unlog(void); +/* Undo default visibility change. */ +#pragma GCC visibility pop + /* We have no kafs implementation available. */ #else # undef HAVE_KAFS -# define k_hasafs() (0) -# define k_haspag() (0) -# define k_setpag() (errno = ENOSYS, -1) -# define k_unlog() (errno = ENOSYS, -1) +# define k_hasafs() (0) +# define k_haspag() (0) +# define k_pioctl(p, c, a, f) (errno = ENOSYS, -1) +# define k_setpag() (errno = ENOSYS, -1) +# define k_unlog() (errno = ENOSYS, -1) #endif END_DECLS diff -Nru libpam-afs-session-2.5/portable/k_haspag.c libpam-afs-session-2.6/portable/k_haspag.c --- libpam-afs-session-2.5/portable/k_haspag.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/k_haspag.c 2015-09-19 18:25:37.000000000 +0000 @@ -11,7 +11,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -63,7 +63,7 @@ * system call. Fall back on analyzing the groups. */ ngroups = getgroups(0, NULL); - groups = malloc(sizeof(*groups) * ngroups); + groups = calloc(ngroups, sizeof(*groups)); if (groups == NULL) return 0; ngroups = getgroups(ngroups, groups); diff -Nru libpam-afs-session-2.5/portable/krb5-extra.c libpam-afs-session-2.6/portable/krb5-extra.c --- libpam-afs-session-2.5/portable/krb5-extra.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/krb5-extra.c 2015-09-19 18:25:37.000000000 +0000 @@ -9,7 +9,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -33,6 +34,8 @@ # include # elif defined(HAVE_ET_COM_ERR_H) # include +# elif defined(HAVE_KERBEROSV5_COM_ERR_H) +# include # else # include # endif diff -Nru libpam-afs-session-2.5/portable/krb5.h libpam-afs-session-2.6/portable/krb5.h --- libpam-afs-session-2.5/portable/krb5.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/krb5.h 2015-09-19 18:25:37.000000000 +0000 @@ -19,7 +19,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -42,7 +42,13 @@ #endif #include -#include +#if defined(HAVE_KRB5_H) +# include +#elif defined(HAVE_KERBEROSV5_KRB5_H) +# include +#else +# include +#endif #include BEGIN_DECLS @@ -62,9 +68,13 @@ const char *, const char *, char **); #endif -/* MIT-specific. The Heimdal documentation says to use free(). */ +/* + * 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) free(r) +# define krb5_free_default_realm(c, r) krb5_xfree(r) #endif /* @@ -94,4 +104,6 @@ /* Undo default visibility change. */ #pragma GCC visibility pop +END_DECLS + #endif /* !PORTABLE_KRB5_H */ diff -Nru libpam-afs-session-2.5/portable/macros.h libpam-afs-session-2.6/portable/macros.h --- libpam-afs-session-2.5/portable/macros.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/macros.h 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -30,6 +30,30 @@ #endif /* + * We use __alloc_size__, but it was only available in fairly recent versions + * of GCC. Suppress warnings about the unknown attribute if GCC is too old. + * We know that we're GCC at this point, so we can use the GCC variadic macro + * extension, which will still work with versions of GCC too old to have C99 + * 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 +#endif + +/* + * LLVM and Clang pretend to be GCC but don't support all of the __attribute__ + * settings that GCC does. For them, suppress warnings about unknown + * attributes on declarations. This unfortunately will affect the entire + * compilation context, but there's no push and pop available. + */ +#if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__)) +# pragma GCC diagnostic ignored "-Wattributes" +#endif + +/* * BEGIN_DECLS is used at the beginning of declarations so that C++ * compilers don't mangle their names. END_DECLS is used at the end. */ diff -Nru libpam-afs-session-2.5/portable/pam.h libpam-afs-session-2.6/portable/pam.h --- libpam-afs-session-2.5/portable/pam.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/pam.h 2015-09-19 18:25:37.000000000 +0000 @@ -8,7 +8,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -50,6 +50,47 @@ #endif #include +/* Solaris doesn't have these. */ +#ifndef PAM_CONV_AGAIN +# define PAM_CONV_AGAIN 0 +# define PAM_INCOMPLETE PAM_SERVICE_ERR +#endif + +/* Solaris 8 has deficient PAM. */ +#ifndef PAM_AUTHTOK_RECOVER_ERR +# define PAM_AUTHTOK_RECOVER_ERR PAM_AUTHTOK_ERR +#endif + +/* + * Mac OS X 10 doesn't define these. They're meant to be logically or'd with + * an exit status in pam_set_data, so define them to 0 if not defined to + * deactivate them. + */ +#ifndef PAM_DATA_REPLACE +# define PAM_DATA_REPLACE 0 +#endif +#ifndef PAM_DATA_SILENT +# define PAM_DATA_SILENT 0 +#endif + +/* + * Mac OS X 10 apparently doesn't use PAM_BAD_ITEM and returns PAM_SYMBOL_ERR + * instead. + */ +#ifndef PAM_BAD_ITEM +# define PAM_BAD_ITEM PAM_SYMBOL_ERR +#endif + +/* + * Some PAM implementations support building the module static and exporting + * the call points via a struct instead. (This is the default in OpenPAM, for + * example.) To support this, the pam_sm_* functions are declared PAM_EXTERN. + * Ensure that's defined for implementations that don't have this. + */ +#ifndef PAM_EXTERN +# define PAM_EXTERN +#endif + BEGIN_DECLS /* Default to a hidden visibility for all portability functions. */ @@ -76,4 +117,6 @@ /* Undo default visibility change. */ #pragma GCC visibility pop +END_DECLS + #endif /* !PORTABLE_PAM_H */ diff -Nru libpam-afs-session-2.5/portable/pam_syslog.c libpam-afs-session-2.6/portable/pam_syslog.c --- libpam-afs-session-2.5/portable/pam_syslog.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/pam_syslog.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,7 +8,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 diff -Nru libpam-afs-session-2.5/portable/pam_vsyslog.c libpam-afs-session-2.6/portable/pam_vsyslog.c --- libpam-afs-session-2.5/portable/pam_vsyslog.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/pam_vsyslog.c 2015-09-19 18:25:37.000000000 +0000 @@ -12,7 +12,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 diff -Nru libpam-afs-session-2.5/portable/reallocarray.c libpam-afs-session-2.6/portable/reallocarray.c --- libpam-afs-session-2.5/portable/reallocarray.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/portable/reallocarray.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * Replacement for a missing reallocarray. + * + * Provides the same functionality as the OpenBSD library function + * reallocarray for those systems that don't have it. This function is the + * same as realloc, but takes the size arguments in the same form as calloc + * and checks for overflow so that the caller doesn't need to. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * + * 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. + */ + +#include +#include + +#include + +/* + * If we're running the test suite, rename reallocarray to avoid conflicts + * with the system version. #undef it first because some systems may define + * it to another name. + */ +#if TESTING +# undef reallocarray +# define reallocarray test_reallocarray +void *test_reallocarray(void *, size_t, size_t); +#endif + +/* + * nmemb * size cannot overflow if both are smaller than sqrt(SIZE_MAX). We + * can calculate that value statically by using 2^(sizeof(size_t) * 8) as the + * value of SIZE_MAX and then taking the square root, which gives + * 2^(sizeof(size_t) * 4). Compute the exponentiation with shift. + */ +#define CHECK_THRESHOLD (1UL << (sizeof(size_t) * 4)) + +void * +reallocarray(void *ptr, size_t nmemb, size_t size) +{ + if (nmemb >= CHECK_THRESHOLD || size >= CHECK_THRESHOLD) + if (nmemb > 0 && SIZE_MAX / nmemb <= size) { + errno = ENOMEM; + return NULL; + } + return realloc(ptr, nmemb * size); +} diff -Nru libpam-afs-session-2.5/portable/snprintf.c libpam-afs-session-2.6/portable/snprintf.c --- libpam-afs-session-2.5/portable/snprintf.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/snprintf.c 2015-09-19 18:25:37.000000000 +0000 @@ -2,8 +2,9 @@ * Replacement for a missing snprintf or vsnprintf. * * The following implementation of snprintf was taken mostly verbatim from - * ; it is the version of snprintf - * used in Mutt. + * ; it is the version of snprintf + * used in Mutt. A possibly newer version is used in wget, found at + * . * * Please do not reformat or otherwise change this file more than necessary so * that later merges with the original source are easy. Bug fixes and @@ -18,6 +19,8 @@ * conflicts with the system version. */ #if TESTING +# undef snprintf +# undef vsnprintf # define snprintf test_snprintf # define vsnprintf test_vsnprintf #endif @@ -73,7 +76,7 @@ * fixed handling of %.0f * added test for HAVE_LONG_DOUBLE * - * Russ Allbery 2000-08-26 + * Russ Allbery 2000-08-26 * fixed return value to comply with C99 * fixed handling of snprintf(NULL, ...) * @@ -432,7 +435,7 @@ break; case 'w': /* not supported yet, treat as next char */ - ch = *format++; + format++; break; default: /* Unknown, skip */ @@ -695,7 +698,7 @@ /* For each leading 0 in fractional part, print one more fractional digit. */ LDOUBLE temp; - if (ufvalue != 0) + if (ufvalue > 0) for (temp = ufvalue; temp < 0.1; temp *= 10) ++max; } diff -Nru libpam-afs-session-2.5/portable/stdbool.h libpam-afs-session-2.6/portable/stdbool.h --- libpam-afs-session-2.5/portable/stdbool.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/stdbool.h 2015-09-19 18:25:37.000000000 +0000 @@ -8,7 +8,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -22,6 +22,14 @@ #ifndef PORTABLE_STDBOOL_H #define PORTABLE_STDBOOL_H 1 +/* + * Allow inclusion of config.h to be skipped, since sometimes we have to use a + * stripped-down version of config.h with a different name. + */ +#ifndef CONFIG_H_INCLUDED +# include +#endif + #if HAVE_STDBOOL_H # include #else diff -Nru libpam-afs-session-2.5/portable/strlcat.c libpam-afs-session-2.6/portable/strlcat.c --- libpam-afs-session-2.5/portable/strlcat.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/strlcat.c 2015-09-19 18:25:37.000000000 +0000 @@ -12,7 +12,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -31,6 +31,7 @@ * the system version. */ #if TESTING +# undef strlcat # define strlcat test_strlcat size_t test_strlcat(char *, const char *, size_t); #endif diff -Nru libpam-afs-session-2.5/portable/strlcpy.c libpam-afs-session-2.6/portable/strlcpy.c --- libpam-afs-session-2.5/portable/strlcpy.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/strlcpy.c 2015-09-19 18:25:37.000000000 +0000 @@ -11,7 +11,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -30,6 +30,7 @@ * the system version. */ #if TESTING +# undef strlcpy # define strlcpy test_strlcpy size_t test_strlcpy(char *, const char *, size_t); #endif diff -Nru libpam-afs-session-2.5/portable/strndup.c libpam-afs-session-2.6/portable/strndup.c --- libpam-afs-session-2.5/portable/strndup.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/strndup.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -33,6 +33,7 @@ char * strndup(const char *s, size_t n) { + const char *p; size_t length; char *copy; @@ -40,9 +41,11 @@ errno = EINVAL; return NULL; } - length = strlen(s); - if (length > n) - length = n; + + /* Don't assume that the source string is nul-terminated. */ + for (p = s; (size_t) (p - s) < n && *p != '\0'; p++) + ; + length = p - s; copy = malloc(length + 1); if (copy == NULL) return NULL; diff -Nru libpam-afs-session-2.5/portable/system.h libpam-afs-session-2.6/portable/system.h --- libpam-afs-session-2.5/portable/system.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/portable/system.h 2015-09-19 18:25:37.000000000 +0000 @@ -5,15 +5,17 @@ * file is the equivalent of including all of the following headers, * portably: * - * #include + * #include + * #include * #include * #include + * #include * #include * #include - * #include * #include * #include * #include + * #include * #include * * Missing functions are provided via #define or prototyped if available from @@ -22,7 +24,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -43,21 +45,22 @@ #include /* A set of standard ANSI C headers. We don't care about pre-ANSI systems. */ +#if HAVE_INTTYPES_H +# include +#endif +#include #include #include +#if HAVE_STDINT_H +# include +#endif #include #include -#include #include #if HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H -# include -#endif -#if HAVE_STDINT_H -# include -#endif +#include #if HAVE_UNISTD_H # include #endif @@ -70,6 +73,43 @@ /* Get the bool type. */ #include +/* Windows provides snprintf under a different name. */ +#ifdef _WIN32 +# define snprintf _snprintf +#endif + +/* Define sig_atomic_t if it's not available in signal.h. */ +#ifndef HAVE_SIG_ATOMIC_T +typedef int sig_atomic_t; +#endif + +/* Windows does not define ssize_t. */ +#ifndef HAVE_SSIZE_T +typedef ptrdiff_t ssize_t; +#endif + +/* + * POSIX requires that these be defined in . If one of them has + * been defined, all the rest almost certainly have. + */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 +#endif + +/* + * C99 requires va_copy. Older versions of GCC provide __va_copy. Per the + * 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 +#endif + BEGIN_DECLS /* Default to a hidden visibility for all portability functions. */ @@ -92,13 +132,16 @@ #if !HAVE_DECL_VSNPRINTF extern int vsnprintf(char *, size_t, const char *, va_list); #endif -#if !HAVE_ISSETUIDGID -extern int issetuidgid(void); +#if !HAVE_ISSETUGID +extern int issetugid(void); #endif -#if !HAVE_STRLCAT +#if !HAVE_REALLOCARRAY +extern void *reallocarray(void *, size_t, size_t); +#endif +#if !HAVE_DECL_STRLCAT extern size_t strlcat(char *, const char *, size_t); #endif -#if !HAVE_STRLCPY +#if !HAVE_DECL_STRLCPY extern size_t strlcpy(char *, const char *, size_t); #endif #if !HAVE_STRNDUP @@ -110,31 +153,4 @@ END_DECLS -/* Windows provides snprintf under a different name. */ -#ifdef _WIN32 -# define snprintf _snprintf -#endif - -/* - * POSIX requires that these be defined in . If one of them has - * been defined, all the rest almost certainly have. - */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -# define STDOUT_FILENO 1 -# define STDERR_FILENO 2 -#endif - -/* - * C99 requires va_copy. Older versions of GCC provide __va_copy. Per the - * 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 -#endif - #endif /* !PORTABLE_SYSTEM_H */ diff -Nru libpam-afs-session-2.5/public.c libpam-afs-session-2.6/public.c --- libpam-afs-session-2.5/public.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/public.c 2015-09-19 18:25:37.000000000 +0000 @@ -5,7 +5,7 @@ * pam_sm_close_session functions, plus whatever other stubs we need to * satisfy PAM. * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2006, 2007, 2008, 2010 * The Board of Trustees of the Leland Stanford Junior University * @@ -26,7 +26,7 @@ /* * Open a new session. Create a new PAG with k_setpag and then fork the aklog - * binary as the user. A Kerberos v5 PAM module should have previously run to + * binary as the user. A Kerberos PAM module should have previously run to * obtain Kerberos tickets (or ticket forwarding should have already * happened). */ @@ -73,7 +73,7 @@ /* Get tokens. */ if (!args->config->notokens) - pamret = pamafs_token_get(args); + pamret = pamafs_token_get(args, false); /* Error codes are returned for pam_setcred. Map to pam_open_sesssion. */ if (pamret != PAM_SUCCESS && pamret != PAM_IGNORE) @@ -117,6 +117,7 @@ int status; int pamret = PAM_SUCCESS; const void *dummy; + bool reinitialize; args = pamafs_init(pamh, flags, argc, argv); if (args == NULL) { @@ -163,7 +164,8 @@ * we're reinitializing, we may be running in a screen saver or the like * and should use the existing PAG, so don't create a new PAG. */ - if (!(flags & (PAM_REINITIALIZE_CRED | PAM_REFRESH_CRED))) { + reinitialize = (flags & (PAM_REINITIALIZE_CRED | PAM_REFRESH_CRED)); + if (!reinitialize) { status = pam_get_data(pamh, "pam_afs_session", &dummy); if (status == PAM_SUCCESS) { if (!k_haspag() && !args->config->nopag) @@ -180,7 +182,7 @@ } } if (!args->config->notokens) - pamret = pamafs_token_get(args); + pamret = pamafs_token_get(args, reinitialize); done: EXIT(args, pamret); diff -Nru libpam-afs-session-2.5/README libpam-afs-session-2.6/README --- libpam-afs-session-2.5/README 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/README 2015-09-19 18:25:37.000000000 +0000 @@ -1,16 +1,16 @@ - pam-afs-session 2.5 + pam-afs-session 2.6 (PAM module for AFS PAGs and tokens) - Written by Russ Allbery + Written by Russ Allbery - Copyright 2005, 2006, 2007, 2008, 2010, 2011 The Board of Trustees of - the Leland Stanford Junior University. This software is distributed - under a BSD-style license. See the LICENSE file, included in this - distribution, for copyright and redistribution information. + Copyright 2015 Russ Allbery . Copyright 2005, 2006, + 2007, 2008, 2010, 2011 The Board of Trustees of the Leland Stanford + Junior University. This software is distributed under a BSD-style + license. Plese see the section LICENSE below for more information. BLURB - pam-afs-session is a PAM module intended for use with a Kerberos v5 PAM + pam-afs-session is a PAM module intended for use with a Kerberos PAM module to obtain an AFS PAG and AFS tokens on login. It puts every new session in a PAG regardless of whether it was authenticated with Kerberos and either uses Heimdal's libkafs or runs a configurable @@ -23,11 +23,11 @@ pam-afs-session is a PAM module that isolates each login in a separate AFS PAG (so that they will not trample on each other's AFS tokens) and supports either running an external program to obtain AFS tokens from a - Kerberos v5 ticket cache or using Heimdal's libkafs library. It does - not obtain tickets itself and must be used in conjunction with a - Kerberos v5 PAM module to obtain tokens (setting up PAGs can be done - without any Kerberos implementations). It provides only the setcred and - session PAM functions. + Kerberos ticket cache or using Heimdal's libkafs library. It does not + obtain tickets itself and must be used in conjunction with a Kerberos + PAM module to obtain tokens (setting up PAGs can be done without any + Kerberos implementations). It provides only the setcred and session PAM + functions. There are two ways this module can obtain tokens: @@ -257,10 +257,10 @@ /usr/bin/aklog was in your path when the module was compiled or was specified via the --with-aklog option to configure. - You may want to stack your Kerberos v5 PAM module and the Unix module + You may want to stack your Kerberos PAM module and the Unix module differently, but note that this module should always run after the - Kerberos v5 PAM module. If there is no ticket cache available in the - PAM environment, it will succeed silently. + Kerberos PAM module. If there is no ticket cache available in the PAM + environment, it will succeed silently. On Red Hat systems, modify /etc/pam.d/system-auth instead; it contains all of the configuration for the different stacks. @@ -283,8 +283,8 @@ Solaris Solaris doesn't support the [] keywords that Linux PAM does, so if you - want to mark the Kerberos v5 PAM module as sufficient and fall back on - the Unix module only if it fails, you won't be able to easily run + want to mark the Kerberos PAM module as sufficient and fall back on the + Unix module only if it fails, you won't be able to easily run pam_afs_session in the auth group. For most applications, this isn't a problem; running pam_afs_session only from the session group with something like: @@ -293,16 +293,16 @@ minimum_uid=100 retain_after_close (all on one line) in /etc/pam.conf will be sufficient. Make sure this - line is after the Kerberos v5 PAM module's session call. + line is after the Kerberos PAM module's session call. However, note that login and dtlogin, at least under Solaris 10, apparently call pam_open_session before pam_setcred, and the - open_session function of the native Kerberos v5 PAM module doesn't set - up the ticket cache. This means that calling pam_afs_session only in - the session group won't work, since it will be called before the setcred - function of the Kerberos v5 PAM module and hence won't have a ticket - cache available yet. There are two possible solutions: replace the - native Kerberos v5 PAM module with another module, such as: + open_session function of the native Kerberos PAM module doesn't set up + the ticket cache. This means that calling pam_afs_session only in the + session group won't work, since it will be called before the setcred + function of the Kerberos PAM module and hence won't have a ticket cache + available yet. There are two possible solutions: replace the native + Kerberos PAM module with another module, such as: http://www.eyrie.org/~eagle/software/pam-krb5/ @@ -312,8 +312,8 @@ login auth required /usr/local/lib/security/pam_afs_session.so minimum_uid=100 - after the Kerberos v5 PAM module (and likewise for dtlogin). This means - that you cannot use sufficient in the auth group for the Kerberos v5 PAM + after the Kerberos PAM module (and likewise for dtlogin). This means + that you cannot use sufficient in the auth group for the Kerberos PAM module, since that will then abort the group before pam_afs_session runs. @@ -412,7 +412,7 @@ http://git.eyrie.org/?p=afs/pam-afs-session.git -THANKS +HISTORY AND ACKNOWLEDGEMENTS Some of the ideas behind this PAM module (although not the code) are taken from the libpam-openafs-session Debian package written by Sam @@ -437,3 +437,45 @@ Thanks to Markus Moeller for multiple patches and suggestions for improved portability for pam-krb5, from which this module has also benefitted. + +LICENSE + + The pam-afs-session package as a whole is covered by the following + copyright statement and license: + + Copyright 2015 Russ Allbery + Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011 + 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: + + 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. + + All individual files without an explicit exception below are released + under this license. Some files may have additional copyright holders as + noted in those files. There is detailed information about the licensing + of each file in the LICENSE file in this distribution. + + Some files in this distribution are individually released under + different licenses, all of which are compatible with the above general + package license but which may require preservation of additional + notices. All required notices are preserved in the LICENSE file. Each + file intended for copying into other software packages contains a + copyright and license notice at the top or bottom of the file. Please + take note of any attribution and notice requirements specified in that + license. diff -Nru libpam-afs-session-2.5/tests/data/krb5.conf libpam-afs-session-2.6/tests/data/krb5.conf --- libpam-afs-session-2.5/tests/data/krb5.conf 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/krb5.conf 2015-09-19 18:25:37.000000000 +0000 @@ -10,6 +10,7 @@ testing = { minimum_uid = 1000 ignore_root = false + expires = 30m FOO.COM = { cells = foo.com,bar.com } @@ -23,4 +24,7 @@ bad-number = { minimum_uid = 1000foo } + bad-time = { + expires = ft87 + } debug = true diff -Nru libpam-afs-session-2.5/tests/data/krb5-pam.conf libpam-afs-session-2.6/tests/data/krb5-pam.conf --- libpam-afs-session-2.5/tests/data/krb5-pam.conf 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/krb5-pam.conf 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,30 @@ +# Test krb5.conf file for PAM option parsing. + +[appdefaults] + FOO.COM = { + program = /bin/false + } + BAR.COM = { + program = echo /bin/true + } + testing = { + minimum_uid = 1000 + ignore_root = false + expires = 30m + FOO.COM = { + cells = foo.com,bar.com + } + BAR.COM = { + cells = bar.com foo.com + } + } + other-test = { + minimum_uid = -1000 + } + bad-number = { + minimum_uid = 1000foo + } + bad-time = { + expires = ft87 + } + debug = true diff -Nru libpam-afs-session-2.5/tests/data/perl.conf libpam-afs-session-2.6/tests/data/perl.conf --- libpam-afs-session-2.5/tests/data/perl.conf 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/perl.conf 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,4 @@ +# Configuration for Perl tests. -*- perl -*- + +# File must end with this line. +1; diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/establish libpam-afs-session-2.6/tests/data/scripts/basic/establish --- libpam-afs-session-2.5/tests/data/scripts/basic/establish 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/establish 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,12 @@ +# Test pam_setcred credential establishment. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/establish-debug libpam-afs-session-2.6/tests/data/scripts/basic/establish-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/establish-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/establish-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,20 @@ +# Test pam_setcred credential establishment (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 debug + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (establish) + DEBUG running %0 as UID %1 + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (establish) + DEBUG skipping, apparently already ran + DEBUG pam_sm_setcred: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/noop libpam-afs-session-2.6/tests/data/scripts/basic/noop --- libpam-afs-session-2.5/tests/data/scripts/basic/noop 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/noop 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,18 @@ +# Test authenticate and session no-op behavior. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = nopag notokens + session = nopag notokens + +[run] + authenticate = PAM_SUCCESS + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_SUCCESS + close_session = PAM_IGNORE diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/noop-debug libpam-afs-session-2.6/tests/data/scripts/basic/noop-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/noop-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/noop-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,34 @@ +# Test authenticate and session no-op behavior (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = nopag notokens debug + session = nopag notokens debug + +[run] + authenticate = PAM_SUCCESS + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_SUCCESS + close_session = PAM_IGNORE + +[output] + DEBUG pam_sm_setcred: entry (delete) + DEBUG skipping as configured + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (establish) + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (refresh) + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (reinit) + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_open_session: entry + DEBUG pam_sm_open_session: exit (success) + DEBUG pam_sm_close_session: entry + DEBUG skipping as configured + DEBUG pam_sm_close_session: exit (ignore) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/no-ticket libpam-afs-session-2.6/tests/data/scripts/basic/no-ticket --- libpam-afs-session-2.5/tests/data/scripts/basic/no-ticket 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/no-ticket 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,16 @@ +# Test behavior without a ticket. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 + session = program=%0 + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/no-ticket-debug libpam-afs-session-2.6/tests/data/scripts/basic/no-ticket-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/no-ticket-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/no-ticket-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,33 @@ +# Test behavior without a ticket (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 debug + session = program=%0 debug + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (establish) + DEBUG skipping tokens, no Kerberos ticket cache + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (refresh) + DEBUG skipping tokens, no Kerberos ticket cache + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (reinit) + DEBUG skipping tokens, no Kerberos ticket cache + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_open_session: entry + DEBUG skipping tokens, no Kerberos ticket cache + DEBUG pam_sm_open_session: exit (success) + DEBUG pam_sm_close_session: entry + DEBUG skipping, no open session + DEBUG pam_sm_close_session: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/open-session libpam-afs-session-2.6/tests/data/scripts/basic/open-session --- libpam-afs-session-2.5/tests/data/scripts/basic/open-session 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/open-session 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,12 @@ +# Test pam_open_session. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + session = program=%0 + +[run] + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/open-session-debug libpam-afs-session-2.6/tests/data/scripts/basic/open-session-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/open-session-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/open-session-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,20 @@ +# Test pam_open_session (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + session = program=%0 debug + +[run] + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS + +[output] + DEBUG pam_sm_open_session: entry + DEBUG running %0 as UID %1 + DEBUG pam_sm_open_session: exit (success) + DEBUG pam_sm_close_session: entry + DEBUG destroying tokens + DEBUG pam_sm_close_session: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/refresh libpam-afs-session-2.6/tests/data/scripts/basic/refresh --- libpam-afs-session-2.5/tests/data/scripts/basic/refresh 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/refresh 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,11 @@ +# Test pam_setcred credential refresh. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 + +[run] + setcred(REFRESH_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/refresh-debug libpam-afs-session-2.6/tests/data/scripts/basic/refresh-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/refresh-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/refresh-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,16 @@ +# Test pam_setcred credential refresh (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 debug + +[run] + setcred(REFRESH_CRED) = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (refresh) + DEBUG running %0 as UID %1 + DEBUG pam_sm_setcred: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/reinit libpam-afs-session-2.6/tests/data/scripts/basic/reinit --- libpam-afs-session-2.5/tests/data/scripts/basic/reinit 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/reinit 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,11 @@ +# Test pam_setcred credential reinitialization. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 + +[run] + setcred(REINITIALIZE_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/reinit-debug libpam-afs-session-2.6/tests/data/scripts/basic/reinit-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/reinit-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/reinit-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,16 @@ +# Test pam_setcred credential reinitialization (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 debug + +[run] + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (reinit) + DEBUG running %0 as UID %1 + DEBUG pam_sm_setcred: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/unknown libpam-afs-session-2.6/tests/data/scripts/basic/unknown --- libpam-afs-session-2.5/tests/data/scripts/basic/unknown 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/unknown 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,24 @@ +# Test behavior with unknown user. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 + session = program=%0 + +[run] + authenticate = PAM_SUCCESS + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_USER_UNKNOWN + setcred(REFRESH_CRED) = PAM_USER_UNKNOWN + setcred(REINITIALIZE_CRED) = PAM_USER_UNKNOWN + open_session = PAM_SESSION_ERR + close_session = PAM_SUCCESS + +[output] + ERR cannot find UID for pam-afs-session-unknown-user: %1 + ERR cannot find UID for pam-afs-session-unknown-user: %1 + ERR cannot find UID for pam-afs-session-unknown-user: %1 + ERR cannot find UID for pam-afs-session-unknown-user: %1 diff -Nru libpam-afs-session-2.5/tests/data/scripts/basic/unknown-debug libpam-afs-session-2.6/tests/data/scripts/basic/unknown-debug --- libpam-afs-session-2.5/tests/data/scripts/basic/unknown-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/basic/unknown-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,37 @@ +# Test behavior with unknown user (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 debug + session = program=%0 debug + +[run] + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_USER_UNKNOWN + setcred(REFRESH_CRED) = PAM_USER_UNKNOWN + setcred(REINITIALIZE_CRED) = PAM_USER_UNKNOWN + open_session = PAM_SESSION_ERR + close_session = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (delete) + DEBUG skipping, no open session + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (establish) + ERR cannot find UID for pam-afs-session-unknown-user: %1 + DEBUG pam_sm_setcred: exit (failure) + DEBUG pam_sm_setcred: entry (refresh) + ERR cannot find UID for pam-afs-session-unknown-user: %1 + DEBUG pam_sm_setcred: exit (failure) + DEBUG pam_sm_setcred: entry (reinit) + ERR cannot find UID for pam-afs-session-unknown-user: %1 + DEBUG pam_sm_setcred: exit (failure) + DEBUG pam_sm_open_session: entry + ERR cannot find UID for pam-afs-session-unknown-user: %1 + DEBUG pam_sm_open_session: exit (failure) + DEBUG pam_sm_close_session: entry + DEBUG skipping, no open session + DEBUG pam_sm_close_session: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/establish libpam-afs-session-2.6/tests/data/scripts/cells/establish --- libpam-afs-session-2.5/tests/data/scripts/cells/establish 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/establish 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,11 @@ +# Test pam_setcred credential establishment. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 afs_cells=%1 + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/establish-debug libpam-afs-session-2.6/tests/data/scripts/cells/establish-debug --- libpam-afs-session-2.5/tests/data/scripts/cells/establish-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/establish-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,18 @@ +# Test pam_setcred credential establishment (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 afs_cells=%1 debug + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (establish) + DEBUG passing -c example.com to aklog + DEBUG passing -c example.edu to aklog + DEBUG running %2 as UID %3 + DEBUG pam_sm_setcred: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/open-session libpam-afs-session-2.6/tests/data/scripts/cells/open-session --- libpam-afs-session-2.5/tests/data/scripts/cells/open-session 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/open-session 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,12 @@ +# Test pam_open_session. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + session = program=%0 afs_cells=%1 + +[run] + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/open-session-debug libpam-afs-session-2.6/tests/data/scripts/cells/open-session-debug --- libpam-afs-session-2.5/tests/data/scripts/cells/open-session-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/open-session-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,22 @@ +# Test pam_open_session (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + session = program=%0 afs_cells=%1 debug + +[run] + open_session = PAM_SUCCESS + close_session = PAM_SUCCESS + +[output] + DEBUG pam_sm_open_session: entry + DEBUG passing -c example.com to aklog + DEBUG passing -c example.edu to aklog + DEBUG running %2 as UID %3 + DEBUG pam_sm_open_session: exit (success) + DEBUG pam_sm_close_session: entry + DEBUG destroying tokens + DEBUG pam_sm_close_session: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/reinit libpam-afs-session-2.6/tests/data/scripts/cells/reinit --- libpam-afs-session-2.5/tests/data/scripts/cells/reinit 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/reinit 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,11 @@ +# Test pam_setcred credential reinitialization. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 afs_cells=%1 + +[run] + setcred(REINITIALIZE_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/data/scripts/cells/reinit-debug libpam-afs-session-2.6/tests/data/scripts/cells/reinit-debug --- libpam-afs-session-2.5/tests/data/scripts/cells/reinit-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/cells/reinit-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,18 @@ +# Test pam_setcred credential reinitialization (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 afs_cells=%1 debug + +[run] + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + +[output] + DEBUG pam_sm_setcred: entry (reinit) + DEBUG passing -c example.com to aklog + DEBUG passing -c example.edu to aklog + DEBUG running %2 as UID %3 + DEBUG pam_sm_setcred: exit (success) diff -Nru libpam-afs-session-2.5/tests/data/scripts/hasafs/unavailable libpam-afs-session-2.6/tests/data/scripts/hasafs/unavailable --- libpam-afs-session-2.5/tests/data/scripts/hasafs/unavailable 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/hasafs/unavailable 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,22 @@ +# Test authenticate and session without AFS. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[run] + authenticate = PAM_SUCCESS + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_IGNORE + close_session = PAM_IGNORE + +[output] + ERR skipping, AFS apparently not available + ERR skipping, AFS apparently not available + ERR skipping, AFS apparently not available + ERR skipping, AFS apparently not available + ERR skipping, AFS apparently not available + ERR skipping, AFS apparently not available diff -Nru libpam-afs-session-2.5/tests/data/scripts/hasafs/unavailable-debug libpam-afs-session-2.6/tests/data/scripts/hasafs/unavailable-debug --- libpam-afs-session-2.5/tests/data/scripts/hasafs/unavailable-debug 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/hasafs/unavailable-debug 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,38 @@ +# Test authenticate and session without AFS (debug). -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = debug + session = debug + +[run] + authenticate = PAM_SUCCESS + setcred(DELETE_CRED) = PAM_SUCCESS + setcred(ESTABLISH_CRED) = PAM_SUCCESS + setcred(REFRESH_CRED) = PAM_SUCCESS + setcred(REINITIALIZE_CRED) = PAM_SUCCESS + open_session = PAM_IGNORE + close_session = PAM_IGNORE + +[output] + DEBUG pam_sm_setcred: entry (delete) + ERR skipping, AFS apparently not available + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (establish) + ERR skipping, AFS apparently not available + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (refresh) + ERR skipping, AFS apparently not available + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_setcred: entry (reinit) + ERR skipping, AFS apparently not available + DEBUG pam_sm_setcred: exit (success) + DEBUG pam_sm_open_session: entry + ERR skipping, AFS apparently not available + DEBUG pam_sm_open_session: exit (ignore) + DEBUG pam_sm_close_session: entry + ERR skipping, AFS apparently not available + DEBUG pam_sm_close_session: exit (ignore) diff -Nru libpam-afs-session-2.5/tests/data/scripts/sigchld/establish libpam-afs-session-2.6/tests/data/scripts/sigchld/establish --- libpam-afs-session-2.5/tests/data/scripts/sigchld/establish 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/data/scripts/sigchld/establish 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,11 @@ +# Run the aklog program to do SIGCHLD testing. -*- conf -*- +# +# Copyright 2015 Russ Allbery +# +# See LICENSE for licensing terms. + +[options] + auth = program=%0 always_aklog nopag + +[run] + setcred(ESTABLISH_CRED) = PAM_SUCCESS diff -Nru libpam-afs-session-2.5/tests/docs/pod-spelling-t libpam-afs-session-2.6/tests/docs/pod-spelling-t --- libpam-afs-session-2.5/tests/docs/pod-spelling-t 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/docs/pod-spelling-t 2015-09-19 18:25:37.000000000 +0000 @@ -1,75 +1,51 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # -# Check for spelling errors in POD documentation +# Checks all POD files in the tree for spelling errors using Test::Spelling. # -# Checks all POD files in the tree for spelling problems using Pod::Spell and -# either aspell or ispell. aspell is preferred. This test is disabled unless -# RRA_MAINTAINER_TESTS is set, since spelling dictionaries vary too much -# between environments. +# The canonical version of this file is maintained in the rra-c-util package, +# which can be found at . # -# Copyright 2008, 2009 Russ Allbery +# Written by Russ Allbery +# Copyright 2012, 2013, 2014 +# The Board of Trustees of the Leland Stanford Junior University # -# See LICENSE for licensing terms. +# 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. +use 5.006; use strict; +use warnings; + +use lib "$ENV{SOURCE}/tap/perl"; + use Test::More; +use Test::RRA qw(skip_unless_author use_prereq); +use Test::RRA::Automake qw(automake_setup perl_dirs); + +# 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'); + +# Load prerequisite modules. +use_prereq('Test::Spelling'); + +# Set up Automake testing. +automake_setup(); -# Skip all spelling tests unless the maintainer environment variable is set. -plan skip_all => 'Spelling tests only run for maintainer' - unless $ENV{RRA_MAINTAINER_TESTS}; - -# Load required Perl modules. -eval 'use Test::Pod 1.00'; -plan skip_all => 'Test::Pod 1.00 required for testing POD' if $@; -eval 'use Pod::Spell'; -plan skip_all => 'Pod::Spell required to test POD spelling' if $@; - -# Locate a spell-checker. hunspell is not currently supported due to its lack -# of support for contractions (at least in the version in Debian). -my @spell; -my %options = (aspell => [ qw(-d en_US --home-dir=./ list) ], - ispell => [ qw(-d american -l -p /dev/null) ]); -SEARCH: for my $program (qw/aspell ispell/) { - for my $dir (split ':', $ENV{PATH}) { - if (-x "$dir/$program") { - @spell = ("$dir/$program", @{ $options{$program} }); - } - last SEARCH if @spell; - } -} -plan skip_all => 'aspell or ispell required to test POD spelling' - unless @spell; - -# Prerequisites are satisfied, so we're going to do some testing. Figure out -# what POD files we have and from that develop our plan. -$| = 1; -my @pod = map { s,[^/.][^/]*/../,,g; $_ } - ("$ENV{SOURCE}/../pam_afs_session.pod"); -plan tests => scalar @pod; - -# Finally, do the checks. -for my $pod (@pod) { - my $child = open (CHILD, '-|'); - if (not defined $child) { - die "Cannot fork: $!\n"; - } elsif ($child == 0) { - my $pid = open (SPELL, '|-', @spell) or die "Cannot run @spell: $!\n"; - open (POD, '<', $pod) or die "Cannot open $pod: $!\n"; - my $parser = Pod::Spell->new; - $parser->parse_from_filehandle (\*POD, \*SPELL); - close POD; - close SPELL; - exit ($? >> 8); - } else { - my @words = ; - close CHILD; - SKIP: { - skip "@spell failed for $pod", 1 unless $? == 0; - for (@words) { - s/^\s+//; - s/\s+$//; - } - is ("@words", '', $pod); - } - } -} +# Run the tests. +all_pod_files_spelling_ok(perl_dirs()); diff -Nru libpam-afs-session-2.5/tests/docs/pod-t libpam-afs-session-2.6/tests/docs/pod-t --- libpam-afs-session-2.5/tests/docs/pod-t 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/docs/pod-t 2015-09-19 18:25:37.000000000 +0000 @@ -1,16 +1,52 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # -# Test POD formatting for C TAP Harness documentation. +# Check all POD documents in the tree, except for any embedded Perl module +# distribution, for POD formatting errors. # -# Copyright 2009, 2010 Russ Allbery +# The canonical version of this file is maintained in the rra-c-util package, +# which can be found at . # -# See LICENSE for licensing terms. +# Written by Russ Allbery +# Copyright 2012, 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: +# +# 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. +use 5.006; use strict; +use warnings; + +use lib "$ENV{SOURCE}/tap/perl"; + use Test::More; -eval 'use Test::Pod 1.00'; -plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; -my $srcdir = "$ENV{SOURCE}"; -$srcdir =~ s,[^/]+/*$,,; -chdir "$srcdir" or die "$0: cannot chdir to $srcdir: $!\n"; -all_pod_files_ok ('pam_afs_session.pod'); +use Test::RRA qw(skip_unless_automated use_prereq); +use Test::RRA::Automake qw(automake_setup perl_dirs); + +# 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'); + +# Load prerequisite modules. +use_prereq('Test::Pod'); + +# Set up Automake testing. +automake_setup(); + +# Run the tests. +all_pod_files_ok(perl_dirs()); diff -Nru libpam-afs-session-2.5/tests/fakepam/config.c libpam-afs-session-2.6/tests/fakepam/config.c --- libpam-afs-session-2.5/tests/fakepam/config.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/config.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,679 @@ +/* + * Run a PAM interaction script for testing. + * + * Provides an interface that loads a PAM interaction script from a file and + * runs through that script, calling the internal PAM module functions and + * checking their results. This allows automation of PAM testing through + * external data files instead of coding everything in C. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 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 + * 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. + */ + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +/* Used for enumerating arrays. */ +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + +/* Mapping of strings to PAM function pointers and group numbers. */ +static const struct { + const char *name; + pam_call call; + enum group_type group; +} CALLS[] = { + { "acct_mgmt", pam_sm_acct_mgmt, GROUP_ACCOUNT }, + { "authenticate", pam_sm_authenticate, GROUP_AUTH }, + { "setcred", pam_sm_setcred, GROUP_AUTH }, + { "chauthtok", pam_sm_chauthtok, GROUP_PASSWORD }, + { "open_session", pam_sm_open_session, GROUP_SESSION }, + { "close_session", pam_sm_close_session, GROUP_SESSION }, +}; + +/* Mapping of PAM flag names without the leading PAM_ to values. */ +static const struct { + const char *name; + int value; +} FLAGS[] = { + { "CHANGE_EXPIRED_AUTHTOK", PAM_CHANGE_EXPIRED_AUTHTOK }, + { "DISALLOW_NULL_AUTHTOK", PAM_DISALLOW_NULL_AUTHTOK }, + { "DELETE_CRED", PAM_DELETE_CRED }, + { "ESTABLISH_CRED", PAM_ESTABLISH_CRED }, + { "PRELIM_CHECK", PAM_PRELIM_CHECK }, + { "REFRESH_CRED", PAM_REFRESH_CRED }, + { "REINITIALIZE_CRED", PAM_REINITIALIZE_CRED }, + { "SILENT", PAM_SILENT }, + { "UPDATE_AUTHTOK", PAM_UPDATE_AUTHTOK }, +}; + +/* Mapping of strings to PAM groups. */ +static const struct { + const char *name; + enum group_type group; +} GROUPS[] = { + { "account", GROUP_ACCOUNT }, + { "auth", GROUP_AUTH }, + { "password", GROUP_PASSWORD }, + { "session", GROUP_SESSION }, +}; + +/* Mapping of strings to PAM return values. */ +static const struct { + const char *name; + int status; +} RETURNS[] = { + { "PAM_AUTH_ERR", PAM_AUTH_ERR }, + { "PAM_AUTHINFO_UNAVAIL", PAM_AUTHINFO_UNAVAIL }, + { "PAM_IGNORE", PAM_IGNORE }, + { "PAM_NEW_AUTHTOK_REQD", PAM_NEW_AUTHTOK_REQD }, + { "PAM_SESSION_ERR", PAM_SESSION_ERR }, + { "PAM_SUCCESS", PAM_SUCCESS }, + { "PAM_USER_UNKNOWN", PAM_USER_UNKNOWN }, +}; + +/* Mapping of PAM prompt styles to their values. */ +static const struct { + const char *name; + int style; +} STYLES[] = { + { "echo_off", PAM_PROMPT_ECHO_OFF }, + { "echo_on", PAM_PROMPT_ECHO_ON }, + { "error_msg", PAM_ERROR_MSG }, + { "info", PAM_TEXT_INFO }, +}; + +/* Mappings of strings to syslog priorities. */ +static const struct { + const char *name; + int priority; +} PRIORITIES[] = { + { "DEBUG", LOG_DEBUG }, + { "INFO", LOG_INFO }, + { "NOTICE", LOG_NOTICE }, + { "ERR", LOG_ERR }, + { "CRIT", LOG_CRIT }, +}; + + +/* + * Given a pointer to a string, skip any leading whitespace and return a + * pointer to the first non-whitespace character. + */ +static char * +skip_whitespace(char *p) +{ + while (isspace((unsigned char)(*p))) + p++; + return p; +} + + +/* + * Read a line from a file into a BUFSIZ buffer, failing if the line was too + * long to fit into the buffer, and returns a copy of that line in newly + * allocated memory. Ignores blank lines and comments. Caller is responsible + * for freeing. Returns NULL on end of file and fails on read errors. + */ +static char * +readline(FILE *file) +{ + char buffer[BUFSIZ]; + char *line, *first; + + do { + line = fgets(buffer, sizeof(buffer), file); + if (line == NULL) { + if (feof(file)) + return NULL; + sysbail("cannot read line from script"); + } + if (buffer[strlen(buffer) - 1] != '\n') + bail("script line too long"); + buffer[strlen(buffer) - 1] = '\0'; + first = skip_whitespace(buffer); + } while (first[0] == '#' || first[0] == '\0'); + line = bstrdup(buffer); + return line; +} + + +/* + * Given the name of a PAM call, map it to a call enum. This is used later in + * switch statements to determine which function to call. Fails on any + * unrecognized string. If the optional second argument is not NULL, also + * store the group number in that argument. + */ +static pam_call +string_to_call(const char *name, enum group_type *group) +{ + size_t i; + + for (i = 0; i < ARRAY_SIZE(CALLS); i++) + if (strcmp(name, CALLS[i].name) == 0) { + if (group != NULL) + *group = CALLS[i].group; + return CALLS[i].call; + } + bail("unrecognized PAM call %s", name); +} + + +/* + * Given a PAM flag value without the leading PAM_, map it to the numeric + * value of that flag. Fails on any unrecognized string. + */ +static enum group_type +string_to_flag(const char *name) +{ + size_t i; + + for (i = 0; i < ARRAY_SIZE(FLAGS); i++) + if (strcmp(name, FLAGS[i].name) == 0) + return FLAGS[i].value; + bail("unrecognized PAM flag %s", name); +} + + +/* + * Given a PAM group name, map it to the array index for the options array for + * that group. Fails on any unrecognized string. + */ +static enum group_type +string_to_group(const char *name) +{ + size_t i; + + for (i = 0; i < ARRAY_SIZE(GROUPS); i++) + if (strcmp(name, GROUPS[i].name) == 0) + return GROUPS[i].group; + bail("unrecognized PAM group %s", name); +} + + +/* + * Given a syslog priority name, map it to the numeric value of that priority. + * Fails on any unrecognized string. + */ +static int +string_to_priority(const char *name) +{ + size_t i; + + for (i = 0; i < ARRAY_SIZE(PRIORITIES); i++) + if (strcmp(name, PRIORITIES[i].name) == 0) + return PRIORITIES[i].priority; + bail("unrecognized syslog priority %s", name); +} + + +/* + * Given a PAM return status, map it to the actual expected value. Fails on + * any unrecognized string. + */ +static int +string_to_status(const char *name) +{ + size_t i; + + if (name == NULL) + bail("no PAM status on line"); + for (i = 0; i < ARRAY_SIZE(RETURNS); i++) + if (strcmp(name, RETURNS[i].name) == 0) + return RETURNS[i].status; + bail("unrecognized PAM status %s", name); +} + + +/* + * Given a PAM prompt style value without the leading PAM_PROMPT_, map it to + * the numeric value of that flag. Fails on any unrecognized string. + */ +static int +string_to_style(const char *name) +{ + size_t i; + + for (i = 0; i < ARRAY_SIZE(STYLES); i++) + if (strcmp(name, STYLES[i].name) == 0) + return STYLES[i].style; + bail("unrecognized PAM prompt style %s", name); +} + + +/* + * We found a section delimiter while parsing another section. Rewind our + * input file back before the section delimiter so that we'll read it again. + * Takes the length of the line we read, which is used to determine how far to + * rewind. + */ +static void +rewind_section(FILE *script, size_t length) +{ + if (fseek(script, -length - 1, SEEK_CUR) != 0) + sysbail("cannot rewind file"); +} + + +/* + * Given a string that may contain %-escapes, expand it into the resulting + * value. The following escapes are supported: + * + * %i current UID (not target user UID) + * %n new password + * %p password + * %u username + * %0 user-supplied string + * ... + * %9 user-supplied string + * + * The %* escape is preserved as-is, as it has to be interpreted at the time + * of checking output. Returns the expanded string in newly-allocated memory. + */ +static char * +expand_string(const char *template, const struct script_config *config) +{ + size_t length = 0; + const char *p, *extra; + char *output, *out; + char *uid = NULL; + + length = 0; + for (p = template; *p != '\0'; p++) { + if (*p != '%') + length++; + else { + p++; + switch (*p) { + case 'i': + if (uid == NULL) + basprintf(&uid, "%lu", (unsigned long) getuid()); + length += strlen(uid); + break; + case 'n': + if (config->newpass == NULL) + bail("new password not set"); + length += strlen(config->newpass); + break; + case 'p': + if (config->password == NULL) + bail("password not set"); + length += strlen(config->password); + break; + case 'u': + length += strlen(config->user); + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + if (config->extra[*p - '0'] == NULL) + bail("extra script parameter %%%c not set", *p); + length += strlen(config->extra[*p - '0']); + break; + case '*': + length += 2; + break; + default: + length++; + break; + } + } + } + output = bmalloc(length + 1); + for (p = template, out = output; *p != '\0'; p++) { + if (*p != '%') + *out++ = *p; + else { + p++; + switch (*p) { + case 'i': + memcpy(out, uid, strlen(uid)); + out += strlen(uid); + break; + case 'n': + memcpy(out, config->newpass, strlen(config->newpass)); + out += strlen(config->newpass); + break; + case 'p': + memcpy(out, config->password, strlen(config->password)); + out += strlen(config->password); + break; + case 'u': + memcpy(out, config->user, strlen(config->user)); + out += strlen(config->user); + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + extra = config->extra[*p - '0']; + memcpy(out, extra, strlen(extra)); + out += strlen(extra); + break; + case '*': + *out++ = '%'; + *out++ = '*'; + break; + default: + *out++ = *p; + break; + } + } + } + *out = '\0'; + free(uid); + return output; +} + + +/* + * Given a whitespace-delimited string of PAM options, split it into an argv + * array and argc count and store it in the provided option struct. + */ +static void +split_options(char *string, struct options *options, + const struct script_config *config) +{ + char *opt; + size_t size, count; + + for (opt = strtok(string, " "); opt != NULL; opt = strtok(NULL, " ")) { + if (options->argv == NULL) { + options->argv = bcalloc(2, sizeof(const char *)); + options->argv[0] = expand_string(opt, config); + options->argc = 1; + } else { + count = (options->argc + 2); + size = sizeof(const char *); + options->argv = breallocarray(options->argv, count, size); + options->argv[options->argc] = expand_string(opt, config); + options->argv[options->argc + 1] = NULL; + options->argc++; + } + } +} + + +/* + * Parse the options section of a PAM script. This consists of one or more + * lines in the format: + * + * = + * + * where options are either option names or option=value pairs, where the + * value may not contain whitespace. Returns an options struct, which stores + * argc and argv values for each group. + * + * Takes the work struct as an argument and puts values into its array. + */ +static void +parse_options(FILE *script, struct work *work, + const struct script_config *config) +{ + char *line, *group, *token; + size_t length; + enum group_type type; + + for (line = readline(script); line != NULL; line = readline(script)) { + length = strlen(line); + group = strtok(line, " "); + if (group == NULL) + bail("malformed script line"); + if (group[0] == '[') + break; + type = string_to_group(group); + token = strtok(NULL, " "); + if (token == NULL || strcmp(token, "=") != 0) + bail("malformed action line near %s", token); + token = strtok(NULL, ""); + split_options(token, &work->options[type], config); + free(line); + } + if (line != NULL) { + free(line); + rewind_section(script, length); + } +} + + +/* + * Parse the call portion of a PAM call in the run section of a PAM script. + * This handles parsing the PAM flags that optionally may be given as part of + * the call. Takes the token representing the call and a pointer to the + * action struct to fill in with the call and the option flags. + */ +static void +parse_call(char *token, struct action *action) +{ + char *flags, *flag; + + action->flags = 0; + flags = strchr(token, '('); + if (flags != NULL) { + *flags = '\0'; + flags++; + for (flag = strtok(flags, "|,)"); flag != NULL; + flag = strtok(NULL, "|,)")) { + action->flags |= string_to_flag(flag); + } + } + action->call = string_to_call(token, &action->group); +} + + +/* + * Parse the run section of a PAM script. This consists of one or more lines + * in the format: + * + * = + * + * where is a PAM call and is what it should return. Returns + * a linked list of actions. Fails on any error in parsing. + */ +static struct action * +parse_run(FILE *script) +{ + struct action *head = NULL, *current, *next; + char *line, *token, *call; + size_t length; + + for (line = readline(script); line != NULL; line = readline(script)) { + length = strlen(line); + token = strtok(line, " "); + if (token[0] == '[') + break; + next = bmalloc(sizeof(struct action)); + next->next = NULL; + if (head == NULL) + head = next; + else + current->next = next; + next->name = bstrdup(token); + call = token; + token = strtok(NULL, " "); + if (token == NULL || strcmp(token, "=") != 0) + bail("malformed action line near %s", token); + token = strtok(NULL, " "); + next->status = string_to_status(token); + parse_call(call, next); + free(line); + current = next; + } + if (head == NULL) + bail("empty run section in script"); + if (line != NULL) { + free(line); + rewind_section(script, length); + } + return head; +} + + +/* + * Parse the output section of a PAM script. This consists of zero or more + * lines in the format: + * + * PRIORITY some output information + * PRIORITY /output regex/ + * + * where PRIORITY is replaced by the numeric syslog priority corresponding to + * that priority and the rest of the output undergoes %-esacape expansion. + * Returns the accumulated output as a vector. + */ +static struct output * +parse_output(FILE *script, const struct script_config *config) +{ + char *line, *token, *message; + struct output *output = NULL; + int priority; + + output = output_new(); + if (output == NULL) + sysbail("cannot allocate vector"); + for (line = readline(script); line != NULL; line = readline(script)) { + token = strtok(line, " "); + priority = string_to_priority(token); + token = strtok(NULL, ""); + if (token == NULL) + bail("malformed line %s", line); + message = expand_string(token, config); + output_add(output, priority, message); + free(message); + free(line); + } + return output; +} + + +/* + * Parse the prompts section of a PAM script. This consists of zero or more + * lines in one of the formats: + * + * type = prompt + * type = /prompt/ + * type = prompt|response + * type = /prompt/|response + * + * If the type is error_msg or info, there is no response. Otherwise, + * everything after the last | is taken to be the response that should be + * provided to that prompt. The response undergoes %-escape expansion. + */ +static struct prompts * +parse_prompts(FILE *script, const struct script_config *config) +{ + struct prompts *prompts = NULL; + struct prompt *prompt; + char *line, *token, *style, *end; + size_t size, count, i, length; + + for (line = readline(script); line != NULL; line = readline(script)) { + length = strlen(line); + token = strtok(line, " "); + if (token[0] == '[') + break; + if (prompts == NULL) { + prompts = bcalloc(1, sizeof(struct prompts)); + prompts->prompts = bcalloc(1, sizeof(struct prompt)); + prompts->allocated = 1; + } else if (prompts->allocated == prompts->size) { + count = prompts->allocated * 2; + size = sizeof(struct prompt); + prompts->prompts = breallocarray(prompts->prompts, count, size); + prompts->allocated = count; + for (i = prompts->size; i < prompts->allocated; i++) { + prompts->prompts[i].prompt = NULL; + prompts->prompts[i].response = NULL; + } + } + prompt = &prompts->prompts[prompts->size]; + style = token; + token = strtok(NULL, " "); + if (token == NULL || strcmp(token, "=") != 0) + bail("malformed prompt line near %s", token); + prompt->style = string_to_style(style); + token = strtok(NULL, ""); + if (prompt->style == PAM_ERROR_MSG || prompt->style == PAM_TEXT_INFO) + prompt->prompt = expand_string(token, config); + else { + end = strrchr(token, '|'); + if (end == NULL) + bail("malformed prompt line near %s", prompt->prompt); + *end = '\0'; + prompt->prompt = expand_string(token, config); + token = end + 1; + prompt->response = expand_string(token, config); + } + prompts->size++; + free(line); + } + if (line != NULL) { + free(line); + rewind_section(script, length); + } + return prompts; +} + + +/* + * Parse a PAM interaction script. This handles parsing of the top-level + * section markers and dispatches the parsing to other functions. Returns the + * total work to do as a work struct. + */ +struct work * +parse_script(FILE *script, const struct script_config *config) +{ + struct work *work; + char *line, *token; + + work = bmalloc(sizeof(struct work)); + memset(work, 0, sizeof(struct work)); + work->actions = NULL; + for (line = readline(script); line != NULL; line = readline(script)) { + token = strtok(line, " "); + if (token[0] != '[') + bail("line outside of section: %s", line); + if (strcmp(token, "[options]") == 0) + parse_options(script, work, config); + else if (strcmp(token, "[run]") == 0) + work->actions = parse_run(script); + else if (strcmp(token, "[output]") == 0) + work->output = parse_output(script, config); + else if (strcmp(token, "[prompts]") == 0) + work->prompts = parse_prompts(script, config); + else + bail("unknown section: %s", token); + free(line); + } + if (work->actions == NULL) + bail("no run section defined"); + return work; +} diff -Nru libpam-afs-session-2.5/tests/fakepam/data.c libpam-afs-session-2.6/tests/fakepam/data.c --- libpam-afs-session-2.5/tests/fakepam/data.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/data.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,8 +8,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2011, 2014 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -35,7 +35,7 @@ #include #include -#include +#include /* Used for unused parameters to silence gcc warnings. */ #define UNUSED __attribute__((__unused__)) @@ -74,7 +74,7 @@ for (p = pamh->data; p != NULL; p = p->next) if (strcmp(p->name, item) == 0) { if (p->cleanup != NULL) - p->cleanup (pamh, p->data, PAM_DATA_REPLACE); + p->cleanup(pamh, p->data, PAM_DATA_REPLACE); p->data = data; p->cleanup = cleanup; return PAM_SUCCESS; @@ -96,6 +96,97 @@ /* + * Retrieve a PAM item. Currently, this only supports a limited subset of the + * possible items. + */ +int +pam_get_item(const pam_handle_t *pamh, int item, PAM_CONST void **data) +{ + switch (item) { + case PAM_AUTHTOK: + *data = pamh->authtok; + return PAM_SUCCESS; + case PAM_CONV: + if (pamh->conversation) { + *data = pamh->conversation; + return PAM_SUCCESS; + } else { + return PAM_BAD_ITEM; + } + case PAM_OLDAUTHTOK: + *data = pamh->oldauthtok; + return PAM_SUCCESS; + case PAM_RHOST: + *data = (PAM_CONST char *) pamh->rhost; + return PAM_SUCCESS; + case PAM_RUSER: + *data = (PAM_CONST char *) pamh->ruser; + return PAM_SUCCESS; + case PAM_SERVICE: + *data = (PAM_CONST char *) pamh->service; + return PAM_SUCCESS; + case PAM_TTY: + *data = (PAM_CONST char *) pamh->tty; + return PAM_SUCCESS; + case PAM_USER: + *data = (PAM_CONST char *) pamh->user; + return PAM_SUCCESS; + case PAM_USER_PROMPT: + *data = "login: "; + return PAM_SUCCESS; + default: + return PAM_BAD_ITEM; + } +} + + +/* + * Set a PAM item. Currently only PAM_USER is supported. + */ +int +pam_set_item(pam_handle_t *pamh, int item, PAM_CONST void *data) +{ + switch (item) { + case PAM_AUTHTOK: + free(pamh->authtok); + pamh->authtok = strdup(data); + if (pamh->authtok == NULL) + return PAM_BUF_ERR; + return PAM_SUCCESS; + case PAM_OLDAUTHTOK: + free(pamh->oldauthtok); + pamh->oldauthtok = strdup(data); + if (pamh->oldauthtok == NULL) + return PAM_BUF_ERR; + return PAM_SUCCESS; + case PAM_RHOST: + free(pamh->rhost); + pamh->rhost = strdup(data); + if (pamh->rhost == NULL) + return PAM_BUF_ERR; + return PAM_SUCCESS; + case PAM_RUSER: + free(pamh->ruser); + pamh->ruser = strdup(data); + if (pamh->ruser == NULL) + return PAM_BUF_ERR; + return PAM_SUCCESS; + case PAM_TTY: + free(pamh->tty); + pamh->tty = strdup(data); + if (pamh->tty == NULL) + return PAM_BUF_ERR; + return PAM_SUCCESS; + case PAM_USER: + pamh->user = (const char *) data; + return PAM_SUCCESS; + default: + return PAM_BAD_ITEM; + } +} + + +/* * Return the user for the PAM context. */ int @@ -147,7 +238,7 @@ } for (i = 0; pamh->environ[i] != NULL; i++) ; - env = malloc((i + 1) * sizeof(char *)); + env = calloc(i + 1, sizeof(char *)); if (env == NULL) return NULL; for (i = 0; pamh->environ[i] != NULL; i++) { @@ -181,12 +272,13 @@ int pam_putenv(pam_handle_t *pamh, const char *setting) { + char *copy; const char *equals; size_t namelen; bool delete = false; bool found = false; size_t i, j; - const char **env; + char **env; if (setting == NULL) return PAM_PERM_DENIED; @@ -197,15 +289,22 @@ delete = true; namelen = strlen(setting); } + if (!delete) { + copy = strdup(setting); + if (copy == NULL) + return PAM_BUF_ERR; + } /* Handle the first call to pam_putenv. */ if (pamh->environ == NULL) { if (delete) return PAM_BAD_ITEM; - pamh->environ = malloc(2 * sizeof(char *)); - if (pamh->environ == NULL) + pamh->environ = calloc(2, sizeof(char *)); + if (pamh->environ == NULL) { + free(copy); return PAM_BUF_ERR; - pamh->environ[0] = setting; + } + pamh->environ[0] = copy; pamh->environ[1] = NULL; return PAM_SUCCESS; } @@ -219,11 +318,13 @@ if (strncmp(setting, pamh->environ[i], namelen) == 0 && pamh->environ[i][namelen] == '=') { if (delete) { + free(pamh->environ[i]); for (j = i + 1; pamh->environ[j] != NULL; i++, j++) pamh->environ[i] = pamh->environ[j]; pamh->environ[i] = NULL; } else { - pamh->environ[i] = setting; + free(pamh->environ[i]); + pamh->environ[i] = copy; } found = true; break; @@ -231,11 +332,11 @@ if (!found) { if (delete) return PAM_BAD_ITEM; - env = realloc(pamh->environ, (i + 2) * sizeof(char *)); + env = reallocarray(pamh->environ, (i + 2), sizeof(char *)); if (env == NULL) return PAM_BUF_ERR; pamh->environ = env; - pamh->environ[i] = setting; + pamh->environ[i] = copy; pamh->environ[i + 1] = NULL; } return PAM_SUCCESS; @@ -246,7 +347,7 @@ int pam_putenv(pam_handle_t *pamh UNUSED, const char *setting) { - return putenv(setting); + return putenv((char *) setting); } #endif /* !HAVE_PAM_GETENV */ diff -Nru libpam-afs-session-2.5/tests/fakepam/general.c libpam-afs-session-2.6/tests/fakepam/general.c --- libpam-afs-session-2.5/tests/fakepam/general.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/general.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,150 @@ +/* + * Interface for fake PAM library, used for testing. + * + * This contains the basic public interfaces for the fake PAM library, used + * for testing, and some general utility functions. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 2010, 2011, 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: + * + * 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. + */ + +#include +#include +#include + +#include +#include + +#include + +/* Stores the static struct passwd returned by getpwnam if the name matches. */ +static struct passwd *pwd_info = NULL; + +/* Used for unused parameters to silence gcc warnings. */ +#define UNUSED __attribute__((__unused__)) + + +/* + * Initializes the pam_handle_t data structure. This function is only called + * from test programs, not from any of the module code. We can put anything + * we want in this structure, since it's opaque to the regular code. + */ +int +pam_start(const char *service_name, const char *user, + const struct pam_conv *pam_conversation, + pam_handle_t **pamh) +{ + struct pam_handle *handle; + + handle = calloc(1, sizeof(struct pam_handle)); + if (handle == NULL) + return PAM_BUF_ERR; + handle->service = service_name; + handle->user = user; + handle->conversation = pam_conversation; + *pamh = handle; + return PAM_SUCCESS; +} + + +/* + * Free the pam_handle_t data structure and related resources. This is + * important to test the data cleanups. Freeing the memory is not strictly + * required since it's only used for testing, but it helps keep our memory + * usage clean so that we can run the test suite under valgrind. + */ +int +pam_end(pam_handle_t *pamh, int status) +{ + struct fakepam_data *item, *next; + size_t i; + + if (pamh->environ != NULL) { + for (i = 0; pamh->environ[i] != NULL; i++) + free(pamh->environ[i]); + free(pamh->environ); + } + free(pamh->authtok); + free(pamh->oldauthtok); + free(pamh->rhost); + free(pamh->ruser); + free(pamh->tty); + for (item = pamh->data; item != NULL; ) { + if (item->cleanup != NULL) + item->cleanup(pamh, item->data, status); + free(item->name); + next = item->next; + free(item); + item = next; + } + free(pamh); + return PAM_SUCCESS; +} + + +/* + * Interface specific to this fake PAM library to set the struct passwd that's + * returned by getpwnam queries if the name matches. + */ +void +pam_set_pwd(struct passwd *pwd) +{ + pwd_info = pwd; +} + + +/* + * For testing purposes, we want to be able to intercept getpwnam. This is + * fairly easy on platforms that have pam_modutil_getpwnam, since then our + * code will always call that function and we can provide an implementation + * that does whatever we want. For platforms that don't have that function, + * we'll try to intercept the C library getpwnam function. + * + * We store only one struct passwd data structure statically. If the user + * we're looking up matches that, we return it; otherwise, we return NULL. + */ +#ifdef HAVE_PAM_MODUTIL_GETPWNAM +struct passwd * +pam_modutil_getpwnam(pam_handle_t *pamh UNUSED, const char *name) +{ + if (pwd_info != NULL && strcmp(pwd_info->pw_name, name) == 0) + return pwd_info; + else { + errno = 0; + return NULL; + } +} +#else +struct passwd * +getpwnam(const char *name) +{ + if (pwd_info != NULL && strcmp(pwd_info->pw_name, name) == 0) + return pwd_info; + else { + errno = 0; + return NULL; + } +} +#endif diff -Nru libpam-afs-session-2.5/tests/fakepam/internal.h libpam-afs-session-2.6/tests/fakepam/internal.h --- libpam-afs-session-2.5/tests/fakepam/internal.h 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/internal.h 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,114 @@ +/* + * Internal data types and prototypes for the fake PAM test framework. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 2011, 2012 + * 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: + * + * 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. + */ + +#ifndef FAKEPAM_INTERNAL_H +#define FAKEPAM_INTERNAL_H 1 + +#include +#include + +/* Forward declarations to avoid unnecessary includes. */ +struct output; +struct script_config; + +/* The type of a PAM module call. */ +typedef int (*pam_call)(pam_handle_t *, int, int, const char **); + +/* The possible PAM groups as element numbers in an array of options. */ +enum group_type { + GROUP_ACCOUNT = 0, + GROUP_AUTH = 1, + GROUP_PASSWORD = 2, + GROUP_SESSION = 3, +}; + +/* Holds a PAM argc and argv. */ +struct options { + char **argv; + int argc; +}; + +/* + * Holds a linked list of actions: a PAM call that should return some + * status. + */ +struct action { + char *name; + pam_call call; + int flags; + enum group_type group; + int status; + struct action *next; +}; + +/* Holds an expected PAM prompt style, the prompt, and the response. */ +struct prompt { + int style; + char *prompt; + char *response; +}; + +/* Holds an array of PAM prompts and the current index into that array. */ +struct prompts { + struct prompt *prompts; + size_t size; + size_t allocated; + size_t current; +}; + +/* + * Holds the complete set of things that we should do. Currently, this + * contains only a linked list of actions. + */ +struct work { + struct options options[4]; + struct action *actions; + struct prompts *prompts; + struct output *output; +}; + +BEGIN_DECLS + + +/* Create a new output struct. */ +struct output *output_new(void); + +/* Add a new output line (with numeric priority) to an output struct. */ +void output_add(struct output *, int, const char *); + + +/* + * Parse a PAM interaction script. Returns the total work to do as a work + * struct. + */ +struct work *parse_script(FILE *, const struct script_config *); + +END_DECLS + +#endif /* !FAKEPAM_API_H */ diff -Nru libpam-afs-session-2.5/tests/fakepam/logging.c libpam-afs-session-2.6/tests/fakepam/logging.c --- libpam-afs-session-2.5/tests/fakepam/logging.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/logging.c 2015-09-19 18:25:37.000000000 +0000 @@ -9,8 +9,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 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 @@ -36,13 +36,56 @@ #include #include -#include +#include +#include +#include +#include /* Used for unused parameters to silence gcc warnings. */ #define UNUSED __attribute__((__unused__)) -/* The buffer used to accumulate log messages. */ -static char *messages = NULL; +/* The struct used to accumulate log messages. */ +static struct output *messages = NULL; + + +/* + * Allocate a new, empty output struct and call bail if memory allocation + * fails. + */ +struct output * +output_new(void) +{ + struct output *output; + + output = bmalloc(sizeof(struct output)); + output->count = 0; + output->allocated = 1; + output->lines = bmalloc(sizeof(output->lines[0])); + output->lines[0].line = NULL; + return output; +} + + +/* + * Add a new output line to the output struct, resizing the array as + * necessary. Calls bail if memory allocation fails. + */ +void +output_add(struct output *output, int priority, const char *string) +{ + size_t next = output->count; + size_t size, n; + + if (output->count == output->allocated) { + n = output->allocated + 1; + size = sizeof(output->lines[0]); + output->lines = breallocarray(output->lines, n, size); + output->allocated = n; + } + output->lines[next].priority = priority; + output->lines[next].line = bstrdup(string); + output->count++; +} /* @@ -51,7 +94,7 @@ * codes used by the system PAM library. */ const char * -pam_strerror(pam_handle_t *pamh UNUSED, int code) +pam_strerror(PAM_STRERROR_CONST pam_handle_t *pamh UNUSED, int code) { switch (code) { case PAM_SUCCESS: return "No error"; @@ -91,46 +134,45 @@ pam_vsyslog(const pam_handle_t *pamh UNUSED, int priority, const char *format, va_list args) { - char *prefix = NULL; char *message = NULL; - size_t size; - asprintf(&prefix, "%d ", priority); - if (prefix == NULL) - return; - vasprintf(&message, format, args); - if (message == NULL) - return; - if (messages == NULL) { - size = strlen(prefix) + strlen(message) + 1; - messages = malloc(size); - if (messages == NULL) - return; - strlcpy(messages, prefix, size); - strlcat(messages, message, size); - } else { - size = strlen(prefix) + strlen(messages) + strlen(message) + 1; - messages = realloc(messages, size); - if (messages == NULL) - return; - strlcat(messages, prefix, size); - strlcat(messages, message, size); - } - free(prefix); + bvasprintf(&message, format, args); + if (messages == NULL) + messages = output_new(); + output_add(messages, priority, message); free(message); } /* - * Used by test code. Returns the accumulated messages and starts a new - * message buffer. Caller is responsible for freeing. + * Used by test code. Returns the accumulated messages in an output struct + * and starts a new one. Caller is responsible for freeing with + * pam_output_free. */ -char * +struct output * pam_output(void) { - char *output; + struct output *output; output = messages; messages = NULL; return output; } + + +/* + * Free an output struct. + */ +void +pam_output_free(struct output *output) +{ + size_t i; + + if (output == NULL) + return; + for (i = 0; i < output->count; i++) + if (output->lines[i].line != NULL) + free(output->lines[i].line); + free(output->lines); + free(output); +} diff -Nru libpam-afs-session-2.5/tests/fakepam/pam.h libpam-afs-session-2.6/tests/fakepam/pam.h --- libpam-afs-session-2.5/tests/fakepam/pam.h 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/pam.h 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,99 @@ +/* + * Testing interfaces to the fake PAM library. + * + * This header defines the interfaces to the fake PAM library that are used by + * test code to initialize the library and recover test data from it. We + * don't define any interface that we're going to duplicate from the main PAM + * API. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 2010, 2011, 2012 + * 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: + * + * 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. + */ + +#ifndef FAKEPAM_PAM_H +#define FAKEPAM_PAM_H 1 + +#include +#include +#include + +/* Used inside the fake PAM library to hold data items. */ +struct fakepam_data { + char *name; + void *data; + void (*cleanup)(pam_handle_t *, void *, int); + struct fakepam_data *next; +}; + +/* This is an opaque data structure, so we can put whatever we want in it. */ +struct pam_handle { + const char *service; + const char *user; + char *authtok; + char *oldauthtok; + char *rhost; + char *ruser; + char *tty; + const struct pam_conv *conversation; + char **environ; + struct fakepam_data *data; + struct passwd *pwd; +}; + +/* + * Used to accumulate output from the PAM module. Each call to a logging + * function will result in an additional line added to the array, and count + * will hold the total. + */ +struct output { + size_t count; + size_t allocated; + struct { + int priority; + char *line; + } *lines; +}; + +BEGIN_DECLS + +/* + * Sets the struct passwd returned by getpwnam calls. The last struct passed + * to this function will be returned provided the pw_name matches. + */ +void pam_set_pwd(struct passwd *pwd); + +/* + * Returns the accumulated messages logged with pam_syslog or pam_vsyslog + * since the last call to pam_output and then clears the output. Returns + * newly allocated memory that the caller is responsible for freeing with + * pam_output_free, or NULL if no output has been logged since the last call + * or since startup. + */ +struct output *pam_output(void); +void pam_output_free(struct output *); + +END_DECLS + +#endif /* !FAKEPAM_API_H */ diff -Nru libpam-afs-session-2.5/tests/fakepam/README libpam-afs-session-2.6/tests/fakepam/README --- libpam-afs-session-2.5/tests/fakepam/README 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/README 2015-09-19 18:25:37.000000000 +0000 @@ -1,12 +1,263 @@ -The files in this directory provide a shim PAM library that's used for -testing. This library and its include files define the minimum amount of -the PAM module interface so that PAM modules can be tested without such -problems as needing configuration files in /etc/pam.d or needing changes -to the system configuration to run a testing PAM module instead of the -normal system PAM modules. - -The goal of this library is that all PAM code should be able to be left -unchanged and the code just linked with the fakepam library rather than -the regular PAM library. The testing code can then call pam_start and -pam_end as defind in the fakepam/testing.h header file and inspect -internal PAM state as needed. + PAM Testing Framework + +Overview + + The files in this directory provide a shim PAM library that's used for + testing and a test framework used to exercise a PAM module. + + This library and its include files define the minimum amount + of the PAM module interface so that PAM modules can be tested without + such problems as needing configuration files in /etc/pam.d or needing + changes to the system configuration to run a testing PAM module + instead of the normal system PAM modules. + + The goal of this library is that all PAM code should be able to be + left unchanged and the code just linked with the fakepam library + rather than the regular PAM library. The testing code can then call + pam_start and pam_end as defind in the fakepam/pam.h header file and + inspect internal PAM state as needed. + + The library also provides an interface to exercise a PAM module via an + interaction script, so that as much of the testing process as possible + is moved into simple text files instead of C code. That test script + format supports specifying the PAM configuration, the PAM interfaces + to run, the expected prompts and replies, and the expected log + messages. That interface is defined in fakepam/script.h. + +Fake PAM Library + + Unfortunately, the standard PAM library for most operating systems + does not provide a reasonable testing framework. The primary problem + is configuration: the PAM library usually hard-codes a configuration + location such as /etc/pam.conf or /etc/pam.d/. But there + are other problems as well, such as capturing logging rather than + having it go to syslog and inspecting PAM internal state to make sure + that it's updated properly by the module. + + This library implements some of the same API as the system PAM library + and uses the system PAM library headers, but the underlying + implementation does not call the system PAM library or dynamically + load modules. Instead, it's meant to be linked into a single + executable along with the implementation of a PAM module. It does not + provide most of the application-level PAM interfaces (so one cannot + link a PAM-using application against it), just the interfaces called + by a module. The caller of the library can then call the module API + (such as pam_sm_authenticate) directly. + + All of the internal state maintained by the PAM library is made + available to the test program linked with this library. See + fakepam/pam.h for the data structures. This allows verification that + the PAM module is setting the internal PAM state properly. + + User Handling + + In order to write good test suites, one often has to be able to + authenticate as a variety of users, but PAM modules may expect the + authenticating user to exist on the system. The fakepam library + provides a pam_modutil_getpwnam (if available) or a getpwnam + implementation that returns information for a single user (and user + unknown for everyone else). To set the information for the one valid + user, call the pam_set_pwd function and provide a struct passwd that + will be returned by pam_modutil_getpwnam. + + The fakepam library also provides a replacement krb5_kuserok function + for testing PAM modules that use Kerberos. This source file should + only be included in packages that are building with Kerberos. It + implements the same functionality as the default krb5_kuserok + function, but looks for .k5login in the home directory configured by + the test framework instead of using getpwnam. + + Only those two functions are intercepted, so if the module looks up + users in other ways, it may still bypass the fakepam library and look + at system users. + + Output Handling + + The fakepam library intercepts the PAM functions that would normally + log to syslog and instead accumulates the output in a static string + variable. To retrieve the logging output so far, call pam_output, + which returns a struct of all the output strings up to that point and + resets the accumulated output. + +Scripted PAM Testing + + Also provided as part of the fakepam library is a test framework for + testing PAM modules. This test framework allows most of the testing + process to be encapsulated in a text configuration file per test, + rather than in a tedious set of checks and calls written in C. + + Test API + + The basic test API is to call either run_script (to run a single test + script) or run_script_dir (to run all scripts in a particular + directory). Both take a configuration struct that controls how the + PAM library is set up and called. + + That configuration struct takes the following elements: + + user + The user as which to authenticate, passed into pam_start and also + substituted for the %u escape. This should match the user whose + home directory information is configured using pam_set_pwd if that + function is in use. + + password + Only used for the %p escape. This is not used to set the + authentication token in the PAM library (see authtok below). + + newpass + Only used for the %n escape. + + extra + An array of up to 10 additional strings used by the %0 through %9 + escapes when parsing the configuration file, as discussed below. + + authtok + Sets the default value of the PAM_AUTHTOK data item. This will be + set immediately after initializing the PAM library and before + calling any PAM module functions. + + authtok + Like authtok, but for the PAM_OLDAUTHTOK data item. + + callback + This, and the associated data element, specifies a callback that's + called at the end of processing of the script before calling + pam_end. This can be used to inspect and verify the internal + state of PAM. The data element is an opaque pointer passed into + the callback. + + Test Script Basic Format + + Test scripts are composed of one or more sections. Each section + begins with: + + [
] + + starting in column 1, where
is the name of the section. The + valid section types and the format of their contents are described + below. + + Blank lines and lines starting with # are ignored. + + Several strings undergo %-escape expansion as mentioned below. For + any such string, the following escapes are supported: + + %i Current UID (not the UID of the target user) + %n New password + %p Password + %u Username + %0 extra[0] + ... + %9 extra[9] + + All of these are set in the script_config struct. + + Regular expression matching is supported for output lines and for + prompts. To mark an expected prompt or output line as a regular + expression, it must begin and end with a slash (/). Slashes inside + the regular expression do not need to be escaped. If regular + expression support is not available in the C library, those matching + tests will be skipped. + + The [options] Section + + The [options] section contains the PAM configuration that will be + passed to the module. These are the options that are normally listed + in the PAM configuration file after the name of the module. The + syntax of this section is one or more lines of the form: + + = + + where is one of "account", "auth", "password", or "session". + The options are space-delimited and may be either option names or + option=value pairs. + + The [run] Section + + The [run] section specifies what PAM interfaces to call. It consists + of one or more lines in the format: + + = + + where is the PAM call to make and is the status code + that it should return. is one of the PAM module interface + functions without the leading "pam_sm_", so one of "acct_mgmt", + "authenticate", "setcred", "chauthtok", "open_session", or + "close_session". The return status is one of the PAM constants + defined for return status, such as PAM_IGNORE or PAM_SUCCESS. The + test framework will ensure that the PAM call returns the appropriate + status. + + The may be optionally followed by an open parentheses and then + a list of flags separated by |, or syntactically: + + (||...) = + + In this form, rather than passing a flags value of 0 to the PAM call, + the test framework will pass the combination of the provided flags. + The flags are PAM constants without the leading PAM_, so (for example) + DELETE_CRED, ESTABLISH_CRED, REFRESH_CRED, or REINITIALIZE_CRED for + the "setcred" call. + + The [output] Section + + The [output] section defines the logging output expected from the + module. It consists of zero or more lines in the format: + + + // + + where is a syslog priority and is the remaining + output or a regular expression to match against the output. Valid + values for are DEBUG, INFO, NOTICE, ERR, and CRIT. + and may contain spaces and undergoes %-escape + expansion. + + The replacement values are taken from the script_config struct passed + as a parameter to run_script or run_script_dir. + + If the [output] section is missing entirely, the test framework will + expect there to be no logging output from the PAM module. + + This defines the logging output, not the prompts returned through the + conversation function. For that, see the next section. + + The [prompts] Section + + The [prompts] section defines the prompts that the PAM module is + expected to send via the conversation function, and the responses that + the test harness will send back (if any). This consists of zero or + more lines in one of the following formats: + + = + = // + = | + = //| + + The is the style of prompt, chosen from "echo_off", "echo_on", + "error_msg", and "info". The is the actual prompt sent and + undergoes %-escape expansion. It may be enclosed in slashes (/) to + indicate that it's a regular expression instead of literal text. The + if present (and its presence is signaled by the | + character) contains the response sent back by the test framework and + also undergoes %-escape expansion. The response starts with the final + | character on the line, so regular expressions may freely + use | inside the regular expression. + + If the [prompts] section is present and empty, the test harness will + check that the PAM module does not send any prompts. If the [prompts] + section is absent entirely, the conversation function passed to the + PAM module will be NULL. + +License + + This file is part of the documentation of rra-c-util, which can be + found at . + + Copyright 2011, 2012 Russ Allbery + + Copying and distribution of this file, with or without modification, + are permitted in any medium without royalty provided the copyright + notice and this notice are preserved. This file is offered as-is, + without any warranty. diff -Nru libpam-afs-session-2.5/tests/fakepam/script.c libpam-afs-session-2.6/tests/fakepam/script.c --- libpam-afs-session-2.5/tests/fakepam/script.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/script.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,408 @@ +/* + * Run a PAM interaction script for testing. + * + * Provides an interface that loads a PAM interaction script from a file and + * runs through that script, calling the internal PAM module functions and + * checking their results. This allows automation of PAM testing through + * external data files instead of coding everything in C. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 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 + * 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. + */ + +#include +#include +#include + +#include +#include +#include +#ifdef HAVE_REGCOMP +# include +#endif +#include + +#include +#include +#include +#include +#include +#include + + +/* + * Compare a regex to a string. If regular expression support isn't + * available, we skip this test. + */ +#ifdef HAVE_REGCOMP +static void __attribute__((__format__(printf, 3, 4))) +like(const char *wanted, const char *seen, const char *format, ...) +{ + va_list args; + regex_t regex; + char err[BUFSIZ]; + int status; + + if (seen == NULL) { + fflush(stderr); + printf("# wanted: /%s/\n# seen: %s\n", wanted, seen); + va_start(args, format); + okv(0, format, args); + va_end(args); + return; + } + memset(®ex, 0, sizeof(regex)); + status = regcomp(®ex, wanted, REG_EXTENDED | REG_NOSUB); + if (status != 0) { + regerror(status, ®ex, err, sizeof(err)); + bail("invalid regex /%s/: %s", wanted, err); + } + status = regexec(®ex, seen, 0, NULL, 0); + switch (status) { + case 0: + va_start(args, format); + okv(1, format, args); + va_end(args); + break; + case REG_NOMATCH: + printf("# wanted: /%s/\n# seen: %s\n", wanted, seen); + va_start(args, format); + okv(0, format, args); + va_end(args); + break; + default: + regerror(status, ®ex, err, sizeof(err)); + bail("regexec failed for regex /%s/: %s", wanted, err); + } + regfree(®ex); +} +#else /* !HAVE_REGCOMP */ +static void +like(const char *wanted, const char *seen, const char *format UNUSED, ...) +{ + diag("wanted /%s/", wanted); + diag(" seen %s", seen); + skip("regex support not available"); +} +#endif /* !HAVE_REGCOMP */ + + +/* + * Compare an expected string with a seen string, used by both output checking + * and prompt checking. This is a separate function because the expected + * string may be a regex, determined by seeing if it starts and ends with a + * slash (/), which may require a regex comparison. + * + * Eventually calls either is_string or ok to report results via TAP. + */ +static void __attribute__((__format__(printf, 3, 4))) +compare_string(char *wanted, char *seen, const char *format, ...) +{ + va_list args; + char *comment, *regex; + size_t length; + + /* Format the comment since we need it regardless. */ + va_start(args, format); + bvasprintf(&comment, format, args); + va_end(args); + + /* Check whether the wanted string is a regex. */ + length = strlen(wanted); + if (wanted[0] == '/' && wanted[length - 1] == '/') { + regex = bstrndup(wanted + 1, length - 2); + like(regex, seen, "%s", comment); + free(regex); + } else { + is_string(wanted, seen, "%s", comment); + } + free(comment); +} + + +/* + * The PAM conversation function. Takes the prompts struct from the + * configuration and interacts appropriately. If a prompt is of the expected + * type but not the expected string, it still responds; if it's not of the + * expected type, it returns PAM_CONV_ERR. + * + * Currently only handles a single prompt at a time. + */ +static int +converse(int num_msg, const struct pam_message **msg, + struct pam_response **resp, void *appdata_ptr) +{ + struct prompts *prompts = appdata_ptr; + struct prompt *prompt; + char *message; + size_t length; + int i; + + *resp = bcalloc(num_msg, sizeof(struct pam_response)); + for (i = 0; i < num_msg; i++) { + message = bstrdup(msg[i]->msg); + + /* Remove newlines for comparison purposes. */ + length = strlen(message); + while (length > 0 && message[length - 1] == '\n') + message[length-- - 1] = '\0'; + + /* Check if we've gotten too many prompts but quietly ignore them. */ + if (prompts->current >= prompts->size) { + diag("unexpected prompt: %s", message); + free(message); + ok(0, "more prompts than expected"); + continue; + } + + /* Be sure everything matches and return the response, if any. */ + prompt = &prompts->prompts[prompts->current]; + is_int(prompt->style, msg[i]->msg_style, "style of prompt %lu", + (unsigned long) prompts->current + 1); + compare_string(prompt->prompt, message, "value of prompt %lu", + (unsigned long) prompts->current + 1); + free(message); + prompts->current++; + if (prompt->style == msg[i]->msg_style && prompt->response != NULL) { + (*resp)[i].resp = bstrdup(prompt->response); + (*resp)[i].resp_retcode = 0; + } + } + + /* + * Always return success even if the prompts don't match. Otherwise, + * we're likely to abort the conversation in the middle and possibly + * leave passwords set incorrectly. + */ + return PAM_SUCCESS; +} + + +/* + * Check the actual PAM output against the expected output. We divide the + * expected and seen output into separate lines and compare each one so that + * we can handle regular expressions and the output priority. + */ +static void +check_output(const struct output *wanted, const struct output *seen) +{ + size_t i; + + if (wanted == NULL && seen == NULL) + ok(1, "no output"); + else if (wanted == NULL) { + for (i = 0; i < seen->count; i++) + diag("unexpected: (%d) %s", seen->lines[i].priority, + seen->lines[i].line); + ok(0, "no output"); + } else if (seen == NULL) { + for (i = 0; i < wanted->count; i++) { + is_int(wanted->lines[i].priority, 0, "output priority %lu", + (unsigned long) i + 1); + is_string(wanted->lines[i].line, NULL, "output line %lu", + (unsigned long) i + 1); + } + } else { + for (i = 0; i < wanted->count && i < seen->count; i++) { + is_int(wanted->lines[i].priority, seen->lines[i].priority, + "output priority %lu", (unsigned long) i + 1); + compare_string(wanted->lines[i].line, seen->lines[i].line, + "output line %lu", (unsigned long) i + 1); + } + if (wanted->count > seen->count) + for (i = seen->count; i < wanted->count; i++) { + is_int(wanted->lines[i].priority, 0, "output priority %lu", + (unsigned long) i + 1); + is_string(wanted->lines[i].line, NULL, "output line %lu", + (unsigned long) i + 1); + } + if (seen->count > wanted->count) { + for (i = wanted->count; i < seen->count; i++) + diag("unexpected: (%d) %s", seen->lines[i].priority, + seen->lines[i].line); + ok(0, "unexpected output lines"); + } else { + ok(1, "no excess output"); + } + } +} + + +/* + * The core of the work. Given the path to a PAM interaction script, which + * may be relative to SOURCE or BUILD, the user (may be NULL), and the stored + * password (may be NULL), run that script, outputing the results in TAP + * format. + */ +void +run_script(const char *file, const struct script_config *config) +{ + char *path; + struct output *output; + FILE *script; + struct work *work; + struct options *opts; + struct action *action, *oaction; + struct pam_conv conv = { NULL, NULL }; + pam_handle_t *pamh; + int status; + size_t i, j; + const char *argv_empty[] = { NULL }; + + /* Open and parse the script. */ + if (access(file, R_OK) == 0) + path = bstrdup(file); + else { + path = test_file_path(file); + if (path == NULL) + bail("cannot find PAM script %s", file); + } + script = fopen(path, "r"); + if (script == NULL) + sysbail("cannot open %s", path); + work = parse_script(script, config); + fclose(script); + diag("Starting %s", file); + if (work->prompts != NULL) { + conv.conv = converse; + conv.appdata_ptr = work->prompts; + } + + /* Initialize PAM. */ + status = pam_start("test", config->user, &conv, &pamh); + if (status != PAM_SUCCESS) + sysbail("cannot create PAM handle"); + if (config->authtok != NULL) + pamh->authtok = bstrdup(config->authtok); + if (config->oldauthtok != NULL) + pamh->oldauthtok = bstrdup(config->oldauthtok); + + /* Run the actions and check their return status. */ + for (action = work->actions; action != NULL; action = action->next) { + if (work->options[action->group].argv == NULL) + status = (*action->call)(pamh, action->flags, 0, argv_empty); + else { + opts = &work->options[action->group]; + status = (*action->call)(pamh, action->flags, opts->argc, + (const char **) opts->argv); + } + is_int(action->status, status, "status for %s", action->name); + } + output = pam_output(); + check_output(work->output, output); + pam_output_free(output); + + /* If we have a test callback, call it now. */ + if (config->callback != NULL) + config->callback (pamh, config, config->data); + + /* Free memory and return. */ + pam_end(pamh, PAM_SUCCESS); + action = work->actions; + while (action != NULL) { + free(action->name); + oaction = action; + action = action->next; + free(oaction); + } + for (i = 0; i < ARRAY_SIZE(work->options); i++) + if (work->options[i].argv != NULL) { + for (j = 0; work->options[i].argv[j] != NULL; j++) + free(work->options[i].argv[j]); + free(work->options[i].argv); + } + if (work->output) + pam_output_free(work->output); + if (work->prompts != NULL) { + for (i = 0; i < work->prompts->size; i++) { + free(work->prompts->prompts[i].prompt); + free(work->prompts->prompts[i].response); + } + free(work->prompts->prompts); + free(work->prompts); + } + free(work); + free(path); +} + + +/* + * Check a filename for acceptable characters. Returns true if the file + * consists solely of [a-zA-Z0-9-] and false otherwise. + */ +static bool +valid_filename(const char *filename) +{ + const char *p; + + for (p = filename; *p != '\0'; p++) { + if (*p >= 'A' && *p <= 'Z') + continue; + if (*p >= 'a' && *p <= 'z') + continue; + if (*p >= '0' && *p <= '9') + continue; + if (*p == '-') + continue; + return false; + } + return true; +} + + +/* + * The same as run_script, but run every script found in the given directory, + * skipping file names that contain characters other than alphanumerics and -. + */ +void +run_script_dir(const char *dir, const struct script_config *config) +{ + DIR *handle; + struct dirent *entry; + const char *path; + char *file; + + if (access(dir, R_OK) == 0) + path = dir; + else + path = test_file_path(dir); + handle = opendir(path); + if (handle == NULL) + sysbail("cannot open directory %s", dir); + errno = 0; + while ((entry = readdir(handle)) != NULL) { + if (!valid_filename(entry->d_name)) + continue; + basprintf(&file, "%s/%s", path, entry->d_name); + run_script(file, config); + free(file); + errno = 0; + } + if (errno != 0) + sysbail("cannot read directory %s", dir); + closedir(handle); + if (path != dir) + test_file_path_free((char *) path); +} diff -Nru libpam-afs-session-2.5/tests/fakepam/script.h libpam-afs-session-2.6/tests/fakepam/script.h --- libpam-afs-session-2.5/tests/fakepam/script.h 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/script.h 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,79 @@ +/* + * PAM interaction script API. + * + * Provides an interface that loads a PAM interaction script from a file and + * runs through that script, calling the internal PAM module functions and + * checking their results. This allows automation of PAM testing through + * external data files instead of coding everything in C. + * + * The canonical version of this file is maintained in the rra-c-util package, + * which can be found at . + * + * Written by Russ Allbery + * Copyright 2011, 2012 + * 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: + * + * 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. + */ + +#ifndef TESTS_MODULE_SCRIPT_H +#define TESTS_MODULE_SCRIPT_H 1 + +#include + +#include + +/* A test callback called after PAM functions are run but before pam_end. */ +struct script_config; +typedef void (*script_callback)(pam_handle_t *, const struct script_config *, + void *); + +/* Configuration for the PAM interaction script API. */ +struct script_config { + const char *user; /* Username to pass into pam_start (%u). */ + const char *password; /* Substituted for %p in prompts. */ + const char *newpass; /* Substituted for %n in prompts. */ + const char *extra[10]; /* Substituted for %0-%9 in logging. */ + const char *authtok; /* Stored as AUTHTOK before PAM. */ + const char *oldauthtok; /* Stored as OLDAUTHTOK before PAM. */ + script_callback callback; /* Called after PAM, before pam_end. */ + void *data; /* Passed to the callback function. */ +}; + +BEGIN_DECLS + +/* + * Given the file name of an interaction script (which may be a full path or + * relative to SOURCE or BUILD) and configuration containing other parameters + * such as the user, run that script, reporting the results via the TAP + * format. + */ +void run_script(const char *file, const struct script_config *) + __attribute__((__nonnull__)); + +/* + * The same as run_script, but run every script found in the given directory, + * skipping file names that contain characters other than alphanumerics and -. + */ +void run_script_dir(const char *dir, const struct script_config *) + __attribute__((__nonnull__)); + +END_DECLS + +#endif /* !TESTS_MODULE_SCRIPT_H */ diff -Nru libpam-afs-session-2.5/tests/fakepam/stubs.c libpam-afs-session-2.6/tests/fakepam/stubs.c --- libpam-afs-session-2.5/tests/fakepam/stubs.c 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/stubs.c 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,32 @@ +/* + * Stubs to support testing a module without some PAM groups. + * + * pam-afs-session doesn't support account management or password changes, but + * these are wired into the PAM testing apparatus. Provide stub functions so + * that the test programs will link. + * + * Copyright 2015 Russ Allbery + * + * See LICENSE for licensing terms. + */ + +#include +#include + +#include + + +int +pam_sm_acct_mgmt(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, + const char **argv UNUSED) +{ + return PAM_SUCCESS; +} + + +int +pam_sm_chauthtok(pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, + const char **argv UNUSED) +{ + return PAM_SUCCESS; +} diff -Nru libpam-afs-session-2.5/tests/fakepam/testing.c libpam-afs-session-2.6/tests/fakepam/testing.c --- libpam-afs-session-2.5/tests/fakepam/testing.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/testing.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,119 +0,0 @@ -/* - * Interface for fake PAM library, used for testing. - * - * This contains most interfaces for the fake PAM library, used for testing. - * It declares only the functions required to allow PAM module code to be - * linked with this library instead of the system libpam library for testing - * purposes. - * - * The canonical version of this file is maintained in the rra-c-util package, - * which can be found at . - * - * Written by Russ Allbery - * Copyright 2010 - * 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: - * - * 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. - */ - -#include -#include -#include - -#include - -#include - -/* Used for unused parameters to silence gcc warnings. */ -#define UNUSED __attribute__((__unused__)) - - -/* - * Initializes the pam_handle_t data structure. This function is only called - * from test programs, not from any of the module code. We can put anything - * we want in this structure, since it's opaque to the regular code. - */ -int -pam_start(const char *service_name, const char *user, - const struct pam_conv *pam_conversation, - pam_handle_t **pamh) -{ - struct pam_handle *handle; - - handle = malloc(sizeof(struct pam_handle)); - if (handle == NULL) - return PAM_BUF_ERR; - handle->service = service_name; - handle->user = user; - handle->conversation = pam_conversation; - handle->environ = NULL; - handle->data = NULL; - *pamh = handle; - return PAM_SUCCESS; -} - - -/* - * Free the pam_handle_t data structure and related resources. This is - * important to test the data cleanups. Freeing the memory is not strictly - * required since it's only used for testing, but it helps keep our memory - * usage clean so that we can run the test suite under valgrind. - */ -int -pam_end(pam_handle_t *pamh, int status) -{ - struct fakepam_data *item, *next; - - if (pamh->environ != NULL) - free(pamh->environ); - for (item = pamh->data; item != NULL; ) { - if (item->cleanup != NULL) - item->cleanup (pamh, item->data, status); - free(item->name); - next = item->next; - free(item); - item = next; - } - free(pamh); - return PAM_SUCCESS; -} - - -/* - * For testing purposes, pam_modutil_getpwnam can just call getpwnam. - * (Normally, it's a thread-safe wrapper that does some data caching. - */ -#ifdef HAVE_PAM_MODUTIL_GETPWNAM -struct passwd * -pam_modutil_getpwnam(pam_handle_t *pamh UNUSED, const char *name) -{ - return getpwnam(name); -} -#endif - - -/* - * The following functions are just stubs for right now and always fail. - */ -int -pam_get_item(const pam_handle_t *pamh UNUSED, int item UNUSED, - PAM_CONST void **data UNUSED) -{ - return PAM_SYSTEM_ERR; -} diff -Nru libpam-afs-session-2.5/tests/fakepam/testing.h libpam-afs-session-2.6/tests/fakepam/testing.h --- libpam-afs-session-2.5/tests/fakepam/testing.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/fakepam/testing.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,71 +0,0 @@ -/* - * Testing interfaces to the fake PAM library. - * - * This header defines the interfaces to the fake PAM library that are used by - * test code to initialize the library and recover test data from it. We - * don't define any interface that we're going to duplicate from the main PAM - * API. - * - * The canonical version of this file is maintained in the rra-c-util package, - * which can be found at . - * - * Written by Russ Allbery - * Copyright 2010 - * 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: - * - * 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. - */ - -#ifndef FAKEPAM_TESTING_H -#define FAKEPAM_TESTING_H 1 - -#include -#include -#include - -/* Used inside the fake PAM library to hold data items. */ -struct fakepam_data { - char *name; - void *data; - void (*cleanup)(pam_handle_t *, void *, int); - struct fakepam_data *next; -}; - -/* This is an opaque data structure, so we can put whatever we want in it. */ -struct pam_handle { - const char *service; - const char *user; - const struct pam_conv *conversation; - const char **environ; - struct fakepam_data *data; -}; - -BEGIN_DECLS - -/* - * Returns the accumulated messages logged with pam_syslog or pam_vsyslog - * since the last call to pam_output and then clears the output. Returns - * newly allocated memory that the caller is responsible for freeing, or NULL - * if no output has been logged since the last call or since startup. - */ -char *pam_output(void); - -END_DECLS - -#endif /* !FAKEPAM_API_H */ diff -Nru libpam-afs-session-2.5/tests/kafs/basic.c libpam-afs-session-2.6/tests/kafs/basic.c --- libpam-afs-session-2.5/tests/kafs/basic.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/kafs/basic.c 2015-09-19 18:25:37.000000000 +0000 @@ -7,14 +7,14 @@ * k_setpag, then tokens, then aklog, then tokens, and then k_unlog, sending * the output to standard output and errors to standard error. If either * k_setpag or k_unlog return failure, it reports an error to standard error - * and exits with status 1. If aklog fails, it exits with status 3. If the - * commands all finish, it exits 0. + * and exits with status 1. If aklog or tokens fails, it exits with status 3. + * If the commands all finish, it exits 0. * * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2009, 2010 + * Written by Russ Allbery + * Copyright 2009, 2010, 2012 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -67,19 +67,22 @@ } printf("=== tokens (setpag) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + exit(3); if (system(PATH_AKLOG) != 0) exit(3); printf("=== tokens (aklog) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + exit(3); if (k_unlog() != 0) { fprintf(stderr, "k_unlog failed: %s", strerror(errno)); exit(1); } printf("=== tokens (unlog) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + exit(3); return 0; } diff -Nru libpam-afs-session-2.5/tests/kafs/basic-t libpam-afs-session-2.6/tests/kafs/basic-t --- libpam-afs-session-2.5/tests/kafs/basic-t 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/kafs/basic-t 2015-09-19 18:25:37.000000000 +0000 @@ -5,7 +5,7 @@ # The canonical version of this file is maintained in the rra-c-util package, # which can be found at . # -# Written by Russ Allbery +# Written by Russ Allbery # Copyright 2009 # The Board of Trustees of the Leland Stanford Junior University # @@ -63,9 +63,9 @@ fi fi -# If aklog failed, we can't run the rest of the tests. +# If aklog or tokens failed, we can't run the rest of the tests. if [ "$status" -eq 3 ] ; then - skip_block 3 'aklog failed' + skip_block 3 'aklog or tokens failed' else if sed -n '/^=== tokens .aklog./,/^===/p' basic-output \ | grep -i 'tokens for ' > /dev/null ; then diff -Nru libpam-afs-session-2.5/tests/kafs/haspag-t.c libpam-afs-session-2.6/tests/kafs/haspag-t.c --- libpam-afs-session-2.5/tests/kafs/haspag-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/kafs/haspag-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,7 +8,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/tests/module/basic-t.c libpam-afs-session-2.6/tests/module/basic-t.c --- libpam-afs-session-2.5/tests/module/basic-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/basic-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -1,7 +1,8 @@ /* * Basic tests for the pam-afs-session module. * - * Written by Russ Allbery + * Written by Russ Allbery + * Copyright 2015 Russ Allbery * Copyright 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -10,40 +11,33 @@ #include #include -#include #include +#include #include -#include -#include -#include +#include +#include #include +#include -/* - * We run the entire test suite twice, once with debug disabled and once with - * debug enabled. This is the wrapper around all the test cases to enable - * that without code duplication. - */ -static void -run_tests(bool debug) +int +main(void) { - pam_handle_t *pamh; - int status; - char *skipping, *skiptokens, *skipsession, *program, *running, *already; - char *destroy, *unknown; - char *aklog = test_file_path ("data/fake-aklog"); + struct script_config config; struct passwd *user; - struct pam_conv conv = { NULL, NULL }; - const char *debug_desc = debug ? " w/debug" : ""; - const char *argv_nothing[] = { "nopag", "notokens", "debug", NULL }; - const char *argv_normal[] = { "program=", "debug", NULL }; + char *aklog, *uid, *script; + size_t i; + const char *const session_types[] = { + "establish", "establish-debug", "refresh", "refresh-debug", + "reinit", "reinit-debug", "open-session", "open-session-debug" + }; - /* Determine the user so that setuid will work. */ - user = getpwuid(getuid()); - if (user == NULL) - bail("cannot find username of current user"); + /* Skip the entire test if AFS isn't available. */ + if (!k_hasafs()) + skip_all("AFS not available"); + plan_lazy(); /* * Clear KRB5CCNAME out of the environment to avoid running aklog when we @@ -52,203 +46,61 @@ if (putenv((char *) "KRB5CCNAME") < 0) sysbail("cannot clear KRB5CCNAME from the environment"); - /* Build some messages that we'll use multiple times. */ - if (asprintf(&skipping, "%d skipping as configured", LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&skiptokens, "%d skipping tokens, no Kerberos ticket cache", - LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&skipsession, "%d skipping, no open session", LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&program, "program=%s", aklog) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&running, "%d running %s as UID %lu", LOG_DEBUG, aklog, - (unsigned long) getuid()) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&already, "%d skipping, apparently already ran", - LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&destroy, "%d destroying tokens", LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - - /* Do nothing and check for correct output status. */ - status = pam_start("test", "testuser", &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - TEST_PAM(pam_sm_authenticate, 0, argv_nothing, - "", PAM_SUCCESS, - "do nothing"); - TEST_PAM(pam_sm_setcred, 0, argv_nothing, - "", PAM_SUCCESS, - "do nothing"); - TEST_PAM(pam_sm_setcred, PAM_DELETE_CRED, argv_nothing, - (debug ? skipping : ""), PAM_SUCCESS, - "delete do nothing"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_nothing, - "", PAM_SUCCESS, - "reinitialize do nothing"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv_nothing, - "", PAM_SUCCESS, - "refresh do nothing"); - TEST_PAM(pam_sm_open_session, 0, argv_nothing, - "", PAM_SUCCESS, - "do nothing"); - TEST_PAM(pam_sm_close_session, 0, argv_nothing, - (debug ? skipping : ""), PAM_IGNORE, - "do nothing"); - pam_end(pamh, status); - - /* Test behavior with an unknown user. */ - status = pam_start("test", "pam-afs-session-unknown-user", &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - pam_modutil_getpwnam(pamh, "pam-afs-session-unknown-user"); - if (asprintf(&unknown, "%d cannot find UID for" - " pam-afs-session-unknown-user: %s", LOG_ERR, - strerror(errno)) < 0) - sysbail("cannot allocate memory"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - argv_normal[0] = program; - TEST_PAM(pam_sm_authenticate, 0, argv_normal, - "", PAM_SUCCESS, - "unknown user"); - TEST_PAM(pam_sm_setcred, 0, argv_normal, - unknown, PAM_USER_UNKNOWN, - "unknown user"); - TEST_PAM(pam_sm_setcred, PAM_DELETE_CRED, argv_normal, - (debug ? skipsession : ""), PAM_SUCCESS, - "delete unknown user"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_normal, - unknown, PAM_USER_UNKNOWN, - "reinitialize unknown user"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv_normal, - unknown, PAM_USER_UNKNOWN, - "refresh unknown user"); - TEST_PAM(pam_sm_open_session, 0, argv_normal, - unknown, PAM_SESSION_ERR, - "unknown user"); - TEST_PAM(pam_sm_close_session, 0, argv_normal, - (debug ? skipsession : ""), PAM_SUCCESS, - "close unknown user"); - pam_end(pamh, status); + /* Determine the user so that setuid will work. */ + user = getpwuid(getuid()); + if (user == NULL) + bail("cannot find username of current user"); + pam_set_pwd(user); + + /* Configure the path to aklog. */ + memset(&config, 0, sizeof(config)); + aklog = test_file_path("data/fake-aklog"); + config.extra[0] = aklog; + + /* Initial no-op tests. */ + config.user = "testuser"; + run_script("data/scripts/basic/noop", &config); + run_script("data/scripts/basic/noop-debug", &config); /* * Test behavior without a Kerberos ticket. This doesn't test actual * creation of a PAG. */ unlink("aklog-args"); - status = pam_start("test", "testuser", &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - argv_normal[0] = program; - TEST_PAM(pam_sm_authenticate, 0, argv_normal, - "", PAM_SUCCESS, - "no ticket"); - TEST_PAM(pam_sm_setcred, 0, argv_normal, - (debug ? skiptokens : ""), PAM_SUCCESS, - "no ticket"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_normal, - (debug ? skiptokens : ""), PAM_SUCCESS, - "reinitialize no ticket"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv_normal, - (debug ? skiptokens : ""), PAM_SUCCESS, - "refresh no ticket"); - TEST_PAM(pam_sm_open_session, 0, argv_normal, - (debug ? skiptokens : ""), PAM_SUCCESS, - "no ticket"); - TEST_PAM(pam_sm_close_session, 0, argv_normal, - (debug ? skipsession : ""), PAM_SUCCESS, - "no ticket"); - pam_end(pamh, status); - ok(access("aklog-args", F_OK) < 0, "aklog was not run"); - - /* - * Fake the presence of a Kerberos ticket and see that aklog runs, and - * test suppression of multiple calls to pam_sm_setcred. - */ - unlink("aklog-args"); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_setcred, 0, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); - unlink("aklog-args"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal reinitialize"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); - unlink("aklog-args"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal refresh"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); - unlink("aklog-args"); - TEST_PAM(pam_sm_setcred, 0, argv_normal, - (debug ? already : ""), PAM_SUCCESS, - "normal"); + run_script("data/scripts/basic/no-ticket", &config); + run_script("data/scripts/basic/no-ticket-debug", &config); ok(access("aklog-args", F_OK) < 0, "aklog was not run"); - TEST_PAM(pam_sm_close_session, 0, argv_normal, - (debug ? destroy : ""), PAM_SUCCESS, - "normal"); - pam_end(pamh, status); /* - * Fake the presence of a Kerberos ticket in the environment rather than - * in the PAM environment. We should still run aklog. + * Remaining tests run with the module fooled into thinking we have a + * Kerberos ticket cache. */ - unlink("aklog-args"); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); if (putenv((char *) "KRB5CCNAME=krb5cc_test") < 0) sysbail("cannot set KRB5CCNAME in the environment"); - TEST_PAM(pam_sm_setcred, 0, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); - unlink("aklog-args"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal reinitialize"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); - unlink("aklog-args"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv_normal, - (debug ? running : ""), PAM_SUCCESS, - "normal refresh"); - ok(access("aklog-args", F_OK) == 0, "aklog was run"); + + /* Unknown user. Be sure to get the strerror message. */ + config.user = "pam-afs-session-unknown-user"; + config.extra[1] = strerror(0); + run_script("data/scripts/basic/unknown", &config); + run_script("data/scripts/basic/unknown-debug", &config); + config.extra[1] = NULL; + + /* Check that aklog runs in various ways of opening a session. */ + config.user = user->pw_name; + basprintf(&uid, "%lu", (unsigned long) getuid()); + config.extra[1] = uid; + for (i = 0; i < ARRAY_SIZE(session_types); i++) { + unlink("aklog-args"); + basprintf(&script, "data/scripts/basic/%s", session_types[i]); + run_script(script, &config); + free(script); + ok(access("aklog-args", F_OK) == 0, "aklog was run"); + } unlink("aklog-args"); - TEST_PAM(pam_sm_close_session, 0, argv_normal, - (debug ? destroy : ""), PAM_SUCCESS, - "normal"); - pam_end(pamh, status); + config.extra[1] = NULL; + free(uid); + /* Clean up. */ test_file_path_free(aklog); - free(program); - free(skipping); - free(skiptokens); - free(skipsession); - free(running); - free(already); - free(destroy); - free(unknown); -} - - -int -main(void) -{ - if (!k_hasafs()) - skip_all("AFS not available"); - - plan(66 * 2); - - run_tests(false); - run_tests(true); - return 0; } diff -Nru libpam-afs-session-2.5/tests/module/cells-t.c libpam-afs-session-2.6/tests/module/cells-t.c --- libpam-afs-session-2.5/tests/module/cells-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/cells-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,8 @@ * Also tests aklog given multiple arguments, since it was convenient to put * those tests here where the argument parsing code was already present. * - * Written by Russ Allbery + * Written by Russ Allbery + * Copyright 2015 Russ Allbery * Copyright 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -13,15 +14,14 @@ #include #include -#include #include #include -#include -#include -#include +#include +#include #include +#include /* @@ -52,134 +52,79 @@ } -/* - * We run the entire test suite twice, once with debug disabled and once with - * debug enabled. This is the wrapper around all the test cases to enable - * that without code duplication. - */ -static void -run_tests(bool debug) +int +main(void) { + struct script_config config; struct passwd *user; - pam_handle_t *pamh; - int status; - char *program, *passing; - struct pam_conv conv = { NULL, NULL }; - const char *debug_desc = debug ? " w/debug" : ""; - const char *argv_cellcomma[] = - { "afs_cells=example.com,example.edu", "program=", "debug", NULL }; - const char *argv_cellspace[] = - { "afs_cells=example.com , example.edu", "program=", "debug", NULL }; - char *aklog = test_file_path ("data/fake-aklog"); + char *aklog, *uid, *script, *aklog_with_args; + size_t i, j; + const char *const session_types[] = { + "establish", "establish-debug", "reinit", "reinit-debug", + "open-session", "open-session-debug" + }; + const char *const session_args_types[] = { + "establish", "establish-debug", "reinit", "reinit-debug", + "open-session", "open-session-debug" + }; + + /* Try with both comma- and space-separated options. */ + const char *const afs_cell_options[] = { + "example.com,example.edu", "example.com , example.edu" + }; + + /* Skip the entire test if AFS isn't available. */ + if (!k_hasafs()) + skip_all("AFS not available"); + plan_lazy(); + + /* Configure the path to aklog. */ + memset(&config, 0, sizeof(config)); + aklog = test_file_path("data/fake-aklog"); + config.extra[0] = aklog; + config.extra[2] = aklog; /* Determine the user so that setuid will work. */ user = getpwuid(getuid()); if (user == NULL) bail("cannot find username of current user"); + pam_set_pwd(user); + config.user = user->pw_name; + basprintf(&uid, "%lu", (unsigned long) getuid()); + config.extra[3] = uid; + + /* Fool the module into thinking we have a Kerberos ticket cache. */ + if (putenv((char *) "KRB5CCNAME=krb5cc_test") < 0) + sysbail("cannot set KRB5CCNAME in the environment"); + + /* + * Run the various tests for both styles of AFS cell configuration, and + * check that we passed the right thing to the aklog program. + */ + for (i = 0; i < ARRAY_SIZE(afs_cell_options); i++) { + config.extra[1] = afs_cell_options[i]; + for (j = 0; j < ARRAY_SIZE(session_types); j++) { + basprintf(&script, "data/scripts/cells/%s", session_types[j]); + run_script(script, &config); + free(script); + is_aklog_args("-c example.com -c example.edu"); + } + } - /* Build some messages that we'll use multiple times. */ - if (asprintf(&program, "program=%s", aklog) < 0) - sysbail("cannot allocate memory"); - argv_cellcomma[1] = program; - argv_cellspace[1] = program; - if (asprintf(&passing, "%d passing -c example.com to aklog%d passing -c" - " example.edu to aklog%d running %s as UID %lu", LOG_DEBUG, - LOG_DEBUG, LOG_DEBUG, aklog, (unsigned long) getuid()) < 0) - sysbail("cannot allocate memory"); - - /* Test the various setcred calls that will run aklog. */ - unlink("aklog-args"); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_setcred, 0, argv_cellcomma, - (debug ? passing : ""), PAM_SUCCESS, - "cells with comma"); - is_aklog_args("-c example.com -c example.edu"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv_cellcomma, - (debug ? passing : ""), PAM_SUCCESS, - "cells with comma reinitialize"); - is_aklog_args("-c example.com -c example.edu"); - pam_end(pamh, status); - - /* Test pam_open_session. */ - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_open_session, 0, argv_cellcomma, - (debug ? passing : ""), PAM_SUCCESS, - "cells with comma session"); - is_aklog_args("-c example.com -c example.edu"); - pam_end(pamh, status); - - /* Test with spaces instead of commas. */ - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_setcred, 0, argv_cellspace, - (debug ? passing : ""), PAM_SUCCESS, - "cells with space"); - is_aklog_args("-c example.com -c example.edu"); - pam_end(pamh, status); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_open_session, 0, argv_cellspace, - (debug ? passing : ""), PAM_SUCCESS, - "cells with space session"); - is_aklog_args("-c example.com -c example.edu"); - pam_end(pamh, status); - - /* Test with multiple options for the aklog program. */ - free(program); - if (asprintf(&program, "program=%s,--option,--other-option", aklog) < 0) - sysbail("cannot allocate memory"); - argv_cellcomma[1] = program; - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_setcred, 0, argv_cellcomma, - (debug ? passing : ""), PAM_SUCCESS, - "cells with extra args"); - is_aklog_args("--option --other-option -c example.com -c example.edu"); - pam_end(pamh, status); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_open_session, 0, argv_cellcomma, - (debug ? passing : ""), PAM_SUCCESS, - "cells with extra args"); - is_aklog_args("--option --other-option -c example.com -c example.edu"); - pam_end(pamh, status); + /* Run a setcred and open_session test with more aklog arguments. */ + basprintf(&aklog_with_args, "%s,--option,--other-option", aklog); + config.extra[0] = aklog_with_args; + config.extra[1] = afs_cell_options[0]; + for (i = 0; i < ARRAY_SIZE(session_args_types); i++) { + basprintf(&script, "data/scripts/cells/%s", session_args_types[i]); + run_script(script, &config); + free(script); + is_aklog_args("--option --other-option -c example.com -c example.edu"); + } + /* Cleanup. */ + free(aklog_with_args); + free(uid); test_file_path_free(aklog); - free(program); - free(passing); -} - - -int -main(void) -{ - if (!k_hasafs()) - skip_all("AFS not available"); - - plan(28 * 2); - - run_tests(false); - run_tests(true); - return 0; } diff -Nru libpam-afs-session-2.5/tests/module/fakekafs.c libpam-afs-session-2.6/tests/module/fakekafs.c --- libpam-afs-session-2.5/tests/module/fakekafs.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/fakekafs.c 2015-09-19 18:25:37.000000000 +0000 @@ -5,7 +5,7 @@ * anything other than change internal state that can be queried. It's used * for testing that the module makes the correct AFS calls. * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2010, 2011 * The Board of Trustees of the Leland Stanford Junior University * diff -Nru libpam-afs-session-2.5/tests/module/full.c libpam-afs-session-2.6/tests/module/full.c --- libpam-afs-session-2.5/tests/module/full.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/full.c 2015-09-19 18:25:37.000000000 +0000 @@ -20,7 +20,7 @@ * If something goes wrong outside of the PAM calls that means a fatal error * for the test, it exits with status 4. * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2010 * The Board of Trustees of the Leland Stanford Junior University * @@ -38,7 +38,7 @@ #include #include -#include +#include /* @@ -129,7 +129,8 @@ pam_handle_t *pamh; int status; struct passwd *user; - char *output; + struct output *output; + size_t i; struct pam_conv conv = { NULL, NULL }; const char *argv[] = { NULL }; @@ -153,6 +154,7 @@ fprintf(stderr, "cannot find username of current user\n"); exit(4); } + pam_set_pwd(user); /* * We have tokens at the start of the test. Set up PAM and then open a @@ -161,14 +163,16 @@ */ printf("=== tokens (aklog) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + fprintf(stderr, "tokens failed\n"); if (k_unlog() != 0) { fprintf(stderr, "k_unlog failed: %s\n", strerror(errno)); exit(4); } printf("=== tokens (before) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + fprintf(stderr, "tokens failed\n"); status = pam_start("test", user->pw_name, &conv, &pamh); if (status != PAM_SUCCESS) { fprintf(stderr, "cannot create PAM handle\n"); @@ -180,17 +184,22 @@ exit(1); printf("=== tokens (session) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + fprintf(stderr, "tokens failed\n"); status = pam_sm_close_session(pamh, 0, 0, argv); if (status != PAM_SUCCESS) exit(1); printf("=== tokens (after) ===\n"); fflush(stdout); - system("tokens"); + if (system("tokens") != 0) + fprintf(stderr, "tokens failed\n"); printf("=== output ===\n"); output = pam_output(); - if (output != NULL) - printf("%s\n", output); + if (output != NULL) { + for (i = 0; i < output->count; i++) + printf("%d %s", output->lines[i].priority, output->lines[i].line); + printf("\n"); + } pam_end(pamh, 0); return 0; diff -Nru libpam-afs-session-2.5/tests/module/full-t libpam-afs-session-2.6/tests/module/full-t --- libpam-afs-session-2.5/tests/module/full-t 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/full-t 2015-09-19 18:25:37.000000000 +0000 @@ -2,7 +2,7 @@ # # Test suite for full pam-afs-session functionality. # -# Written by Russ Allbery +# Written by Russ Allbery # Copyright 2009, 2010, 2011 # The Board of Trustees of the Leland Stanford Junior University # diff -Nru libpam-afs-session-2.5/tests/module/hasafs-t.c libpam-afs-session-2.6/tests/module/hasafs-t.c --- libpam-afs-session-2.5/tests/module/hasafs-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/hasafs-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -1,7 +1,8 @@ /* * Test handling of k_hasafs failure. * - * Written by Russ Allbery + * Written by Russ Allbery + * Copyright 2015 Russ Allbery * Copyright 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -9,70 +10,30 @@ */ #include -#include #include -#include - -#include -#include +#include #include /* Provided by the fakekafs layer. */ extern int fakekafs_hasafs; -/* - * We run the entire test suite twice, once with debug disabled and once with - * debug enabled. This is the wrapper around all the test cases to enable - * that without code duplication. - */ -static void -run_tests(bool debug) -{ - pam_handle_t *pamh; - int status; - char *skipping; - struct pam_conv conv = { NULL, NULL }; - const char *debug_desc = debug ? " w/debug" : ""; - const char *argv[] = { "debug", NULL }; - - if (asprintf(&skipping, "%d skipping, AFS apparently not available", - LOG_ERR) < 0) - sysbail("cannot allocate memory"); - - /* Claim that AFS doesn't exist and make sure we get the correct output. */ - fakekafs_hasafs = 0; - status = pam_start("test", "test", &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - TEST_PAM(pam_sm_authenticate, 0, argv, "", PAM_SUCCESS, - "not available"); - TEST_PAM(pam_sm_setcred, 0, argv, skipping, PAM_SUCCESS, - "not available"); - TEST_PAM(pam_sm_setcred, PAM_DELETE_CRED, argv, skipping, PAM_SUCCESS, - "not available"); - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv, skipping, - PAM_SUCCESS, "not available"); - TEST_PAM(pam_sm_setcred, PAM_REFRESH_CRED, argv, skipping, PAM_SUCCESS, - "not available"); - TEST_PAM(pam_sm_open_session, 0, argv, skipping, PAM_IGNORE, - "not available"); - TEST_PAM(pam_sm_close_session, 0, argv, skipping, PAM_IGNORE, - "not available"); - pam_end(pamh, status); - - free(skipping); -} - - int main(void) { - plan(14 * 2); + struct script_config config; + + /* Set up the plan. */ + plan_lazy(); + + /* Claim that AFS doesn't exist. */ + fakekafs_hasafs = 0; - run_tests(false); - run_tests(true); + /* Run all of the tests. */ + memset(&config, 0, sizeof(config)); + config.user = "test"; + run_script_dir("data/scripts/hasafs", &config); return 0; } diff -Nru libpam-afs-session-2.5/tests/module/pag-t.c libpam-afs-session-2.6/tests/module/pag-t.c --- libpam-afs-session-2.5/tests/module/pag-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/pag-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -1,7 +1,13 @@ /* * Test correct construction of PAGs. * - * Written by Russ Allbery + * This test doesn't check output because it's too difficult to do so at the + * moment without using the scripted testing. When that library has enough + * hooks to examine internal state at every point, output testing can be + * re-added. + * + * Written by Russ Allbery + * Copyright 2015 Russ Allbery * Copyright 2010 * The Board of Trustees of the Leland Stanford Junior University * @@ -13,78 +19,66 @@ #include #include -#include -#include -#include +#include #include /* Provided by the fakekafs layer. */ extern int fakekafs_pag; extern bool fakekafs_token; +/* Can only check tokens if we have krb5_afslog. */ +#ifdef HAVE_KRB5_AFSLOG +# define TEST_TOKENS() ok(fakekafs_token, "obtained tokens") +#else +# define TEST_TOKENS() skip("krb5_afslog not available") +#endif -/* - * We run the entire test suite twice, once with debug disabled and once with - * debug enabled. This is the wrapper around all the test cases to enable - * that without code duplication. - */ -static void -run_tests(bool debug) + +int +main(void) { struct passwd *user; pam_handle_t *pamh; int status; - char *running, *already, *destroy, *redo, *redo_debug; struct pam_conv conv = { NULL, NULL }; - const char *debug_desc = debug ? " w/debug" : ""; + /* Arguments depend on whether we were built with Heimdal. */ #ifdef HAVE_KRB5_AFSLOG - const char *argv[] = { "debug", NULL }; + int argc = 0; + const char *argv[] = { NULL }; #else char *program; char *aklog = test_file_path ("data/fake-aklog"); - const char *argv[] = { "program=", "debug", NULL }; + int argc = 1; + const char *argv[] = { "program=", NULL }; +#endif + + /* Skip this test if built without PAG support. */ +#ifdef NO_PAG_SUPPORT + skip_all("no PAG support"); #endif + /* Set up the plan. */ + plan(24); + /* Determine the user so that setuid will work. */ user = getpwuid(getuid()); if (user == NULL) bail("cannot find username of current user"); + pam_set_pwd(user); /* * If we don't have krb5_afslog, make sure we don't run the real aklog. * It might fail or overwrite the user's current tokens, both of which * would mess up the test. - * - * Build the messages appropriate to whichever version we're going to be - * running. */ -#ifdef HAVE_KRB5_AFSLOG - if (asprintf(&running, "%d obtaining tokens for UID %lu", LOG_DEBUG, - (unsigned long) getuid()) < 0) - sysbail("cannot allocate memory"); -#else +#ifndef HAVE_KRB5_AFSLOG if (asprintf(&program, "program=%s", aklog) < 0) sysbail("cannot allocate memory"); argv[0] = program; - if (asprintf(&running, "%d running %s as UID %lu", LOG_DEBUG, aklog, - (unsigned long) getuid()) < 0) - sysbail("cannot allocate memory"); #endif - /* Other common messages. */ - if (asprintf(&already, "%d skipping, apparently already ran", - LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&destroy, "%d destroying tokens", LOG_DEBUG) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&redo, "%d PAG apparently lost, recreating", LOG_NOTICE) < 0) - sysbail("cannot allocate memory"); - if (asprintf(&redo_debug, "%d PAG apparently lost, recreating%s", - LOG_NOTICE, running) < 0) - sysbail("cannot allocate memory"); - /* * Test opening a session and make sure we get a PAG and a token, test * reinitialize, and then make sure closing the session makes the token go @@ -97,29 +91,18 @@ sysbail("cannot create PAM handle"); if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_open_session, 0, argv, - (debug ? running : ""), PAM_SUCCESS, - "normal"); + status = pam_sm_open_session(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "open session"); is_int(1, fakekafs_pag, "created a new PAG"); -#ifdef HAVE_KRB5_AFSLOG - ok(fakekafs_token, "obtained tokens"); -#else - skip("krb5_afslog not available"); -#endif + TEST_TOKENS(); fakekafs_token = false; - TEST_PAM(pam_sm_setcred, PAM_REINITIALIZE_CRED, argv, - (debug ? running : ""), PAM_SUCCESS, - "normal reinitialize"); + status = pam_sm_setcred(pamh, PAM_REINITIALIZE_CRED, argc, argv); + is_int(PAM_SUCCESS, status, "setcred reinitialize"); is_int(1, fakekafs_pag, "stayed in the same PAG"); -#ifdef HAVE_KRB5_AFSLOG - ok(fakekafs_token, "obtained new tokens"); -#else - skip("krb5_afslog not available"); -#endif + TEST_TOKENS(); fakekafs_token = true; - TEST_PAM(pam_sm_close_session, 0, argv, - (debug ? destroy : ""), PAM_SUCCESS, - "normal"); + status = pam_sm_close_session(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "close session"); is_int(1, fakekafs_pag, "still in the PAG"); ok(!fakekafs_token, "removed the token"); fakekafs_token = false; @@ -129,21 +112,15 @@ * whether we clean up our module-specific data properly on close * sesssion. */ - TEST_PAM(pam_sm_setcred, 0, argv, - (debug ? running : ""), PAM_SUCCESS, - "re-enter"); + status = pam_sm_setcred(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "setcred"); is_int(2, fakekafs_pag, "moved to a new PAG"); -#ifdef HAVE_KRB5_AFSLOG - ok(fakekafs_token, "obtained tokens"); -#else - skip("krb5_afslog not available"); -#endif + TEST_TOKENS(); fakekafs_token = true; /* Running setcred again will do nothing. */ - TEST_PAM(pam_sm_setcred, 0, argv, - (debug ? already : ""), PAM_SUCCESS, - "already run"); + status = pam_sm_setcred(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "setcred already ran"); is_int(2, fakekafs_pag, "stayed in the same PAG"); ok(fakekafs_token, "token status didn't change"); @@ -153,64 +130,33 @@ */ fakekafs_pag = 0; fakekafs_token = false; - TEST_PAM(pam_sm_setcred, 0, argv, - (debug ? redo_debug : redo), PAM_SUCCESS, - "lost PAG"); + status = pam_sm_setcred(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "setcred without PAG"); is_int(1, fakekafs_pag, "re-established the PAG"); -#ifdef HAVE_KRB5_AFSLOG - ok(fakekafs_token, "obtained tokens"); -#else - skip("krb5_afslog not available"); -#endif + TEST_TOKENS(); fakekafs_token = true; /* * Running open_session now will do nothing, but if we remove the PAG, it * will also recreate the PAG and get tokens. */ - TEST_PAM(pam_sm_open_session, 0, argv, - (debug ? already : ""), PAM_SUCCESS, - "already run"); + status = pam_sm_open_session(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "open session already ran"); is_int(1, fakekafs_pag, "stayed in the same PAG"); ok(fakekafs_token, "token status didn't change"); fakekafs_pag = 0; fakekafs_token = false; - TEST_PAM(pam_sm_open_session, 0, argv, - (debug ? redo_debug : redo), PAM_SUCCESS, - "lost PAG"); + status = pam_sm_open_session(pamh, 0, argc, argv); + is_int(PAM_SUCCESS, status, "open session without PAG"); is_int(1, fakekafs_pag, "re-established the PAG"); -#ifdef HAVE_KRB5_AFSLOG - ok(fakekafs_token, "obtained tokens"); -#else - skip("krb5_afslog not available"); -#endif + TEST_TOKENS(); /* Clean up. */ pam_end(pamh, 0); unlink("aklog-args"); - free(running); - free(already); - free(destroy); - free(redo); - free(redo_debug); #ifndef HAVE_KRB5_AFSLOG test_file_path_free(aklog); free(program); #endif -} - - -int -main(void) -{ -#ifdef NO_PAG_SUPPORT - skip_all("no PAG support"); -#endif - - plan(32 * 2); - - run_tests(false); - run_tests(true); - return 0; } diff -Nru libpam-afs-session-2.5/tests/module/sigchld-t.c libpam-afs-session-2.6/tests/module/sigchld-t.c --- libpam-afs-session-2.5/tests/module/sigchld-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/sigchld-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -5,7 +5,8 @@ * handler isn't triggered by the fork of aklog. This is ugly in * multithreaded processes and may not be quite the right solution still. * - * Written by Russ Allbery + * Written by Russ Allbery + * Copyright 2015 Russ Allbery * Copyright 2011 * The Board of Trustees of the Leland Stanford Junior University * @@ -13,16 +14,13 @@ */ #include -#include #include #include #include -#include -#include -#include -#include +#include +#include #include /* The signal flag set if the wrong SIGCHLD handler is called. */ @@ -43,18 +41,13 @@ int main(void) { - pam_handle_t *pamh; struct sigaction sa; - int status; - char *aklog = test_file_path ("data/fake-aklog"); - char *program, *running; + struct script_config config; struct passwd *user; - struct pam_conv conv = { NULL, NULL }; - const char *argv[] = { "program=", "always_aklog", "nopag", NULL }; - bool debug = false; - const char *debug_desc = ""; + char *aklog; - plan(4); + /* Set up the plan. */ + plan_lazy(); /* Set up the SIGCHLD handler. */ memset(&sa, 0, sizeof(sa)); @@ -66,32 +59,26 @@ user = getpwuid(getuid()); if (user == NULL) bail("cannot find username of current user"); + pam_set_pwd(user); - /* Build some messages that we'll use multiple times. */ - if (asprintf(&program, "program=%s", aklog) < 0) - sysbail("cannot allocate memory"); - argv[0] = program; - if (asprintf(&running, "%d running %s as UID %lu", LOG_DEBUG, aklog, - (unsigned long) getuid()) < 0) - sysbail("cannot allocate memory"); + /* Configure the path to aklog. */ + memset(&config, 0, sizeof(config)); + aklog = test_file_path("data/fake-aklog"); + config.user = user->pw_name; + config.extra[0] = aklog; + + /* Fool the module into thinking we have a Kerberos ticket cache. */ + if (putenv((char *) "KRB5CCNAME=krb5cc_test") < 0) + sysbail("cannot set KRB5CCNAME in the environment"); - /* Run the session setup and ensure our child handler isn't called. */ + /* Run the PAM module and ensure our child handler isn't called. */ unlink("aklog-args"); - status = pam_start("test", user->pw_name, &conv, &pamh); - if (status != PAM_SUCCESS) - sysbail("cannot create PAM handle"); - if (pam_putenv(pamh, "KRB5CCNAME=krb5cc_test") != PAM_SUCCESS) - sysbail("cannot set PAM environment variable"); - TEST_PAM(pam_sm_setcred, 0, argv, (debug ? running : ""), - PAM_SUCCESS, "normal"); + run_script("data/scripts/sigchld/establish", &config); ok(access("aklog-args", F_OK) == 0, "aklog was run"); is_int(0, child_signaled, "...and SIGCHLD handler not run"); unlink("aklog-args"); - pam_end(pamh, status); + /* Clean up. */ test_file_path_free(aklog); - free(program); - free(running); - return 0; } diff -Nru libpam-afs-session-2.5/tests/module/util.c libpam-afs-session-2.6/tests/module/util.c --- libpam-afs-session-2.5/tests/module/util.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/util.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/* - * Testing utilities for the pam-afs-sesssion module. - * - * Provides test functions used by the various test cases for the - * pam-afs-session module. Normally, these are called through the macros - * defined in util.h. - * - * Written by Russ Allbery - * Copyright 2010 - * The Board of Trustees of the Leland Stanford Junior University - * - * See LICENSE for licensing terms. - */ - -#include -#include -#include -#include - -#include - -#include -#include -#include - - -/* - * If we don't have AFS, the status will depend on which function we call. - * This function returns either PAM_SUCCESS or PAM_IGNORE based on the - * function, reflecting the expected error message from AFS being - * unavailable. - */ -static int -no_afs_status(const char *function) -{ - if (strcmp("pam_sm_authenticate", function) == 0) - return PAM_SUCCESS; - else if (strcmp("pam_sm_setcred", function) == 0) - return PAM_SUCCESS; - else - return PAM_IGNORE; -} - - -/* - * Checks a PAM call, taking its return status, the expected logging output - * and exit status, the function name, the flags passed into the call, a - * boolean to say whether debug will be enabled (which affects the logging - * output), and a string to use for the test description. - */ -void -is_pam_call(const char *output, int expected, int seen, const char *function, - int flags, bool debug, const char *format, ...) -{ - char *logs, *desc; - char *p = NULL; - va_list args; - int status; - - va_start(args, format); - if (vasprintf(&desc, format, args) < 0) - sysbail("cannot allocate memory"); - va_end(args); - logs = pam_output(); - if (!k_hasafs()) { - status = no_afs_status(function); - is_int(status, seen, "%s (status)", desc); - if (strcmp(function, "pam_sm_authenticate") == 0) { - /* Leave p as NULL, no output expected. */ - } else if (debug) { - if (asprintf(&p, "%d %s: entry (0x%x)" - "%d skipping, AFS apparently not available" - "%d %s: exit (%s)", LOG_DEBUG, function, - flags, LOG_ERR, LOG_DEBUG, function, - status == PAM_IGNORE ? "ignore" : "success") < 0) - sysbail("cannot allocate memory"); - } else { - if (asprintf(&p, "%d skipping, AFS apparently not available", - LOG_ERR) < 0) - sysbail("cannot allocate memory"); - } - is_string(p, logs, "%s (output)", desc); - if (p != NULL) - free(p); - } else { - is_int(expected, seen, "%s (status)", desc); - if (debug && strcmp(function, "pam_sm_authenticate") != 0) { - if (asprintf(&p, "%d %s: entry (0x%x)%s%d %s: exit (%s)", - LOG_DEBUG, function, flags, output, LOG_DEBUG, - function, ((expected == PAM_SUCCESS) ? "success" - : (expected == PAM_IGNORE) ? "ignore" - : "failure")) < 0) - sysbail("cannot allocate memory"); - is_string(p, logs, "%s (output)", desc); - } else { - if (output != NULL && output[0] == '\0') - is_string(NULL, logs, "%s (output)", desc); - else - is_string(output, logs, "%s (output)", desc); - } - if (p != NULL) - free(p); - } - if (logs != NULL) - free(logs); - free(desc); -} diff -Nru libpam-afs-session-2.5/tests/module/util.h libpam-afs-session-2.6/tests/module/util.h --- libpam-afs-session-2.5/tests/module/util.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/module/util.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/* - * Testing utilities for the pam-afs-session module. - * - * This header provides macros and prototypes for utility functions for - * testing the pam-afs-session module. It takes care of setting up the - * infrastructure to make it easy to call entry points of the module and check - * the results and logged output. - * - * Written by Russ Allbery - * Copyright 2010 - * The Board of Trustees of the Leland Stanford Junior University - * - * See LICENSE for licensing terms. - */ - -#ifndef TESTS_MODULE_UTIL_H -#define TESTS_MODULE_UTIL_H 1 - -#include -#include - -/* - * These macros implement a bit of sneakiness. For all of our argv strings, - * debug is the last argument. Based on the debug variable setting, choose - * whether to include that argument or not. - */ -#define ARRAY_SIZEOF(a) (sizeof(a) / sizeof((a)[0])) -#define ARGV(a) ARRAY_SIZEOF(a) - (debug ? 1 : 2), (a) - - -/* - * Make a call to a PAM module function and then check it with is_pam_call. - * Takes the PAM method, the flags, the argv to use, the expected output, the - * expected status, and a string description. - * - * pamh (the PAM handle), debug (a boolean saying whether debug is enabled), - * and debug_desc (a string to append saying whether debug is enabled for the - * test description) must be provided in the caller's context. - */ -#define TEST_PAM(m, f, a, o, s, d) \ - do { \ - is_pam_call((o), (s), m(pamh, (f), ARGV(a)), #m, (f), debug, \ - #m " %s%s", (d), debug_desc); \ - } while (0) - -BEGIN_DECLS - -/* - * Checks a PAM call, taking its return status, the expected logging output - * and exit status, the function name, the flags passed into the call, a - * boolean to say whether debug will be enabled (which affects the logging - * output), and a string to use for the test description. - */ -void is_pam_call(const char *output, int expected, int seen, - const char *function, int flags, bool debug, - const char *format, ...); - -END_DECLS - -#endif /* !TESTS_MODULE_UTIL_H */ diff -Nru libpam-afs-session-2.5/tests/pam-util/args-t.c libpam-afs-session-2.6/tests/pam-util/args-t.c --- libpam-afs-session-2.5/tests/pam-util/args-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/pam-util/args-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,8 +4,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -32,7 +32,7 @@ #include #include -#include +#include #include @@ -43,30 +43,42 @@ struct pam_conv conv = { NULL, NULL }; struct pam_args *args; - plan(11); + plan(12); if (pam_start("test", NULL, &conv, &pamh) != PAM_SUCCESS) sysbail("Fake PAM initialization failed"); args = putil_args_new(pamh, 0); ok(args != NULL, "New args struct is not NULL"); - ok(args->pamh == pamh, "...and pamh is correct"); - ok(args->config == NULL, "...and config is NULL"); - ok(args->user == NULL, "...and user is NULL"); - is_int(args->debug, false, "...and debug is false"); - is_int(args->silent, false, "...and silent is false"); -#ifdef HAVE_KERBEROS - ok(args->ctx != NULL, "...and the Kerberos context is initialized"); - ok(args->realm == NULL, "...and realm is NULL"); + if (args == NULL) + ok_block(7, 0, "...args struct is NULL"); + else { + ok(args->pamh == pamh, "...and pamh is correct"); + ok(args->config == NULL, "...and config is NULL"); + ok(args->user == NULL, "...and user is NULL"); + is_int(args->debug, false, "...and debug is false"); + is_int(args->silent, false, "...and silent is false"); +#ifdef HAVE_KRB5 + ok(args->ctx != NULL, "...and the Kerberos context is initialized"); + ok(args->realm == NULL, "...and realm is NULL"); #else - skip_block(2, "Kerberos support not configured"); + skip_block(2, "Kerberos support not configured"); #endif + } putil_args_free(args); ok(1, "Freeing the args struct works"); args = putil_args_new(pamh, PAM_SILENT); ok(args != NULL, "New args struct with PAM_SILENT is not NULL"); - is_int(args->silent, true, "...and silent is true"); + if (args == NULL) + ok(0, "...args is NULL"); + else + is_int(args->silent, true, "...and silent is true"); putil_args_free(args); + putil_args_free(NULL); + ok(1, "Freeing a NULL args struct works"); + + pam_end(pamh, 0); + return 0; } diff -Nru libpam-afs-session-2.5/tests/pam-util/fakepam-t.c libpam-afs-session-2.6/tests/pam-util/fakepam-t.c --- libpam-afs-session-2.5/tests/pam-util/fakepam-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/pam-util/fakepam-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -8,8 +8,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -35,7 +35,7 @@ #include #include -#include +#include #include @@ -65,7 +65,12 @@ ok(pam_getenv(pamh, "TEST") == NULL, "getenv when NULL"); env = pam_getenvlist(pamh); ok(env != NULL, "getenvlist when NULL returns non-NULL"); + if (env == NULL) + bail("pam_getenvlist returned NULL"); is_string(NULL, env[0], "...but first element is NULL"); + for (i = 0; env[i] != NULL; i++) + free(env[i]); + free(env); /* putenv and getenv. */ is_int(PAM_SUCCESS, pam_putenv(pamh, "TEST=foo"), "putenv TEST"); @@ -92,6 +97,8 @@ /* pam_getenvlist. */ env = pam_getenvlist(pamh); ok(env != NULL, "getenvlist not NULL"); + if (env == NULL) + bail("pam_getenvlist returned NULL"); is_string("TEST=foo", env[0], "getenvlist TEST"); is_string("BAR=baz", env[1], "getenvlist BAR"); is_string("FOON=bar=n", env[2], "getenvlist FOON"); @@ -106,5 +113,7 @@ is_string("FOO=foo", pamh->environ[3], "pamh environ FOO"); ok(pamh->environ[4] == NULL, "pamh environ length"); + pam_end(pamh, 0); + return 0; } diff -Nru libpam-afs-session-2.5/tests/pam-util/logging-t.c libpam-afs-session-2.6/tests/pam-util/logging-t.c --- libpam-afs-session-2.5/tests/pam-util/logging-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/pam-util/logging-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,8 +4,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010 + * Written by Russ Allbery + * Copyright 2010, 2011, 2012, 2013 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -35,44 +35,52 @@ #include #include -#include +#include #include +#include /* Test a normal PAM logging function. */ -#define TEST(func, p, n) \ - do { \ - (func)(args, "%s", "foo"); \ - asprintf(&expected, "%d %s", (p), "foo"); \ - seen = pam_output(); \ - is_string(expected, seen, "%s", (n)); \ - free(seen); \ - free(expected); \ +#define TEST(func, p, n) \ + do { \ + (func)(args, "%s", "foo"); \ + seen = pam_output(); \ + is_int((p), seen->lines[0].priority, "priority %d", (p)); \ + is_string("foo", seen->lines[0].line, "line %s", (n)); \ + pam_output_free(seen); \ } while (0); /* Test a PAM error logging function. */ -#define TEST_PAM(func, c, p, n) \ - do { \ - (func)(args, (c), "%s", "bar"); \ - asprintf(&expected, "%d %s: %s", (p), "bar", \ - pam_strerror(args->pamh, c)); \ - seen = pam_output(); \ - is_string(expected, seen, "%s", (n)); \ - free(seen); \ - free(expected); \ +#define TEST_PAM(func, c, p, n) \ + do { \ + (func)(args, (c), "%s", "bar"); \ + if ((c) == PAM_SUCCESS) \ + expected = strdup("bar"); \ + else \ + basprintf(&expected, "%s: %s", "bar", \ + pam_strerror(args->pamh, c)); \ + seen = pam_output(); \ + is_int((p), seen->lines[0].priority, "priority %s", (n)); \ + is_string(expected, seen->lines[0].line, "line %s", (n)); \ + pam_output_free(seen); \ + free(expected); \ } while (0); /* Test a PAM Kerberos error logging function .*/ #define TEST_KRB5(func, p, n) \ do { \ + const char *msg; \ + \ code = krb5_parse_name(args->ctx, "foo@bar@EXAMPLE.COM", &princ); \ (func)(args, code, "%s", "krb"); \ code = krb5_parse_name(args->ctx, "foo@bar@EXAMPLE.COM", &princ); \ - asprintf(&expected, "%d %s: %s", (p), "krb", \ - krb5_get_error_message(args->ctx, code)); \ + msg = krb5_get_error_message(args->ctx, code); \ + basprintf(&expected, "%s: %s", "krb", msg); \ seen = pam_output(); \ - is_string(expected, seen, "%s", (n)); \ - free(seen); \ + is_int((p), seen->lines[0].priority, "priority %s", (n)); \ + is_string(expected, seen->lines[0].line, "line %s", (n)); \ + pam_output_free(seen); \ free(expected); \ + krb5_free_error_message(args->ctx, msg); \ } while (0); @@ -82,17 +90,20 @@ pam_handle_t *pamh; struct pam_args *args; struct pam_conv conv = { NULL, NULL }; - char *expected, *seen; -#ifdef HAVE_KERBEROS + char *expected; + struct output *seen; +#ifdef HAVE_KRB5 krb5_error_code code; krb5_principal princ; #endif - plan(13); + plan(27); if (pam_start("test", NULL, &conv, &pamh) != PAM_SUCCESS) sysbail("Fake PAM initialization failed"); args = putil_args_new(pamh, 0); + if (args == NULL) + bail("cannot create PAM argument struct"); TEST(putil_crit, LOG_CRIT, "putil_crit"); TEST(putil_err, LOG_ERR, "putil_err"); putil_debug(args, "%s", "foo"); @@ -103,14 +114,16 @@ TEST_PAM(putil_crit_pam, PAM_SYSTEM_ERR, LOG_CRIT, "putil_crit_pam S"); TEST_PAM(putil_crit_pam, PAM_BUF_ERR, LOG_CRIT, "putil_crit_pam B"); + TEST_PAM(putil_crit_pam, PAM_SUCCESS, LOG_CRIT, "putil_crit_pam ok"); TEST_PAM(putil_err_pam, PAM_SYSTEM_ERR, LOG_ERR, "putil_err_pam"); putil_debug_pam(args, PAM_SYSTEM_ERR, "%s", "bar"); ok(pam_output() == NULL, "putil_debug_pam without debug on"); args->debug = true; TEST_PAM(putil_debug_pam, PAM_SYSTEM_ERR, LOG_DEBUG, "putil_debug_pam"); + TEST_PAM(putil_debug_pam, PAM_SUCCESS, LOG_DEBUG, "putil_debug_pam ok"); args->debug = false; -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 TEST_KRB5(putil_crit_krb5, LOG_CRIT, "putil_crit_krb5"); TEST_KRB5(putil_err_krb5, LOG_ERR, "putil_err_krb5"); code = krb5_parse_name(args->ctx, "foo@bar@EXAMPLE.COM", &princ); @@ -123,5 +136,8 @@ skip_block(4, "not built with Kerberos support"); #endif + putil_args_free(args); + pam_end(pamh, 0); + return 0; } diff -Nru libpam-afs-session-2.5/tests/pam-util/options-t.c libpam-afs-session-2.6/tests/pam-util/options-t.c --- libpam-afs-session-2.5/tests/pam-util/options-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/pam-util/options-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,8 +4,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery - * Copyright 2010, 2011 + * Written by Russ Allbery + * Copyright 2010, 2011, 2012, 2013, 2014 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -36,13 +36,19 @@ #include #include #include -#include +#include #include +#include /* The configuration struct we will use for testing. */ struct pam_config { struct vector *cells; bool debug; +#ifdef HAVE_KRB5 + krb5_deltat expires; +#else + long expires; +#endif bool ignore_root; long minimum_uid; char *program; @@ -54,6 +60,7 @@ struct option options[] = { { K(cells), true, LIST (NULL) }, { K(debug), true, BOOL (false) }, + { K(expires), true, TIME (10) }, { K(ignore_root), false, BOOL (true) }, { K(minimum_uid), true, NUMBER (0) }, { K(program), true, STRING (NULL) }, @@ -86,11 +93,16 @@ argv_err[0] = (a); \ status = putil_args_parse(args, 1, argv_err, options, optlen); \ ok(status, "Parse of %s", (a)); \ - asprintf(&expected, "%d %s", (p), (e)); \ seen = pam_output(); \ - is_string(expected, seen, "...error for %s", (a)); \ - free(seen); \ - free(expected); \ + if (seen == NULL) \ + ok_block(2, false, "...no error output"); \ + else { \ + is_int((p), seen->lines[0].priority, \ + "...priority for %s", (a)); \ + is_string((e), seen->lines[0].line, \ + "...error for %s", (a)); \ + } \ + pam_output_free(seen); \ } while (0); @@ -100,14 +112,7 @@ static struct pam_config * config_new(void) { - struct pam_config *config; - - config = calloc(1, sizeof(struct pam_config)); - if (config == NULL) - sysbail("cannot allocate memory"); - config->cells = NULL; - config->program = NULL; - return config; + return bcalloc(1, sizeof(struct pam_config)); } @@ -117,10 +122,10 @@ static void config_free(struct pam_config *config) { - if (config->cells != NULL) - vector_free(config->cells); - if (config->program != NULL) - free(config->program); + if (config == NULL) + return; + vector_free(config->cells); + free(config->program); free(config); } @@ -133,25 +138,31 @@ struct pam_conv conv = { NULL, NULL }; bool status; struct vector *cells; - char *program, *seen, *expected; + char *program; + struct output *seen; const char *argv_bool[2] = { NULL, NULL }; const char *argv_err[2] = { NULL, NULL }; const char *argv_empty[] = { NULL }; +#ifdef HAVE_KRB5 const char *argv_all[] = { - "cells=stanford.edu,ir.stanford.edu", "debug", "ignore_root", - "minimum_uid=1000", "program=/bin/true" + "cells=stanford.edu,ir.stanford.edu", "debug", "expires=1d", + "ignore_root", "minimum_uid=1000", "program=/bin/true" }; -#ifdef HAVE_KERBEROS char *krb5conf; +#else + const char *argv_all[] = { + "cells=stanford.edu,ir.stanford.edu", "debug", "expires=86400", + "ignore_root", "minimum_uid=1000", "program=/bin/true" + }; #endif if (pam_start("test", NULL, &conv, &pamh) != PAM_SUCCESS) sysbail("cannot create pam_handle_t"); args = putil_args_new(pamh, 0); if (args == NULL) - sysbail("cannot create PAM argument struct"); + bail("cannot create PAM argument struct"); - plan(139); + plan(161); /* First, check just the defaults. */ args->config = config_new(); @@ -159,6 +170,7 @@ ok(status, "Setting the defaults"); ok(args->config->cells == NULL, "...cells default"); is_int(false, args->config->debug, "...debug default"); + is_int(10, args->config->expires, "...expires default"); is_int(true, args->config->ignore_root, "...ignore_root default"); is_int(0, args->config->minimum_uid, "...minimum_uid default"); ok(args->config->program == NULL, "...program default"); @@ -168,20 +180,26 @@ ok(status, "Parse of empty argv"); ok(args->config->cells == NULL, "...cells still default"); is_int(false, args->config->debug, "...debug still default"); + is_int(10, args->config->expires, "...expires default"); is_int(true, args->config->ignore_root, "...ignore_root still default"); is_int(0, args->config->minimum_uid, "...minimum_uid still default"); ok(args->config->program == NULL, "...program still default"); /* Now, check setting everything. */ - status = putil_args_parse(args, 5, argv_all, options, optlen); + status = putil_args_parse(args, 6, argv_all, options, optlen); ok(status, "Parse of full argv"); - ok(args->config->cells != NULL, "...cells is set"); - is_int(2, args->config->cells->count, "...with two cells"); - is_string("stanford.edu", args->config->cells->strings[0], - "...first is stanford.edu"); - is_string("ir.stanford.edu", args->config->cells->strings[1], - "...second is ir.stanford.edu"); + if (args->config->cells == NULL) + ok_block(4, false, "...cells is set"); + else { + ok(args->config->cells != NULL, "...cells is set"); + is_int(2, args->config->cells->count, "...with two cells"); + is_string("stanford.edu", args->config->cells->strings[0], + "...first is stanford.edu"); + is_string("ir.stanford.edu", args->config->cells->strings[1], + "...second is ir.stanford.edu"); + } is_int(true, args->config->debug, "...debug is set"); + is_int(86400, args->config->expires, "...expires is set"); is_int(true, args->config->ignore_root, "...ignore_root is set"); is_int(1000, args->config->minimum_uid, "...minimum_uid is set"); is_string("/bin/true", args->config->program, "...program is set"); @@ -198,27 +216,36 @@ program = strdup("/bin/false"); if (program == NULL) sysbail("cannot allocate memory"); - options[4].defaults.string = program; + options[5].defaults.string = program; args->config = config_new(); status = putil_args_defaults(args, options, optlen); ok(status, "Setting defaults with new defaults"); - ok(args->config->cells != NULL, "...cells is set"); - is_int(2, args->config->cells->count, "...with two cells"); - is_string("foo.com", args->config->cells->strings[0], - "...first is foo.com"); - is_string("bar.com", args->config->cells->strings[1], - "...second is bar.com"); + if (args->config->cells == NULL) + ok_block(4, false, "...cells is set"); + else { + ok(args->config->cells != NULL, "...cells is set"); + is_int(2, args->config->cells->count, "...with two cells"); + is_string("foo.com", args->config->cells->strings[0], + "...first is foo.com"); + is_string("bar.com", args->config->cells->strings[1], + "...second is bar.com"); + } is_string("/bin/false", args->config->program, "...program is /bin/false"); - status = putil_args_parse(args, 5, argv_all, options, optlen); + status = putil_args_parse(args, 6, argv_all, options, optlen); ok(status, "Parse of full argv after defaults"); - ok(args->config->cells != NULL, "...cells is set"); - is_int(2, args->config->cells->count, "...with two cells"); - is_string("stanford.edu", args->config->cells->strings[0], - "...first is stanford.edu"); - is_string("ir.stanford.edu", args->config->cells->strings[1], - "...second is ir.stanford.edu"); + if (args->config->cells == NULL) + ok_block(4, false, "...cells is set"); + else { + ok(args->config->cells != NULL, "...cells is set"); + is_int(2, args->config->cells->count, "...with two cells"); + is_string("stanford.edu", args->config->cells->strings[0], + "...first is stanford.edu"); + is_string("ir.stanford.edu", args->config->cells->strings[1], + "...second is ir.stanford.edu"); + } is_int(true, args->config->debug, "...debug is set"); + is_int(86400, args->config->expires, "...expires is set"); is_int(true, args->config->ignore_root, "...ignore_root is set"); is_int(1000, args->config->minimum_uid, "...minimum_uid is set"); is_string("/bin/true", args->config->program, "...program is set"); @@ -231,7 +258,7 @@ is_string("bar.com", cells->strings[1], "...second cell after free"); is_string("/bin/false", program, "...string after free"); options[0].defaults.list = NULL; - options[4].defaults.string = NULL; + options[5].defaults.string = NULL; vector_free(cells); free(program); @@ -241,12 +268,16 @@ args->config = config_new(); status = putil_args_defaults(args, options, optlen); ok(status, "Setting defaults with string default for vector"); - ok(args->config->cells != NULL, "...cells is set"); - is_int(2, args->config->cells->count, "...with two cells"); - is_string("foo.com", args->config->cells->strings[0], - "...first is foo.com"); - is_string("bar.com", args->config->cells->strings[1], - "...second is bar.com"); + if (args->config->cells == NULL) + ok_block(4, false, "...cells is set"); + else { + ok(args->config->cells != NULL, "...cells is set"); + is_int(2, args->config->cells->count, "...with two cells"); + is_string("foo.com", args->config->cells->strings[0], + "...first is foo.com"); + is_string("bar.com", args->config->cells->strings[1], + "...second is bar.com"); + } config_free(args->config); args->config = NULL; options[0].type = TYPE_LIST; @@ -294,12 +325,12 @@ config_free(args->config); args->config = NULL; -#ifdef HAVE_KERBEROS +#ifdef HAVE_KRB5 /* Test for Kerberos krb5.conf option parsing. */ - krb5conf = test_file_path("data/krb5.conf"); + krb5conf = test_file_path("data/krb5-pam.conf"); if (krb5conf == NULL) - bail("cannot find data/krb5.conf"); + bail("cannot find data/krb5-pam.conf"); if (setenv("KRB5_CONFIG", krb5conf, 1) < 0) sysbail("cannot set KRB5_CONFIG"); krb5_free_context(args->ctx); @@ -313,6 +344,7 @@ ok(status, "Options from krb5.conf"); ok(args->config->cells == NULL, "...cells default"); is_int(true, args->config->debug, "...debug set from krb5.conf"); + is_int(1800, args->config->expires, "...expires set from krb5.conf"); is_int(true, args->config->ignore_root, "...ignore_root default"); is_int(1000, args->config->minimum_uid, "...minimum_uid set from krb5.conf"); @@ -338,6 +370,7 @@ is_string("bar.com", args->config->cells->strings[1], "...second cell from krb5.conf"); is_int(true, args->config->debug, "...debug set from krb5.conf"); + is_int(1800, args->config->expires, "...expires set from krb5.conf"); is_int(true, args->config->ignore_root, "...ignore_root default"); is_int(1000, args->config->minimum_uid, "...minimum_uid set from krb5.conf"); @@ -357,6 +390,7 @@ is_string("foo.com", args->config->cells->strings[1], "...second cell from krb5.conf"); is_int(true, args->config->debug, "...debug set from krb5.conf"); + is_int(1800, args->config->expires, "...expires set from krb5.conf"); is_int(true, args->config->ignore_root, "...ignore_root default"); is_int(1000, args->config->minimum_uid, "...minimum_uid set from krb5.conf"); @@ -372,22 +406,49 @@ config_free(args->config); args->config = NULL; + /* Test for time parsing errors. */ + args->config = config_new(); + TEST_ERROR("expires=ft87", LOG_ERR, + "bad time value in setting: expires=ft87"); + config_free(args->config); + /* Test error reporting from the krb5.conf parser. */ args->config = config_new(); status = putil_args_krb5(args, "bad-number", options, optlen); ok(status, "Options from krb5.conf (bad-number)"); - asprintf(&expected, "%d invalid number in krb5.conf setting for %s: %s", - LOG_ERR, "minimum_uid", "1000foo"); seen = pam_output(); - is_string(expected, seen, "...and correct error reported"); - free(expected); - free(seen); + is_string("invalid number in krb5.conf setting for minimum_uid: 1000foo", + seen->lines[0].line, "...and correct error reported"); + is_int(LOG_ERR, seen->lines[0].priority, "...with correct priority"); + pam_output_free(seen); + config_free(args->config); + args->config = NULL; + + /* Test error reporting on times from the krb5.conf parser. */ + args->config = config_new(); + status = putil_args_krb5(args, "bad-time", options, optlen); + ok(status, "Options from krb5.conf (bad-time)"); + seen = pam_output(); + if (seen == NULL) + ok_block(2, false, "...no error output"); + else { + is_string("invalid time in krb5.conf setting for expires: ft87", + seen->lines[0].line, "...and correct error reported"); + is_int(LOG_ERR, seen->lines[0].priority, "...with correct priority"); + } + pam_output_free(seen); config_free(args->config); args->config = NULL; -#else /* !HAVE_KERBEROS */ - skip_block(30, "Kerberos support not configured"); + + test_file_path_free(krb5conf); + +#else /* !HAVE_KRB5 */ + + skip_block(37, "Kerberos support not configured"); + #endif putil_args_free(args); + pam_end(pamh, 0); return 0; } diff -Nru libpam-afs-session-2.5/tests/pam-util/vector-t.c libpam-afs-session-2.6/tests/pam-util/vector-t.c --- libpam-afs-session-2.5/tests/pam-util/vector-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/pam-util/vector-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -22,23 +22,25 @@ #include #include +#include int main(void) { struct vector *vector, *ovector, *copy; - const char cstring[] = "This is a\ttest. "; - char *string; - char buffer[BUFSIZ]; - const char * const env[] = { buffer, NULL }; + char *command, *string; + const char *env[2]; pid_t child; size_t i; + const char cstring[] = "This is a\ttest. "; plan(60); vector = vector_new(); ok(vector != NULL, "vector_new returns non-NULL"); + if (vector == NULL) + bail("vector_new returned NULL"); ok(vector_add(vector, cstring), "vector_add succeeds"); is_int(1, vector->count, "vector_add increases count"); ok(vector->strings[0] != cstring, "...and allocated new memory"); @@ -59,12 +61,15 @@ ok(vector->strings[0] != cstring, "each pointer is different"); copy = vector_copy(vector); ok(copy != NULL, "vector_copy returns non-NULL"); + if (copy == NULL) + bail("vector_copy returned NULL"); is_int(4, copy->count, "...and has right count"); is_int(4, copy->allocated, "...and has right allocated count"); for (i = 0; i < 4; i++) { - is_string(cstring, copy->strings[i], "...and string %d is right", i); + is_string(cstring, copy->strings[i], "...and string %lu is right", + (unsigned long) i); ok(copy->strings[i] != vector->strings[i], - "...and pointer %d is different", i); + "...and pointer %lu is different", (unsigned long) i); } vector_free(copy); vector_clear(vector); @@ -106,8 +111,8 @@ vector = vector_new(); ok(vector_add(vector, "/bin/sh"), "vector_add succeeds"); ok(vector_add(vector, "-c"), "vector_add succeeds"); - snprintf(buffer, sizeof(buffer), "echo ok %lu - vector_exec", testnum++); - ok(vector_add(vector, buffer), "vector_add succeeds"); + basprintf(&command, "echo ok %lu - vector_exec", testnum++); + ok(vector_add(vector, command), "vector_add succeeds"); child = fork(); if (child < 0) sysbail("unable to fork"); @@ -116,13 +121,16 @@ sysdiag("unable to exec /bin/sh"); waitpid(child, NULL, 0); vector_free(vector); + free(command); vector = vector_new(); ok(vector_add(vector, "/bin/sh"), "vector_add succeeds"); ok(vector_add(vector, "-c"), "vector_add succeeds"); ok(vector_add(vector, "echo ok $NUMBER - vector_exec_env"), "vector_add succeeds"); - snprintf(buffer, sizeof(buffer), "NUMBER=%lu", testnum++); + basprintf(&string, "NUMBER=%lu", testnum++); + env[0] = string; + env[1] = NULL; child = fork(); if (child < 0) sysbail("unable to fork"); @@ -131,6 +139,7 @@ sysdiag("unable to exec /bin/sh"); waitpid(child, NULL, 0); vector_free(vector); + free(string); return 0; } diff -Nru libpam-afs-session-2.5/tests/portable/asprintf-t.c libpam-afs-session-2.6/tests/portable/asprintf-t.c --- libpam-afs-session-2.5/tests/portable/asprintf-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/portable/asprintf-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -16,6 +16,7 @@ */ #include +#include #include #include diff -Nru libpam-afs-session-2.5/tests/portable/snprintf-t.c libpam-afs-session-2.6/tests/portable/snprintf-t.c --- libpam-afs-session-2.5/tests/portable/snprintf-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/portable/snprintf-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,9 +4,9 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006 - * Russ Allbery + * Russ Allbery * Copyright 2009, 2010 * The Board of Trustees of the Leland Stanford Junior University * Copyright 1995 Patrick Powell @@ -26,7 +26,9 @@ * Disable the requirement that format strings be literals. We need variable * formats for easy testing. */ -#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2) || defined(__clang__) +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif /* * Intentionally don't add the printf attribute here since we pass a diff -Nru libpam-afs-session-2.5/tests/portable/strlcat-t.c libpam-afs-session-2.6/tests/portable/strlcat-t.c --- libpam-afs-session-2.5/tests/portable/strlcat-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/portable/strlcat-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 diff -Nru libpam-afs-session-2.5/tests/portable/strlcpy-t.c libpam-afs-session-2.6/tests/portable/strlcpy-t.c --- libpam-afs-session-2.5/tests/portable/strlcpy-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/portable/strlcpy-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 diff -Nru libpam-afs-session-2.5/tests/portable/strndup-t.c libpam-afs-session-2.6/tests/portable/strndup-t.c --- libpam-afs-session-2.5/tests/portable/strndup-t.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/portable/strndup-t.c 2015-09-19 18:25:37.000000000 +0000 @@ -4,7 +4,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at . * - * Written by Russ Allbery + * Written by Russ Allbery * * 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 @@ -28,9 +28,10 @@ int main(void) { + char buffer[3]; char *result = NULL; - plan(6); + plan(7); result = test_strndup("foo", 8); is_string("foo", result, "strndup longer than string"); @@ -44,6 +45,10 @@ result = test_strndup("foo", 0); is_string("", result, "strndup of size 0"); free(result); + memcpy(buffer, "foo", 3); + result = test_strndup(buffer, 3); + is_string("foo", result, "strndup of non-nul-terminated string"); + free(result); errno = 0; result = test_strndup(NULL, 0); is_string(NULL, result, "strndup of NULL"); diff -Nru libpam-afs-session-2.5/tests/README libpam-afs-session-2.6/tests/README --- libpam-afs-session-2.5/tests/README 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/README 2015-09-19 18:25:37.000000000 +0000 @@ -240,7 +240,7 @@ This file is part of the documentation of C TAP Harness, which can be found at . - Copyright 2010 Russ Allbery + Copyright 2010 Russ Allbery Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright diff -Nru libpam-afs-session-2.5/tests/runtests.c libpam-afs-session-2.6/tests/runtests.c --- libpam-afs-session-2.5/tests/runtests.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/runtests.c 2015-09-19 18:25:37.000000000 +0000 @@ -3,15 +3,19 @@ * * Usage: * - * runtests [-b ] [-s ] - * runtests -o [-b ] [-s ] + * runtests [-hv] [-b ] [-s ] -l + * runtests [-hv] [-b ] [-s ] [ ...] + * runtests -o [-h] [-b ] [-s ] * * 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. Test output should start with a line containing the - * number of tests (numbered from 1 to this number), optionally preceded by - * "1..", although that line may be given anywhere in the output. Each - * additional line should be in the following format: + * 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 + * that line may be given anywhere in the output. Each additional line should + * be in the following format: * * ok * not ok @@ -50,12 +54,16 @@ * directories. These paths can also be set with the -b and -s command-line * options, which will override anything set at build time. * + * 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 . * - * Copyright 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011 - * Russ Allbery + * Copyright 2000, 2001, 2004, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, + * 2014, 2015 Russ Allbery * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -77,14 +85,18 @@ */ /* Required for fdopen(), getopt(), and putenv(). */ -#ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 500 +#if defined(__STRICT_ANSI__) || defined(PEDANTIC) +# ifndef _XOPEN_SOURCE +# define _XOPEN_SOURCE 500 +# endif #endif #include #include #include +#include #include +#include #include #include #include @@ -99,12 +111,29 @@ /* sys/time.h must be included before sys/resource.h on some platforms. */ #include -/* AIX doesn't have WCOREDUMP. */ +/* 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 + +/* + * POSIX requires that these be defined in , but they're not always + * available. If one of them has been defined, all the rest almost certainly + * have. + */ +#ifndef STDIN_FILENO +# define STDIN_FILENO 0 +# define STDOUT_FILENO 1 +# define STDERR_FILENO 2 #endif /* + * Used for iterating through arrays. Returns the number of elements in the + * array (useful for a < upper bound in a for loop). + */ +#define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) + +/* * The source and build versions of the tests directory. This is used to set * the SOURCE and BUILD environment variables and find test programs, if set. * Normally, this should be set as part of the build process to the test @@ -125,6 +154,12 @@ TEST_INVALID }; +/* Really, just a boolean, but this is more self-documenting. */ +enum test_verbose { + CONCISE = 0, + VERBOSE = 1 +}; + /* Indicates the state of our plan. */ enum plan_status { PLAN_INIT, /* Nothing seen yet. */ @@ -136,7 +171,8 @@ /* 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_STDERR 102 /* Couldn't open stderr file. */ +#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 { @@ -151,7 +187,7 @@ 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 as aborted. */ + 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. */ @@ -165,21 +201,27 @@ }; /* - * Usage message. Should be used as a printf format with two arguments: the - * path to runtests, given twice. + * Usage message. Should be used as a printf format with four arguments: the + * path to runtests, given three times, and the usage_description. This is + * split into variables to satisfy the pedantic ISO C90 limit on strings. */ static const char usage_message[] = "\ -Usage: %s [-b ] [-s ] \n\ - %s -o [-b ] [-s ] \n\ +Usage: %s [-hv] [-b ] [-s ] ...\n\ + %s [-hv] [-b ] [-s ] -l \n\ + %s -o [-h] [-b ] [-s ] \n\ \n\ Options:\n\ -b Set the build directory to \n\ +%s"; +static const char usage_extra[] = "\ + -l Take the list of tests to run from \n\ -o Run a single test rather than a list of tests\n\ -s Set the source directory to \n\ + -v Show the full output of each test\n\ \n\ -runtests normally runs each test listed in a file whose path is given as\n\ -its command-line argument. With the -o option, it instead runs a single\n\ -test and shows its complete output.\n"; +runtests normally runs each test listed on the command line. With the -l\n\ +option, it instead runs every test listed in a file. With the -o option,\n\ +it instead runs a single test and shows its complete output.\n"; /* * Header used for test output. %s is replaced by the file name of the list @@ -195,9 +237,59 @@ -------------------------- -------------- ---- ---- ------------------------"; /* Include the file name and line number in malloc failures. */ -#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 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__) + +/* + * __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 + +/* + * We use __alloc_size__, but it was only available in fairly recent versions + * of GCC. Suppress warnings about the unknown attribute if GCC is too old. + * We know that we're GCC at this point, so we can use the GCC variadic macro + * extension, which will still work with versions of GCC too old to have C99 + * 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 +#endif + +/* + * LLVM and Clang pretend to be GCC but don't support all of the __attribute__ + * settings that GCC does. For them, suppress warnings about unknown + * attributes on declarations. This unfortunately will affect the entire + * compilation context, but there's no push and pop available. + */ +#if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__)) +# pragma GCC diagnostic ignored "-Wattributes" +#endif + +/* Declare internal functions that benefit from compiler attributes. */ +static void sysdie(const char *, ...) + __attribute__((__nonnull__, __noreturn__, __format__(printf, 1, 2))); +static void *x_calloc(size_t, size_t, const char *, int) + __attribute__((__alloc_size__(1, 2), __malloc__, __nonnull__)); +static void *x_malloc(size_t, const char *, int) + __attribute__((__alloc_size__(1), __malloc__, __nonnull__)); +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__)); /* @@ -221,6 +313,24 @@ /* + * Allocate zeroed memory, reporting a fatal error and exiting on failure. + */ +static void * +x_calloc(size_t n, size_t size, const char *file, int line) +{ + void *p; + + n = (n > 0) ? n : 1; + size = (size > 0) ? size : 1; + p = calloc(n, size); + if (p == NULL) + sysdie("failed to calloc %lu bytes at %s line %d", + (unsigned long) size, file, line); + return p; +} + + +/* * Allocate memory, reporting a fatal error and exiting on failure. */ static void * @@ -238,14 +348,26 @@ /* * Reallocate memory, reporting a fatal error and exiting on failure. + * + * We should technically use SIZE_MAX here for the overflow check, but + * SIZE_MAX is C99 and we're only assuming C89 + SUSv3, which does not + * guarantee that it exists. They do guarantee that UINT_MAX exists, and we + * can assume that UINT_MAX <= SIZE_MAX. And we should not be allocating + * anything anywhere near that large. + * + * (In theory, C89 and C99 permit size_t to be smaller than unsigned int, but + * I disbelieve in the existence of such systems and they will have to cope + * without overflow checks.) */ static void * -x_realloc(void *p, size_t size, const char *file, int line) +x_reallocarray(void *p, size_t n, size_t size, const char *file, int line) { - p = realloc(p, size); + if (n > 0 && UINT_MAX / n <= size) + sysdie("realloc too large at %s line %d", file, line); + p = realloc(p, n * size); if (p == NULL) sysdie("failed to realloc %lu bytes at %s line %d", - (unsigned long) size, file, line); + (unsigned long) (n * size), file, line); return p; } @@ -270,6 +392,55 @@ /* + * Form a new string by concatenating multiple strings. The arguments must be + * terminated by (const char *) 0. + * + * This function only exists because we can't assume asprintf. We can't + * simulate asprintf with snprintf because we're only assuming SUSv3, which + * does not require that snprintf with a NULL buffer return the required + * length. When those constraints are relaxed, this should be ripped out and + * replaced with asprintf or a more trivial replacement with snprintf. + */ +static char * +concat(const char *first, ...) +{ + va_list args; + char *result; + const char *string; + size_t offset; + size_t length = 0; + + /* + * Find the total memory required. Ensure we don't overflow length. We + * aren't guaranteed to have SIZE_MAX, so use UINT_MAX as an acceptable + * substitute (see the x_nrealloc comments). + */ + va_start(args, first); + for (string = first; string != NULL; string = va_arg(args, const char *)) { + if (length >= UINT_MAX - strlen(string)) { + errno = EINVAL; + sysdie("strings too long in concat"); + } + length += strlen(string); + } + va_end(args); + length++; + + /* Create the string. */ + result = xmalloc(length); + va_start(args, first); + offset = 0; + for (string = first; string != NULL; string = va_arg(args, const char *)) { + memcpy(result + offset, string, strlen(string)); + offset += strlen(string); + } + va_end(args); + result[offset] = '\0'; + return result; +} + + +/* * Given a struct timeval, return the number of seconds it represents as a * double. Use difftime() to convert a time_t to a double. */ @@ -321,36 +492,62 @@ static pid_t test_start(const char *path, int *fd) { - int fds[2], errfd; + int fds[2], infd, errfd; pid_t child; + /* Create a pipe used to capture the output from the test program. */ if (pipe(fds) == -1) { puts("ABORTED"); fflush(stdout); sysdie("can't create pipe"); } + + /* Fork a child process, massage the file descriptors, and exec. */ child = fork(); - if (child == (pid_t) -1) { + switch (child) { + case -1: puts("ABORTED"); fflush(stdout); sysdie("can't fork"); - } else if (child == 0) { - /* In child. Set up our stdout and stderr. */ + + /* In the child. Set up our standard output. */ + case 0: + close(fds[0]); + close(STDOUT_FILENO); + if (dup2(fds[1], STDOUT_FILENO) < 0) + _exit(CHILDERR_DUP); + close(fds[1]); + + /* Point standard input at /dev/null. */ + close(STDIN_FILENO); + infd = open("/dev/null", O_RDONLY); + if (infd < 0) + _exit(CHILDERR_STDIN); + if (infd != STDIN_FILENO) { + if (dup2(infd, STDIN_FILENO) < 0) + _exit(CHILDERR_DUP); + close(infd); + } + + /* Point standard error at /dev/null. */ + close(STDERR_FILENO); errfd = open("/dev/null", O_WRONLY); if (errfd < 0) _exit(CHILDERR_STDERR); - if (dup2(errfd, 2) == -1) - _exit(CHILDERR_DUP); - close(fds[0]); - if (dup2(fds[1], 1) == -1) - _exit(CHILDERR_DUP); + if (errfd != STDERR_FILENO) { + if (dup2(errfd, STDERR_FILENO) < 0) + _exit(CHILDERR_DUP); + close(errfd); + } /* Now, exec our process. */ if (execl(path, path, (char *) 0) == -1) _exit(CHILDERR_EXEC); - } else { - /* In parent. Close the extra file descriptor. */ + + /* In parent. Close the extra file descriptor. */ + default: close(fds[1]); + break; } *fd = fds[0]; return child; @@ -378,15 +575,63 @@ /* + * Allocate or resize the array of test results to be large enough to contain + * the test number in. + */ +static void +resize_results(struct testset *ts, unsigned long n) +{ + unsigned long i; + size_t s; + + /* If there's already enough space, return quickly. */ + if (n <= ts->allocated) + return; + + /* + * If no space has been allocated, do the initial allocation. Otherwise, + * resize. Start with 32 test cases and then add 1024 with each resize to + * try to reduce the number of reallocations. + */ + if (ts->allocated == 0) { + s = (n > 32) ? n : 32; + ts->results = xcalloc(s, sizeof(enum test_status)); + } else { + s = (n > ts->allocated + 1024) ? n : ts->allocated + 1024; + ts->results = xreallocarray(ts->results, s, sizeof(enum test_status)); + } + + /* Set the results for the newly-allocated test array. */ + for (i = ts->allocated; i < s; i++) + ts->results[i] = TEST_INVALID; + ts->allocated = s; +} + + +/* + * Report an invalid test number and set the appropriate flags. Pulled into a + * separate function since we do this in several places. + */ +static void +invalid_test_number(struct testset *ts, long n, enum test_verbose verbose) +{ + if (!verbose) + test_backspace(ts); + printf("ABORTED (invalid test number %ld)\n", n); + ts->aborted = 1; + ts->reported = 1; +} + + +/* * Read the plan line of test output, which should contain the range of test * numbers. We may initialize the testset structure here if we haven't yet * seen a test. Return true if initialization succeeded and the test should * continue, false otherwise. */ static int -test_plan(const char *line, struct testset *ts) +test_plan(const char *line, struct testset *ts, enum test_verbose verbose) { - unsigned long i; long n; /* @@ -399,12 +644,14 @@ line += 3; /* - * Get the count, check it for validity, and initialize the struct. If we - * have something of the form "1..0 # skip foo", the whole file was + * Get the count and check it for validity. + * + * If we have something of the form "1..0 # skip foo", the whole file was * skipped; record that. If we do skip the whole file, zero out all of - * our statistics, since they're no longer relevant. strtol is called - * with a second argument to advance the line pointer past the count to - * make it simpler to detect the # skip case. + * our statistics, since they're no longer relevant. + * + * strtol is called with a second argument to advance the line pointer + * past the count to make it simpler to detect the # skip case. */ n = strtol(line, (char **) &line, 10); if (n == 0) { @@ -433,29 +680,27 @@ ts->reported = 1; return 0; } - if (ts->plan == PLAN_INIT && ts->allocated == 0) { - ts->count = n; - ts->allocated = n; + + /* + * If we are doing lazy planning, check the plan against the largest test + * number that we saw and fail now if we saw a check outside the plan + * range. + */ + if (ts->plan == PLAN_PENDING && (unsigned long) n < ts->count) { + invalid_test_number(ts, (long) ts->count, verbose); + return 0; + } + + /* + * Otherwise, allocated or resize the results if needed and update count, + * and then record that we've seen a plan. + */ + resize_results(ts, (unsigned long) n); + ts->count = (unsigned long) n; + if (ts->plan == PLAN_INIT) ts->plan = PLAN_FIRST; - ts->results = xmalloc(ts->count * sizeof(enum test_status)); - for (i = 0; i < ts->count; i++) - ts->results[i] = TEST_INVALID; - } else if (ts->plan == PLAN_PENDING) { - if ((unsigned long) n < ts->count) { - printf("ABORTED (invalid test number %lu)\n", ts->count); - ts->aborted = 1; - ts->reported = 1; - return 0; - } - ts->count = n; - if ((unsigned long) n > ts->allocated) { - ts->results = xrealloc(ts->results, n * sizeof(enum test_status)); - for (i = ts->allocated; i < ts->count; i++) - ts->results[i] = TEST_INVALID; - ts->allocated = n; - } + else if (ts->plan == PLAN_PENDING) ts->plan = PLAN_FINAL; - } return 1; } @@ -467,13 +712,14 @@ * reported status. */ static void -test_checkline(const char *line, struct testset *ts) +test_checkline(const char *line, struct testset *ts, + enum test_verbose verbose) { enum test_status status = TEST_PASS; const char *bail; char *end; long number; - unsigned long i, current; + unsigned long current; int outlen; /* Before anything, check for a test abort. */ @@ -486,7 +732,8 @@ length = strlen(bail); if (bail[length - 1] == '\n') length--; - test_backspace(ts); + if (!verbose) + test_backspace(ts); printf("ABORTED (%.*s)\n", (int) length, bail); ts->reported = 1; } @@ -507,13 +754,15 @@ /* If we haven't yet seen a plan, look for one. */ if (ts->plan == PLAN_INIT && isdigit((unsigned char)(*line))) { - if (!test_plan(line, ts)) + if (!test_plan(line, ts, verbose)) return; } else if (strncmp(line, "1..", 3) == 0) { if (ts->plan == PLAN_PENDING) { - if (!test_plan(line, ts)) + if (!test_plan(line, ts, verbose)) return; } else { + if (!verbose) + test_backspace(ts); puts("ABORTED (multiple plans)"); ts->aborted = 1; ts->reported = 1; @@ -532,32 +781,23 @@ errno = 0; number = strtol(line, &end, 10); if (errno != 0 || end == line) - number = ts->current + 1; - current = number; - if (number <= 0 || (current > ts->count && ts->plan == PLAN_FIRST)) { - test_backspace(ts); - printf("ABORTED (invalid test number %lu)\n", current); - ts->aborted = 1; - ts->reported = 1; + current = ts->current + 1; + else if (number <= 0) { + invalid_test_number(ts, number, verbose); + return; + } else + current = (unsigned long) number; + if (current > ts->count && ts->plan == PLAN_FIRST) { + invalid_test_number(ts, (long) current, verbose); return; } /* We have a valid test result. Tweak the results array if needed. */ if (ts->plan == PLAN_INIT || ts->plan == PLAN_PENDING) { ts->plan = PLAN_PENDING; + resize_results(ts, current); if (current > ts->count) ts->count = current; - if (current > ts->allocated) { - unsigned long n; - - n = (ts->allocated == 0) ? 32 : ts->allocated * 2; - if (n < current) - n = current; - ts->results = xrealloc(ts->results, n * sizeof(enum test_status)); - for (i = ts->allocated; i < n; i++) - ts->results[i] = TEST_INVALID; - ts->allocated = n; - } } /* @@ -577,7 +817,8 @@ /* Make sure that the test number is in range and not a duplicate. */ if (ts->results[current - 1] != TEST_INVALID) { - test_backspace(ts); + if (!verbose) + test_backspace(ts); printf("ABORTED (duplicate test number %lu)\n", current); ts->aborted = 1; ts->reported = 1; @@ -593,10 +834,13 @@ } ts->current = current; ts->results[current - 1] = status; - test_backspace(ts); - if (isatty(STDOUT_FILENO)) { - outlen = printf("%lu/%lu", current, ts->count); - ts->length = (outlen >= 0) ? outlen : 0; + if (!verbose && isatty(STDOUT_FILENO)) { + test_backspace(ts); + if (ts->plan == PLAN_PENDING) + outlen = printf("%lu/?", current); + else + outlen = printf("%lu/%lu", current, ts->count); + ts->length = (outlen >= 0) ? (unsigned int) outlen : 0; fflush(stdout); } } @@ -612,7 +856,7 @@ * disable this). */ static unsigned int -test_print_range(unsigned long first, unsigned long last, unsigned int chars, +test_print_range(unsigned long first, unsigned long last, unsigned long chars, unsigned int limit) { unsigned int needed = 0; @@ -752,6 +996,7 @@ if (!ts->reported) puts("ABORTED (execution failed -- not found?)"); break; + case CHILDERR_STDIN: case CHILDERR_STDERR: if (!ts->reported) puts("ABORTED (can't open /dev/null)"); @@ -781,7 +1026,7 @@ * false otherwise. */ static int -test_run(struct testset *ts) +test_run(struct testset *ts, enum test_verbose verbose) { pid_t testpid, child; int outfd, status; @@ -798,12 +1043,19 @@ sysdie("fdopen failed"); } - /* Pass each line of output to test_checkline(). */ - while (!ts->aborted && fgets(buffer, sizeof(buffer), output)) - test_checkline(buffer, ts); + /* + * Pass each line of output to test_checkline(), and print the line if + * verbosity is requested. + */ + while (!ts->aborted && fgets(buffer, sizeof(buffer), output)) { + if (verbose) + printf("%s", buffer); + test_checkline(buffer, ts, verbose); + } if (ferror(output) || ts->plan == PLAN_INIT) ts->aborted = 1; - test_backspace(ts); + if (!verbose) + test_backspace(ts); /* * Consume the rest of the test output, close the output descriptor, @@ -811,7 +1063,8 @@ * for eventual output. */ while (fgets(buffer, sizeof(buffer), output)) - ; + if (verbose) + printf("%s", buffer); fclose(output); child = waitpid(testpid, &ts->status, 0); if (child == (pid_t) -1) { @@ -881,107 +1134,227 @@ if (first != 0) test_print_range(first, last, chars, 19); putchar('\n'); - free(ts->file); - free(ts->path); - free(ts->results); - if (ts->reason != NULL) - free(ts->reason); - free(ts); } } /* + * Check whether a given file path is a valid test. Currently, this checks + * whether it is executable and is a regular file. Returns true or false. + */ +static int +is_valid_test(const char *path) +{ + struct stat st; + + if (access(path, X_OK) < 0) + return 0; + if (stat(path, &st) < 0) + return 0; + if (!S_ISREG(st.st_mode)) + return 0; + return 1; +} + + +/* * Given the name of a test, a pointer to the testset struct, and the source * and build directories, find the test. We try first relative to the current * directory, then in the build directory (if not NULL), then in the source * directory. In each of those directories, we first try a "-t" extension and - * then a ".t" extension. When we find an executable program, we fill in the - * path member of the testset struct. If none of those paths are executable, - * just fill in the name of the test with "-t" appended. + * then a ".t" extension. When we find an executable program, we return the + * path to that program. If none of those paths are executable, just fill in + * the name of the test as is. * * The caller is responsible for freeing the path member of the testset * struct. */ -static void -find_test(const char *name, struct testset *ts, const char *source, - const char *build) +static char * +find_test(const char *name, const char *source, const char *build) { - char *path; - const char *bases[4]; - unsigned int i; + char *path = NULL; + const char *bases[3], *suffix, *base; + unsigned int i, j; + const char *suffixes[3] = { "-t", ".t", "" }; + /* Possible base directories. */ bases[0] = "."; bases[1] = build; bases[2] = source; - bases[3] = NULL; - for (i = 0; bases[i] != NULL; i++) { - path = xmalloc(strlen(bases[i]) + strlen(name) + 4); - sprintf(path, "%s/%s-t", bases[i], name); - if (access(path, X_OK) != 0) - path[strlen(path) - 2] = '.'; - if (access(path, X_OK) == 0) - break; - free(path); - path = NULL; + /* Try each suffix with each base. */ + for (i = 0; i < ARRAY_SIZE(suffixes); i++) { + suffix = suffixes[i]; + for (j = 0; j < ARRAY_SIZE(bases); j++) { + base = bases[j]; + if (base == NULL) + continue; + path = concat(base, "/", name, suffix, (const char *) 0); + if (is_valid_test(path)) + return path; + free(path); + path = NULL; + } + } + if (path == NULL) + path = xstrdup(name); + return path; +} + + +/* + * 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 + * comments). Reports an error to standard error and exits if the list of + * tests cannot be read. + */ +static struct testlist * +read_test_list(const char *filename) +{ + FILE *file; + unsigned int line; + size_t length; + char buffer[BUFSIZ]; + const char *testname; + struct testlist *listhead, *current; + + /* Create the initial container list that will hold our results. */ + listhead = xcalloc(1, sizeof(struct testlist)); + current = NULL; + + /* + * Open our file of tests to run and read it line by line, creating a new + * struct testlist and struct testset for each line. + */ + file = fopen(filename, "r"); + if (file == NULL) + sysdie("can't open %s", filename); + line = 0; + while (fgets(buffer, sizeof(buffer), file)) { + line++; + length = strlen(buffer) - 1; + if (buffer[length] != '\n') { + fprintf(stderr, "%s:%u: line too long\n", filename, line); + exit(1); + } + buffer[length] = '\0'; + + /* Skip comments, leading spaces, and blank lines. */ + testname = skip_whitespace(buffer); + if (strlen(testname) == 0) + continue; + if (testname[0] == '#') + continue; + + /* Allocate the new testset structure. */ + if (current == NULL) + current = listhead; + else { + current->next = xcalloc(1, sizeof(struct testlist)); + current = current->next; + } + current->ts = xcalloc(1, sizeof(struct testset)); + current->ts->plan = PLAN_INIT; + current->ts->file = xstrdup(testname); + } + fclose(file); + + /* If there were no tests, current is still NULL. */ + if (current == NULL) { + free(listhead); + return NULL; + } + + /* Return the results. */ + return listhead; +} + + +/* + * Build a list of tests from command line arguments. Takes the argv and argc + * representing the command line arguments and returns a newly allocated test + * list, or NULL if there were no tests. The caller is responsible for + * freeing. + */ +static struct testlist * +build_test_list(char *argv[], int argc) +{ + int i; + struct testlist *listhead, *current; + + /* Create the initial container list that will hold our results. */ + listhead = xcalloc(1, sizeof(struct testlist)); + current = NULL; + + /* Walk the list of arguments and create test sets for them. */ + for (i = 0; i < argc; i++) { + if (current == NULL) + current = listhead; + else { + current->next = xcalloc(1, sizeof(struct testlist)); + current = current->next; + } + current->ts = xcalloc(1, sizeof(struct testset)); + current->ts->plan = PLAN_INIT; + current->ts->file = xstrdup(argv[i]); } - if (path == NULL) { - path = xmalloc(strlen(name) + 3); - sprintf(path, "%s-t", name); + + /* If there were no tests, current is still NULL. */ + if (current == NULL) { + free(listhead); + return NULL; } - ts->path = path; + + /* Return the results. */ + return listhead; +} + + +/* Free a struct testset. */ +static void +free_testset(struct testset *ts) +{ + free(ts->file); + free(ts->path); + free(ts->results); + free(ts->reason); + free(ts); } /* - * Run a batch of tests from a given file listing each test on a line by - * itself. Takes two additional parameters: the root of the source directory - * and the root of the build directory. Test programs will be first searched - * for in the current directory, then the build directory, then the source - * directory. The file must be rewindable. Returns true iff all tests - * passed. + * Run a batch of tests. Takes two additional parameters: the root of the + * source directory and the root of the build directory. Test programs will + * be first searched for in the current directory, then the build directory, + * then the source directory. Returns true iff all tests passed, and always + * frees the test list that's passed in. */ static int -test_batch(const char *testlist, const char *source, const char *build) +test_batch(struct testlist *tests, const char *source, const char *build, + enum test_verbose verbose) { - FILE *tests; - unsigned int length, i; - unsigned int longest = 0; - char buffer[BUFSIZ]; - unsigned int line; - struct testset ts, *tmp; + size_t length, i; + size_t longest = 0; + unsigned int count = 0; + struct testset *ts; struct timeval start, end; struct rusage stats; struct testlist *failhead = NULL; struct testlist *failtail = NULL; - struct testlist *next; + struct testlist *current, *next; + int succeeded; unsigned long total = 0; unsigned long passed = 0; unsigned long skipped = 0; unsigned long failed = 0; unsigned long aborted = 0; - /* - * Open our file of tests to run and scan it, checking for lines that - * are too long and searching for the longest line. - */ - tests = fopen(testlist, "r"); - if (!tests) - sysdie("can't open %s", testlist); - line = 0; - while (fgets(buffer, sizeof(buffer), tests)) { - line++; - length = strlen(buffer) - 1; - if (buffer[length] != '\n') { - fprintf(stderr, "%s:%u: line too long\n", testlist, line); - exit(1); - } + /* Walk the list of tests to find the longest name. */ + for (current = tests; current != NULL; current = current->next) { + length = strlen(current->ts->file); if (length > longest) longest = length; } - if (fseek(tests, 0, SEEK_SET) == -1) - sysdie("can't rewind %s", testlist); /* * Add two to longest and round up to the nearest tab stop. This is how @@ -994,55 +1367,47 @@ /* Start the wall clock timer. */ gettimeofday(&start, NULL); - /* - * Now, plow through our tests again, running each one. Check line - * length again out of paranoia. - */ - line = 0; - while (fgets(buffer, sizeof(buffer), tests)) { - line++; - length = strlen(buffer) - 1; - if (buffer[length] != '\n') { - fprintf(stderr, "%s:%u: line too long\n", testlist, line); - exit(1); - } - buffer[length] = '\0'; - fputs(buffer, stdout); - for (i = length; i < longest; i++) - putchar('.'); + /* Now, plow through our tests again, running each one. */ + for (current = tests; current != NULL; current = current->next) { + ts = current->ts; + + /* Print out the name of the test file. */ + fputs(ts->file, stdout); + if (verbose) + fputs("\n\n", stdout); + else + for (i = strlen(ts->file); i < longest; i++) + putchar('.'); if (isatty(STDOUT_FILENO)) fflush(stdout); - memset(&ts, 0, sizeof(ts)); - ts.plan = PLAN_INIT; - ts.file = xstrdup(buffer); - find_test(buffer, &ts, source, build); - ts.reason = NULL; - if (test_run(&ts)) { - free(ts.file); - free(ts.path); - free(ts.results); - if (ts.reason != NULL) - free(ts.reason); - } else { - tmp = xmalloc(sizeof(struct testset)); - memcpy(tmp, &ts, sizeof(struct testset)); - if (!failhead) { + + /* Run the test. */ + ts->path = find_test(ts->file, source, build); + succeeded = test_run(ts, verbose); + fflush(stdout); + if (verbose) + putchar('\n'); + + /* Record cumulative statistics. */ + aborted += ts->aborted; + total += ts->count + ts->all_skipped; + passed += ts->passed; + skipped += ts->skipped + ts->all_skipped; + failed += ts->failed; + count++; + + /* If the test fails, we shuffle it over to the fail list. */ + if (!succeeded) { + if (failhead == NULL) { failhead = xmalloc(sizeof(struct testset)); - failhead->ts = tmp; - failhead->next = NULL; failtail = failhead; } else { failtail->next = xmalloc(sizeof(struct testset)); failtail = failtail->next; - failtail->ts = tmp; - failtail->next = NULL; } + failtail->ts = ts; + failtail->next = NULL; } - aborted += ts.aborted; - total += ts.count + ts.all_skipped; - passed += ts.passed; - skipped += ts.skipped + ts.all_skipped; - failed += ts.failed; } total -= skipped; @@ -1050,7 +1415,7 @@ gettimeofday(&end, NULL); getrusage(RUSAGE_CHILDREN, &stats); - /* Print out our final results. */ + /* Summarize the failures and free the failure list. */ if (failhead != NULL) { test_fail_summary(failhead); while (failhead != NULL) { @@ -1059,6 +1424,16 @@ failhead = next; } } + + /* Free the memory used by the test lists. */ + while (tests != NULL) { + next = tests->next; + free_testset(tests->ts); + free(tests); + tests = next; + } + + /* Print out the final test summary. */ putchar('\n'); if (aborted != 0) { if (aborted == 1) @@ -1079,7 +1454,7 @@ printf(", %lu tests skipped", skipped); } puts("."); - printf("Files=%u, Tests=%lu", line, total); + 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), @@ -1095,12 +1470,11 @@ static void test_single(const char *program, const char *source, const char *build) { - struct testset ts; + char *path; - memset(&ts, 0, sizeof(ts)); - find_test(program, &ts, source, build); - if (execl(ts.path, ts.path, (char *) 0) == -1) - sysdie("cannot exec %s", ts.path); + path = find_test(program, source, build); + if (execl(path, path, (char *) 0) == -1) + sysdie("cannot exec %s", path); } @@ -1112,20 +1486,29 @@ main(int argc, char *argv[]) { int option; + int status = 0; int single = 0; - char *setting; - const char *list; + enum test_verbose verbose = CONCISE; + char *source_env = NULL; + char *build_env = NULL; + const char *program; + const char *shortlist; + const char *list = NULL; const char *source = SOURCE; const char *build = BUILD; + struct testlist *tests; - while ((option = getopt(argc, argv, "b:hos:")) != EOF) { + program = argv[0]; + while ((option = getopt(argc, argv, "b:hl:os:v")) != EOF) { switch (option) { case 'b': build = optarg; break; case 'h': - printf(usage_message, argv[0], argv[0]); + printf(usage_message, program, program, program, usage_extra); exit(0); + case 'l': + list = optarg; break; case 'o': single = 1; @@ -1133,40 +1516,64 @@ case 's': source = optarg; break; + case 'v': + verbose = VERBOSE; + break; default: exit(1); } } - if (argc - optind != 1) { - fprintf(stderr, usage_message, argv[0], argv[0]); + argv += optind; + argc -= optind; + if ((list == NULL && argc < 1) || (list != NULL && argc > 0)) { + fprintf(stderr, usage_message, program, program, program, usage_extra); exit(1); } - argc -= optind; - argv += optind; + /* + * If C_TAP_VERBOSE is set in the environment, that also turns on verbose + * mode. + */ + if (getenv("C_TAP_VERBOSE") != NULL) + verbose = VERBOSE; + + /* Set SOURCE and BUILD environment variables. */ if (source != NULL) { - setting = xmalloc(strlen("SOURCE=") + strlen(source) + 1); - sprintf(setting, "SOURCE=%s", source); - if (putenv(setting) != 0) + source_env = concat("SOURCE=", source, (const char *) 0); + if (putenv(source_env) != 0) sysdie("cannot set SOURCE in the environment"); } if (build != NULL) { - setting = xmalloc(strlen("BUILD=") + strlen(build) + 1); - sprintf(setting, "BUILD=%s", build); - if (putenv(setting) != 0) + build_env = concat("BUILD=", build, (const char *) 0); + if (putenv(build_env) != 0) sysdie("cannot set BUILD in the environment"); } - if (single) { + /* Run the tests as instructed. */ + if (single) test_single(argv[0], source, build); - exit(0); - } else { - list = strrchr(argv[0], '/'); - if (list == NULL) - list = argv[0]; + else if (list != NULL) { + shortlist = strrchr(list, '/'); + if (shortlist == NULL) + shortlist = list; else - list++; - printf(banner, list); - exit(test_batch(argv[0], source, build) ? 0 : 1); + shortlist++; + printf(banner, shortlist); + tests = read_test_list(list); + status = test_batch(tests, source, build, verbose) ? 0 : 1; + } else { + tests = build_test_list(argv, argc); + status = test_batch(tests, source, build, verbose) ? 0 : 1; + } + + /* For valgrind cleanliness, free all our memory. */ + if (source_env != NULL) { + putenv((char *) "SOURCE="); + free(source_env); + } + if (build_env != NULL) { + putenv((char *) "BUILD="); + free(build_env); } + exit(status); } diff -Nru libpam-afs-session-2.5/tests/tap/basic.c libpam-afs-session-2.6/tests/tap/basic.c --- libpam-afs-session-2.5/tests/tap/basic.c 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/basic.c 2015-09-19 18:25:37.000000000 +0000 @@ -6,14 +6,15 @@ * number and some number of appropriate arguments, check to be sure the * results match the expected output using the arguments, and print out * something appropriate for that test number. Other utility routines help in - * constructing more complex tests, skipping tests, or setting up the TAP - * output format. + * constructing more complex tests, skipping tests, reporting errors, setting + * up the TAP output format, or finding things in the test environment. * * This file is part of C TAP Harness. The current version plus supporting * documentation is at . * - * Copyright 2009, 2010 Russ Allbery - * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 2008 + * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 + * Russ Allbery + * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2011, 2012, 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,27 +36,31 @@ * DEALINGS IN THE SOFTWARE. */ -/* Required for isnan() and isinf(). */ -#ifndef _XOPEN_SOURCE -# define _XOPEN_SOURCE 600 -#endif - #include -#include +#include #include #include #include #include +#ifdef _WIN32 +# include +#else +# include +#endif #include -#include -#include #include -#include +#include + +/* Windows provides mkdir and rmdir under different names. */ +#ifdef _WIN32 +# define mkdir(p, m) _mkdir(p) +# define rmdir(p) _rmdir(p) +#endif /* * The test count. Always contains the number that will be used for the next - * test status. + * test status. This is exported to callers of the library. */ unsigned long testnum = 1; @@ -63,70 +68,299 @@ * Status information stored so that we can give a test summary at the end of * the test case. We store the planned final test and the count of failures. * We can get the highest test count from testnum. - * - * We also store the PID of the process that called plan() and only summarize - * results when that process exits, so as to not misreport results in forked - * processes. - * - * If _lazy is true, we're doing lazy planning and will print out the plan - * based on the last test number at the end of testing. */ static unsigned long _planned = 0; static unsigned long _failed = 0; + +/* + * Store the PID of the process that called plan() and only summarize + * results when that process exits, so as to not misreport results in forked + * processes. + */ static pid_t _process = 0; + +/* + * If true, we're doing lazy planning and will print out the plan based on the + * last test number at the end of testing. + */ static int _lazy = 0; +/* + * If true, the test was aborted by calling bail(). Currently, this is only + * used to ensure that we pass a false value to any cleanup functions even if + * all tests to that point have passed. + */ +static int _aborted = 0; + +/* + * Registered cleanup functions. These are stored as a linked list and run in + * registered order by finish when the test program exits. Each function is + * passed a boolean value indicating whether all tests were successful. + */ +struct cleanup_func { + test_cleanup_func func; + struct cleanup_func *next; +}; +static struct cleanup_func *cleanup_funcs = NULL; + +/* + * Registered diag files. Any output found in these files will be printed out + * as if it were passed to diag() before any other output we do. This allows + * background processes to log to a file and have that output interleaved with + * the test output. + */ +struct diag_file { + char *name; + FILE *file; + char *buffer; + size_t bufsize; + struct diag_file *next; +}; +static struct diag_file *diag_files = NULL; + +/* + * Print a specified prefix and then the test description. Handles turning + * the argument list into a va_args structure suitable for passing to + * 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); \ + } \ + } while (0) + + +/* + * Form a new string by concatenating multiple strings. The arguments must be + * terminated by (const char *) 0. + * + * This function only exists because we can't assume asprintf. We can't + * simulate asprintf with snprintf because we're only assuming SUSv3, which + * does not require that snprintf with a NULL buffer return the required + * length. When those constraints are relaxed, this should be ripped out and + * replaced with asprintf or a more trivial replacement with snprintf. + */ +static char * +concat(const char *first, ...) +{ + va_list args; + char *result; + const char *string; + size_t offset; + size_t length = 0; + + /* + * Find the total memory required. Ensure we don't overflow length. See + * the comment for breallocarray for why we're using UINT_MAX here. + */ + va_start(args, first); + for (string = first; string != NULL; string = va_arg(args, const char *)) { + if (length >= UINT_MAX - strlen(string)) + bail("strings too long in concat"); + length += strlen(string); + } + va_end(args); + length++; + + /* Create the string. */ + result = bmalloc(length); + va_start(args, first); + offset = 0; + for (string = first; string != NULL; string = va_arg(args, const char *)) { + memcpy(result + offset, string, strlen(string)); + offset += strlen(string); + } + va_end(args); + result[offset] = '\0'; + return result; +} + + +/* + * 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. + */ +static void +check_diag_files(void) +{ + struct diag_file *file; + fpos_t where; + size_t length; + int size, 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. + */ + for (file = diag_files; file != NULL; file = file->next) { + clearerr(file->file); + + /* Store the current position in case we have to rewind. */ + if (fgetpos(file->file, &where) < 0) + sysbail("cannot get position in %s", file->name); + + /* 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); + } + } +} + /* * Our exit handler. Called on completion of the test to report a summary of - * results provided we're still in the original process. + * results provided we're still in the original process. This also handles + * printing out the plan if we used plan_lazy(), although that's suppressed if + * we never ran a test (due to an early bail, for example), and running any + * registered cleanup functions. */ static void finish(void) { + int success, primary; + struct cleanup_func *current; unsigned long highest = testnum - 1; + struct diag_file *file, *tmp; + + /* Check for pending diag_file output. */ + check_diag_files(); + + /* Free the diag_files. */ + file = diag_files; + while (file != NULL) { + tmp = file; + file = file->next; + fclose(tmp->file); + free(tmp->name); + free(tmp->buffer); + free(tmp); + } + diag_files = NULL; + + /* + * Determine whether all tests were successful, which is needed before + * calling cleanup functions since we pass that fact to the functions. + */ + if (_planned == 0 && _lazy) + _planned = highest; + success = (!_aborted && _planned == highest && _failed == 0); + + /* + * If there are any registered cleanup functions, we run those first. We + * always run them, even if we didn't run a test. Don't do anything + * except free the diag_files and call cleanup functions if we aren't the + * primary process (the process in which plan or plan_lazy was called), + * and tell the cleanup functions that fact. + */ + primary = (_process == 0 || getpid() == _process); + while (cleanup_funcs != NULL) { + cleanup_funcs->func(success, primary); + current = cleanup_funcs; + cleanup_funcs = cleanup_funcs->next; + free(current); + } + if (!primary) + return; - if (_planned == 0 && !_lazy) + /* Don't do anything further if we never planned a test. */ + if (_planned == 0) return; + + /* If we're aborting due to bail, don't print summaries. */ + if (_aborted) + return; + + /* Print out the lazy plan if needed. */ fflush(stderr); - if (_process != 0 && getpid() == _process) { - if (_lazy) { - printf("1..%lu\n", highest); - _planned = highest; - } - if (_planned > highest) - printf("# Looks like you planned %lu test%s but only ran %lu\n", - _planned, (_planned > 1 ? "s" : ""), highest); - else if (_planned < highest) - printf("# Looks like you planned %lu test%s but ran %lu extra\n", - _planned, (_planned > 1 ? "s" : ""), highest - _planned); - else if (_failed > 0) - printf("# Looks like you failed %lu test%s of %lu\n", _failed, - (_failed > 1 ? "s" : ""), _planned); - else if (_planned > 1) - printf("# All %lu tests successful or skipped\n", _planned); - else - printf("# %lu test successful or skipped\n", _planned); - } + if (_lazy && _planned > 0) + printf("1..%lu\n", _planned); + + /* Print out a summary of the results. */ + if (_planned > highest) + diag("Looks like you planned %lu test%s but only ran %lu", _planned, + (_planned > 1 ? "s" : ""), highest); + else if (_planned < highest) + diag("Looks like you planned %lu test%s but ran %lu extra", _planned, + (_planned > 1 ? "s" : ""), highest - _planned); + else if (_failed > 0) + diag("Looks like you failed %lu test%s of %lu", _failed, + (_failed > 1 ? "s" : ""), _planned); + else if (_planned != 1) + diag("All %lu tests successful or skipped", _planned); + else + diag("%lu test successful or skipped", _planned); } /* * Initialize things. Turns on line buffering on stdout and then prints out - * the number of tests in the test suite. + * the number of tests in the test suite. We intentionally don't check for + * pending diag_file output here, since it should really come after the plan. */ void plan(unsigned long count) { if (setvbuf(stdout, NULL, _IOLBF, BUFSIZ) != 0) - fprintf(stderr, "# cannot set stdout to line buffered: %s\n", - strerror(errno)); + sysdiag("cannot set stdout to line buffered"); fflush(stderr); printf("1..%lu\n", count); testnum = 1; _planned = count; _process = getpid(); - atexit(finish); + if (atexit(finish) != 0) { + sysdiag("cannot register exit handler"); + diag("cleanups will not be run"); + } } @@ -138,83 +372,66 @@ plan_lazy(void) { if (setvbuf(stdout, NULL, _IOLBF, BUFSIZ) != 0) - fprintf(stderr, "# cannot set stdout to line buffered: %s\n", - strerror(errno)); + sysdiag("cannot set stdout to line buffered"); testnum = 1; _process = getpid(); _lazy = 1; - atexit(finish); + if (atexit(finish) != 0) + sysbail("cannot register exit handler to display plan"); } /* * Skip the entire test suite and exits. Should be called instead of plan(), - * not after it, since it prints out a special plan line. + * not after it, since it prints out a special plan line. Ignore diag_file + * output here, since it's not clear if it's allowed before the plan. */ void skip_all(const char *format, ...) { fflush(stderr); printf("1..0 # skip"); - if (format != NULL) { - va_list args; - - putchar(' '); - va_start(args, format); - vprintf(format, args); - va_end(args); - } + PRINT_DESC(" ", format); putchar('\n'); exit(0); } /* - * Print the test description. - */ -static void -print_desc(const char *format, va_list args) -{ - printf(" - "); - vprintf(format, args); -} - - -/* * Takes a boolean success value and assumes the test passes if that value * is true and fails if that value is false. */ -void +int ok(int success, const char *format, ...) { fflush(stderr); + check_diag_files(); printf("%sok %lu", success ? "" : "not ", testnum++); if (!success) _failed++; - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } + PRINT_DESC(" - ", format); putchar('\n'); + return success; } /* * Same as ok(), but takes the format arguments as a va_list. */ -void +int okv(int success, const char *format, va_list args) { fflush(stderr); + check_diag_files(); printf("%sok %lu", success ? "" : "not ", testnum++); if (!success) _failed++; - if (format != NULL) - print_desc(format, args); + if (format != NULL) { + printf(" - "); + vprintf(format, args); + } putchar('\n'); + return success; } @@ -225,15 +442,9 @@ skip(const char *reason, ...) { fflush(stderr); + check_diag_files(); printf("ok %lu # skip", testnum++); - if (reason != NULL) { - va_list args; - - va_start(args, reason); - putchar(' '); - vprintf(reason, args); - va_end(args); - } + PRINT_DESC(" ", reason); putchar('\n'); } @@ -241,25 +452,21 @@ /* * Report the same status on the next count tests. */ -void -ok_block(unsigned long count, int status, const char *format, ...) +int +ok_block(unsigned long count, int success, const char *format, ...) { unsigned long i; fflush(stderr); + check_diag_files(); for (i = 0; i < count; i++) { - printf("%sok %lu", status ? "" : "not ", testnum++); - if (!status) + printf("%sok %lu", success ? "" : "not ", testnum++); + if (!success) _failed++; - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } + PRINT_DESC(" - ", format); putchar('\n'); } + return success; } @@ -272,16 +479,10 @@ unsigned long i; fflush(stderr); + check_diag_files(); for (i = 0; i < count; i++) { printf("ok %lu # skip", testnum++); - if (reason != NULL) { - va_list args; - - va_start(args, reason); - putchar(' '); - vprintf(reason, args); - va_end(args); - } + PRINT_DESC(" ", reason); putchar('\n'); } } @@ -291,25 +492,25 @@ * Takes an expected integer and a seen integer and assumes the test passes * if those two numbers match. */ -void +int is_int(long wanted, long seen, const char *format, ...) { + int success; + fflush(stderr); - if (wanted == seen) + check_diag_files(); + success = (wanted == seen); + if (success) printf("ok %lu", testnum++); else { - printf("# wanted: %ld\n# seen: %ld\n", wanted, seen); + diag("wanted: %ld", wanted); + diag(" seen: %ld", seen); printf("not ok %lu", testnum++); _failed++; } - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } + PRINT_DESC(" - ", format); putchar('\n'); + return success; } @@ -317,57 +518,29 @@ * Takes a string and what the string should be, and assumes the test passes * if those strings match (using strcmp). */ -void +int is_string(const char *wanted, const char *seen, const char *format, ...) { + int success; + if (wanted == NULL) wanted = "(null)"; if (seen == NULL) seen = "(null)"; fflush(stderr); - if (strcmp(wanted, seen) == 0) + check_diag_files(); + success = (strcmp(wanted, seen) == 0); + if (success) printf("ok %lu", testnum++); else { - printf("# wanted: %s\n# seen: %s\n", wanted, seen); + diag("wanted: %s", wanted); + diag(" seen: %s", seen); printf("not ok %lu", testnum++); _failed++; } - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } - putchar('\n'); -} - - -/* - * Takes an expected double and a seen double and assumes the test passes if - * those two numbers are within delta of each other. - */ -void -is_double(double wanted, double seen, double epsilon, const char *format, ...) -{ - fflush(stderr); - if ((isnan(wanted) && isnan(seen)) - || (isinf(wanted) && isinf(seen) && wanted == seen) - || fabs(wanted - seen) <= epsilon) - printf("ok %lu", testnum++); - else { - printf("# wanted: %g\n# seen: %g\n", wanted, seen); - printf("not ok %lu", testnum++); - _failed++; - } - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } + PRINT_DESC(" - ", format); putchar('\n'); + return success; } @@ -375,26 +548,25 @@ * 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. */ -void +int is_hex(unsigned long wanted, unsigned long seen, const char *format, ...) { + int success; + fflush(stderr); - if (wanted == seen) + check_diag_files(); + success = (wanted == seen); + if (success) printf("ok %lu", testnum++); else { - printf("# wanted: %lx\n# seen: %lx\n", (unsigned long) wanted, - (unsigned long) seen); + diag("wanted: %lx", (unsigned long) wanted); + diag(" seen: %lx", (unsigned long) seen); printf("not ok %lu", testnum++); _failed++; } - if (format != NULL) { - va_list args; - - va_start(args, format); - print_desc(format, args); - va_end(args); - } + PRINT_DESC(" - ", format); putchar('\n'); + return success; } @@ -406,14 +578,16 @@ { va_list args; + _aborted = 1; fflush(stderr); + check_diag_files(); fflush(stdout); printf("Bail out! "); va_start(args, format); vprintf(format, args); va_end(args); printf("\n"); - exit(1); + exit(255); } @@ -426,51 +600,222 @@ va_list args; int oerrno = errno; + _aborted = 1; fflush(stderr); + check_diag_files(); fflush(stdout); printf("Bail out! "); va_start(args, format); vprintf(format, args); va_end(args); printf(": %s\n", strerror(oerrno)); - exit(1); + exit(255); } /* - * Report a diagnostic to stderr. + * Report a diagnostic to stderr. Always returns 1 to allow embedding in + * compound statements. */ -void +int diag(const char *format, ...) { va_list args; fflush(stderr); + check_diag_files(); fflush(stdout); printf("# "); va_start(args, format); vprintf(format, args); va_end(args); printf("\n"); + return 1; } /* - * Report a diagnostic to stderr, appending strerror(errno). + * Report a diagnostic to stderr, appending strerror(errno). Always returns 1 + * to allow embedding in compound statements. */ -void +int sysdiag(const char *format, ...) { va_list args; int oerrno = errno; fflush(stderr); + check_diag_files(); fflush(stdout); printf("# "); va_start(args, format); vprintf(format, args); va_end(args); printf(": %s\n", strerror(oerrno)); + return 1; +} + + +/* + * Register a new file for diag_file processing. + */ +void +diag_file_add(const char *name) +{ + struct diag_file *file, *prev; + + file = bcalloc(1, sizeof(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->bufsize = BUFSIZ; + if (diag_files == NULL) + diag_files = file; + else { + for (prev = diag_files; prev->next != NULL; prev = prev->next) + ; + prev->next = file; + } +} + + +/* + * Remove a file from diag_file processing. If the file is not found, do + * nothing, since there are some situations where it can be removed twice + * (such as if it's removed from a cleanup function, since cleanup functions + * are called after freeing all the diag_files). + */ +void +diag_file_remove(const char *name) +{ + struct diag_file *file; + struct diag_file **prev = &diag_files; + + for (file = diag_files; file != NULL; file = file->next) { + if (strcmp(file->name, name) == 0) { + *prev = file->next; + fclose(file->file); + free(file->name); + free(file->buffer); + free(file); + return; + } + prev = &file->next; + } +} + + +/* + * Allocate cleared memory, reporting a fatal error with bail on failure. + */ +void * +bcalloc(size_t n, size_t size) +{ + void *p; + + p = calloc(n, size); + if (p == NULL) + sysbail("failed to calloc %lu", (unsigned long)(n * size)); + return p; +} + + +/* + * Allocate memory, reporting a fatal error with bail on failure. + */ +void * +bmalloc(size_t size) +{ + void *p; + + p = malloc(size); + if (p == NULL) + sysbail("failed to malloc %lu", (unsigned long) size); + return p; +} + + +/* + * Reallocate memory, reporting a fatal error with bail on failure. + */ +void * +brealloc(void *p, size_t size) +{ + p = realloc(p, size); + if (p == NULL) + sysbail("failed to realloc %lu bytes", (unsigned long) size); + return p; +} + + +/* + * The same as brealloc, but determine the size by multiplying an element + * count by a size, similar to calloc. The multiplication is checked for + * integer overflow. + * + * We should technically use SIZE_MAX here for the overflow check, but + * SIZE_MAX is C99 and we're only assuming C89 + SUSv3, which does not + * guarantee that it exists. They do guarantee that UINT_MAX exists, and we + * can assume that UINT_MAX <= SIZE_MAX. + * + * (In theory, C89 and C99 permit size_t to be smaller than unsigned int, but + * I disbelieve in the existence of such systems and they will have to cope + * without overflow checks.) + */ +void * +breallocarray(void *p, size_t n, size_t size) +{ + if (n > 0 && UINT_MAX / n <= size) + bail("reallocarray too large"); + p = realloc(p, n * size); + if (p == NULL) + sysbail("failed to realloc %lu bytes", (unsigned long) (n * size)); + return p; +} + + +/* + * Copy a string, reporting a fatal error with bail on failure. + */ +char * +bstrdup(const char *s) +{ + char *p; + size_t len; + + len = strlen(s) + 1; + p = malloc(len); + if (p == NULL) + sysbail("failed to strdup %lu bytes", (unsigned long) len); + memcpy(p, s, len); + return p; +} + + +/* + * Copy up to n characters of a string, reporting a fatal error with bail on + * failure. Don't use the system strndup function, since it may not exist and + * the TAP library doesn't assume any portability support. + */ +char * +bstrndup(const char *s, size_t n) +{ + const char *p; + char *copy; + size_t length; + + /* Don't assume that the source string is nul-terminated. */ + for (p = s; (size_t) (p - s) < n && *p != '\0'; p++) + ; + length = (size_t) (p - s); + copy = malloc(length + 1); + if (p == NULL) + sysbail("failed to strndup %lu bytes", (unsigned long) length); + memcpy(copy, s, length); + copy[length] = '\0'; + return copy; } @@ -479,17 +824,12 @@ * then SOURCE for the file and return the full path to the file. Returns * NULL if the file doesn't exist. A non-NULL return should be freed with * test_file_path_free(). - * - * This function uses sprintf because it attempts to be independent of all - * other portability layers. The use immediately after a memory allocation - * should be safe without using snprintf or strlcpy/strlcat. */ char * test_file_path(const char *file) { char *base; char *path = NULL; - size_t length; const char *envs[] = { "BUILD", "SOURCE", NULL }; int i; @@ -497,11 +837,7 @@ base = getenv(envs[i]); if (base == NULL) continue; - length = strlen(base) + 1 + strlen(file) + 1; - path = malloc(length); - if (path == NULL) - sysbail("cannot allocate memory"); - sprintf(path, "%s/%s", base, file); + path = concat(base, "/", file, (const char *) 0); if (access(path, R_OK) == 0) break; free(path); @@ -519,6 +855,65 @@ void test_file_path_free(char *path) { + free(path); +} + + +/* + * Create a temporary directory, tmp, under BUILD if set and the current + * directory if it does not. Returns the path to the temporary directory in + * newly allocated memory, and calls bail on any failure. The return value + * should be freed with test_tmpdir_free. + * + * This function uses sprintf because it attempts to be independent of all + * other portability layers. The use immediately after a memory allocation + * should be safe without using snprintf or strlcpy/strlcat. + */ +char * +test_tmpdir(void) +{ + const char *build; + char *path = NULL; + + build = getenv("BUILD"); + if (build == NULL) + build = "."; + path = concat(build, "/tmp", (const char *) 0); + if (access(path, X_OK) < 0) + if (mkdir(path, 0777) < 0) + sysbail("error creating temporary directory %s", path); + return path; +} + + +/* + * Free a path returned from test_tmpdir() and attempt to remove the + * directory. If we can't delete the directory, don't worry; something else + * that hasn't yet cleaned up may still be using it. + */ +void +test_tmpdir_free(char *path) +{ if (path != NULL) - free(path); + rmdir(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) +{ + struct cleanup_func *cleanup, **last; + + cleanup = bmalloc(sizeof(struct cleanup_func)); + cleanup->func = func; + cleanup->next = NULL; + last = &cleanup_funcs; + while (*last != NULL) + last = &(*last)->next; + *last = cleanup; } diff -Nru libpam-afs-session-2.5/tests/tap/basic.h libpam-afs-session-2.6/tests/tap/basic.h --- libpam-afs-session-2.5/tests/tap/basic.h 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/basic.h 2015-09-19 18:25:37.000000000 +0000 @@ -4,8 +4,9 @@ * This file is part of C TAP Harness. The current version plus supporting * documentation is at . * - * Copyright 2009, 2010 Russ Allbery - * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 2008 + * Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 + * Russ Allbery + * Copyright 2001, 2002, 2004, 2005, 2006, 2007, 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 @@ -30,33 +31,9 @@ #ifndef TAP_BASIC_H #define TAP_BASIC_H 1 +#include #include /* va_list */ -#include /* pid_t */ - -/* - * __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 - -/* - * BEGIN_DECLS is used at the beginning of declarations so that C++ - * compilers don't mangle their names. END_DECLS is used at the end. - */ -#undef BEGIN_DECLS -#undef END_DECLS -#ifdef __cplusplus -# define BEGIN_DECLS extern "C" { -# define END_DECLS } -#else -# define BEGIN_DECLS /* empty */ -# define END_DECLS /* empty */ -#endif +#include /* size_t */ /* * Used for iterating through arrays. ARRAY_SIZE returns the number of @@ -79,7 +56,7 @@ void plan(unsigned long count); /* - * Prepare for lazy planning, in which the plan will be printed automatically + * Prepare for lazy planning, in which the plan will be printed automatically * at the end of the test program. */ void plan_lazy(void); @@ -91,29 +68,34 @@ /* * Basic reporting functions. The okv() function is the same as ok() but * takes the test description as a va_list to make it easier to reuse the - * reporting infrastructure when writing new tests. + * reporting infrastructure when writing new tests. ok() and okv() return the + * value of the success argument. */ -void ok(int success, const char *format, ...) +int ok(int success, const char *format, ...) __attribute__((__format__(printf, 2, 3))); -void okv(int success, const char *format, va_list args); +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))); -/* Report the same status on, or skip, the next count tests. */ -void ok_block(unsigned long count, int success, const char *format, ...) +/* + * Report the same status on, or skip, the next count tests. ok_block() + * returns the value of the success argument. + */ +int ok_block(unsigned long count, int success, const char *format, ...) __attribute__((__format__(printf, 3, 4))); void skip_block(unsigned long count, const char *reason, ...) __attribute__((__format__(printf, 2, 3))); -/* Check an expected value against a seen value. */ -void is_int(long wanted, long seen, const char *format, ...) +/* + * Check an expected value against a seen value. Returns true if the test + * passes and false if it fails. + */ +int is_int(long wanted, long seen, const char *format, ...) __attribute__((__format__(printf, 3, 4))); -void is_double(double wanted, double seen, double epsilon, - const char *format, ...) - __attribute__((__format__(printf, 4, 5))); -void is_string(const char *wanted, const char *seen, const char *format, ...) +int is_string(const char *wanted, const char *seen, const char *format, ...) __attribute__((__format__(printf, 3, 4))); -void is_hex(unsigned long wanted, unsigned long seen, const char *format, ...) +int is_hex(unsigned long wanted, unsigned long seen, const char *format, ...) __attribute__((__format__(printf, 3, 4))); /* Bail out with an error. sysbail appends strerror(errno). */ @@ -123,19 +105,67 @@ __attribute__((__noreturn__, __nonnull__, __format__(printf, 1, 2))); /* Report a diagnostic to stderr prefixed with #. */ -void diag(const char *format, ...) +int diag(const char *format, ...) __attribute__((__nonnull__, __format__(printf, 1, 2))); -void sysdiag(const char *format, ...) +int sysdiag(const char *format, ...) __attribute__((__nonnull__, __format__(printf, 1, 2))); /* + * Register or unregister a file that contains supplementary diagnostics. + * Before any other output, all registered files will be read, line by line, + * and each line will be reported as a diagnostic as if it were passed to + * 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__)); + +/* Allocate memory, reporting a fatal error with bail on failure. */ +void *bcalloc(size_t, size_t) + __attribute__((__alloc_size__(1, 2), __malloc__, __warn_unused_result__)); +void *bmalloc(size_t) + __attribute__((__alloc_size__(1), __malloc__, __warn_unused_result__)); +void *breallocarray(void *, size_t, size_t) + __attribute__((__alloc_size__(2, 3), __malloc__, __warn_unused_result__)); +void *brealloc(void *, size_t) + __attribute__((__alloc_size__(2), __malloc__, __warn_unused_result__)); +char *bstrdup(const char *) + __attribute__((__malloc__, __nonnull__, __warn_unused_result__)); +char *bstrndup(const char *, size_t) + __attribute__((__malloc__, __nonnull__, __warn_unused_result__)); + +/* * Find a test file under BUILD or SOURCE, returning the full path. The * returned path should be freed with test_file_path_free(). */ char *test_file_path(const char *file) - __attribute__((__malloc__, __nonnull__)); + __attribute__((__malloc__, __nonnull__, __warn_unused_result__)); void test_file_path_free(char *path); +/* + * Create a temporary directory relative to BUILD and return the path. The + * returned path should be freed with test_tmpdir_free. + */ +char *test_tmpdir(void) + __attribute__((__malloc__, __warn_unused_result__)); +void test_tmpdir_free(char *path); + +/* + * Register a cleanup function that is called when testing ends. All such + * registered functions will be run during atexit handling (and are therefore + * subject to all the same constraints and caveats as atexit functions). + * + * 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. + */ +typedef void (*test_cleanup_func)(int, int); +void test_cleanup_register(test_cleanup_func) + __attribute__((__nonnull__)); + END_DECLS #endif /* TAP_BASIC_H */ diff -Nru libpam-afs-session-2.5/tests/tap/libtap.sh libpam-afs-session-2.6/tests/tap/libtap.sh --- libpam-afs-session-2.5/tests/tap/libtap.sh 2011-07-26 00:52:38.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/libtap.sh 2015-09-19 18:25:37.000000000 +0000 @@ -1,12 +1,17 @@ # Shell function library for test cases. # +# Note that while many of the functions in this library could benefit from +# using "local" to avoid possibly hammering global variables, Solaris /bin/sh +# doesn't support local and this library aspires to be portable to Solaris +# Bourne shell. Instead, all private variables are prefixed with "tap_". +# # This file provides a TAP-compatible shell function library useful for # writing test cases. It is part of C TAP Harness, which can be found at # . # -# Written by Russ Allbery -# Copyright 2009, 2010 Russ Allbery -# Copyright 2006, 2007, 2008 +# Written by Russ Allbery +# Copyright 2009, 2010, 2011, 2012 Russ Allbery +# Copyright 2006, 2007, 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 @@ -46,33 +51,35 @@ # Report the test status on exit. finish () { - local highest looks - highest=`expr "$count" - 1` + tap_highest=`expr "$count" - 1` if [ "$planned" = 0 ] ; then - echo "1..$highest" - planned="$highest" + echo "1..$tap_highest" + planned="$tap_highest" fi - looks='# Looks like you' + tap_looks='# Looks like you' if [ "$planned" -gt 0 ] ; then - if [ "$planned" -gt "$highest" ] ; then + if [ "$planned" -gt "$tap_highest" ] ; then if [ "$planned" -gt 1 ] ; then - echo "$looks planned $planned tests but only ran $highest" + echo "$tap_looks planned $planned tests but only ran" \ + "$tap_highest" else - echo "$looks planned $planned test but only ran $highest" + echo "$tap_looks planned $planned test but only ran" \ + "$tap_highest" fi - elif [ "$planned" -lt "$highest" ] ; then - local extra - extra=`expr "$highest" - "$planned"` + elif [ "$planned" -lt "$tap_highest" ] ; then + tap_extra=`expr "$tap_highest" - "$planned"` if [ "$planned" -gt 1 ] ; then - echo "$looks planned $planned tests but ran $extra extra" + echo "$tap_looks planned $planned tests but ran" \ + "$tap_extra extra" else - echo "$looks planned $planned test but ran $extra extra" + echo "$tap_looks planned $planned test but ran" \ + "$tap_extra extra" fi elif [ "$failed" -gt 0 ] ; then if [ "$failed" -gt 1 ] ; then - echo "$looks failed $failed tests of $planned" + echo "$tap_looks failed $failed tests of $planned" else - echo "$looks failed $failed test of $planned" + echo "$tap_looks failed $failed test of $planned" fi elif [ "$planned" -gt 1 ] ; then echo "# All $planned tests successful or skipped" @@ -84,10 +91,9 @@ # Skip the entire test suite. Should be run instead of plan. skip_all () { - local desc - desc="$1" - if [ -n "$desc" ] ; then - echo "1..0 # skip $desc" + tap_desc="$1" + if [ -n "$tap_desc" ] ; then + echo "1..0 # skip $tap_desc" else echo "1..0 # skip" fi @@ -98,16 +104,15 @@ # command is successful, false otherwise. The count starts at 1 and is # updated each time ok is printed. ok () { - local desc - desc="$1" - if [ -n "$desc" ] ; then - desc=" - $desc" + tap_desc="$1" + if [ -n "$tap_desc" ] ; then + tap_desc=" - $tap_desc" fi shift if "$@" ; then - echo ok $count$desc + echo ok "$count$tap_desc" else - echo not ok $count$desc + echo not ok "$count$tap_desc" failed=`expr $failed + 1` fi count=`expr $count + 1` @@ -122,34 +127,34 @@ # Report the same status on a whole set of tests. Takes the count of tests, # the description, and then the command to run to determine the status. ok_block () { - local end i desc - i=$count - end=`expr $count + $1` - shift - desc="$1" - shift - while [ "$i" -lt "$end" ] ; do - ok "$desc" "$@" - i=`expr $i + 1` + tap_i=$count + tap_end=`expr $count + $1` + shift + while [ "$tap_i" -lt "$tap_end" ] ; do + ok "$@" + tap_i=`expr $tap_i + 1` done } # Skip a whole set of tests. Takes the count and then the reason for skipping # the test. skip_block () { - local i end - i=$count - end=`expr $count + $1` + tap_i=$count + tap_end=`expr $count + $1` shift - while [ "$i" -lt "$end" ] ; do + while [ "$tap_i" -lt "$tap_end" ] ; do skip "$@" - i=`expr $i + 1` + tap_i=`expr $tap_i + 1` done } # Portable variant of printf '%s\n' "$*". In the majority of cases, this # function is slower than printf, because the latter is often implemented # as a builtin command. The value of the variable IFS is ignored. +# +# This macro must not be called via backticks inside double quotes, since this +# will result in bizarre escaping behavior and lots of extra backslashes on +# Solaris. puts () { cat << EOH $@ @@ -165,21 +170,21 @@ # If the command may contain system-specific error messages in its output, # add strip_colon_error before the command to post-process its output. ok_program () { - local desc w_status w_output output status - desc="$1" + tap_desc="$1" shift - w_status="$1" + tap_w_status="$1" shift - w_output="$1" + tap_w_output="$1" shift - output=`"$@" 2>&1` - status=$? - if [ $status = $w_status ] && [ x"$output" = x"$w_output" ] ; then - ok "$desc" true + tap_output=`"$@" 2>&1` + tap_status=$? + if [ $tap_status = $tap_w_status ] \ + && [ x"$tap_output" = x"$tap_w_output" ] ; then + ok "$tap_desc" true else - echo "# saw: ($status) $output" - echo "# not: ($w_status) $w_output" - ok "$desc" false + echo "# saw: ($tap_status) $tap_output" + echo "# not: ($tap_w_status) $tap_w_output" + ok "$tap_desc" false fi } @@ -189,18 +194,17 @@ # message.) This is used to remove system-specific error messages (coming # from strerror, for example). strip_colon_error() { - local output status - output=`"$@" 2>&1` - status=$? - output=`puts "$output" | sed 's/^\([^ ]* [^:]*\):.*/\1/'` - puts "$output" - return $status + tap_output=`"$@" 2>&1` + tap_status=$? + tap_output=`puts "$tap_output" | sed 's/^\([^ ]* [^:]*\):.*/\1/'` + puts "$tap_output" + return $tap_status } # Bail out with an error message. bail () { echo 'Bail out!' "$@" - exit 1 + exit 255 } # Output a diagnostic on standard error, preceded by the required # mark. @@ -211,6 +215,9 @@ # Search for the given file first in $BUILD and then in $SOURCE and echo the # path where the file was found, or the empty string if the file wasn't # found. +# +# This macro uses puts, so don't run it using backticks inside double quotes +# or bizarre quoting behavior will happen with Solaris sh. test_file_path () { if [ -n "$BUILD" ] && [ -f "$BUILD/$1" ] ; then puts "$BUILD/$1" @@ -220,3 +227,20 @@ echo '' fi } + +# Create $BUILD/tmp for use by tests for storing temporary files and return +# the path (via standard output). +# +# This macro uses puts, so don't run it using backticks inside double quotes +# or bizarre quoting behavior will happen with Solaris sh. +test_tmpdir () { + if [ -z "$BUILD" ] ; then + tap_tmpdir="./tmp" + else + tap_tmpdir="$BUILD"/tmp + fi + if [ ! -d "$tap_tmpdir" ] ; then + mkdir "$tap_tmpdir" || bail "Error creating $tap_tmpdir" + fi + puts "$tap_tmpdir" +} diff -Nru libpam-afs-session-2.5/tests/tap/macros.h libpam-afs-session-2.6/tests/tap/macros.h --- libpam-afs-session-2.5/tests/tap/macros.h 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/macros.h 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,97 @@ +/* + * Helpful macros for TAP header files. + * + * This is not, strictly speaking, related to TAP, but any TAP add-on is + * probably going to need these macros, so define them in one place so that + * everyone can pull them in. + * + * This file is part of C TAP Harness. The current version plus supporting + * documentation is at . + * + * Copyright 2008, 2012, 2013, 2015 Russ Allbery + * + * 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. + */ + +#ifndef TAP_MACROS_H +#define TAP_MACROS_H 1 + +/* + * __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), and only with gcc 2.96 can you use + * the attribute __malloc__. 2.96 is very old, so don't bother trying to get + * 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 +#endif + +/* + * We use __alloc_size__, but it was only available in fairly recent versions + * of GCC. Suppress warnings about the unknown attribute if GCC is too old. + * We know that we're GCC at this point, so we can use the GCC variadic macro + * extension, which will still work with versions of GCC too old to have C99 + * 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 +#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 +#endif + +/* + * LLVM and Clang pretend to be GCC but don't support all of the __attribute__ + * settings that GCC does. For them, suppress warnings about unknown + * attributes on declarations. This unfortunately will affect the entire + * compilation context, but there's no push and pop available. + */ +#if !defined(__attribute__) && (defined(__llvm__) || defined(__clang__)) +# pragma GCC diagnostic ignored "-Wattributes" +#endif + +/* Used for unused parameters to silence gcc warnings. */ +#define UNUSED __attribute__((__unused__)) + +/* + * BEGIN_DECLS is used at the beginning of declarations so that C++ + * compilers don't mangle their names. END_DECLS is used at the end. + */ +#undef BEGIN_DECLS +#undef END_DECLS +#ifdef __cplusplus +# define BEGIN_DECLS extern "C" { +# define END_DECLS } +#else +# define BEGIN_DECLS /* empty */ +# define END_DECLS /* empty */ +#endif + +#endif /* TAP_MACROS_H */ diff -Nru libpam-afs-session-2.5/tests/tap/perl/Test/RRA/Automake.pm libpam-afs-session-2.6/tests/tap/perl/Test/RRA/Automake.pm --- libpam-afs-session-2.5/tests/tap/perl/Test/RRA/Automake.pm 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/perl/Test/RRA/Automake.pm 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,406 @@ +# Helper functions for Perl test programs in Automake distributions. +# +# This module provides a collection of helper functions used by test programs +# written in Perl and included in C source distributions that use Automake. +# They embed knowledge of how I lay out my source trees and test suites with +# Autoconf and Automake. They may be usable by others, but doing so will +# require closely following the conventions implemented by the rra-c-util +# utility collection. +# +# All the functions here assume that BUILD and SOURCE are set in the +# environment. This is normally done via the C TAP Harness runtests wrapper. + +package Test::RRA::Automake; + +use 5.006; +use strict; +use warnings; + +# For Perl 5.006 compatibility. +## no critic (ClassHierarchies::ProhibitExplicitISA) + +use Exporter; +use File::Spec; +use Test::More; +use Test::RRA::Config qw($LIBRARY_PATH); + +# Used below for use lib calls. +my ($PERL_BLIB_ARCH, $PERL_BLIB_LIB); + +# Determine the path to the build tree of any embedded Perl module package in +# this source package. We do this in a BEGIN block because we're going to use +# the results in a use lib command below. +BEGIN { + $PERL_BLIB_ARCH = File::Spec->catdir(qw(perl blib arch)); + $PERL_BLIB_LIB = File::Spec->catdir(qw(perl blib lib)); + + # If BUILD is set, we can come up with better values. + if (defined($ENV{BUILD})) { + my ($vol, $dirs) = File::Spec->splitpath($ENV{BUILD}, 1); + my @dirs = File::Spec->splitdir($dirs); + pop(@dirs); + $PERL_BLIB_ARCH = File::Spec->catdir(@dirs, qw(perl blib arch)); + $PERL_BLIB_LIB = File::Spec->catdir(@dirs, qw(perl blib lib)); + } +} + +# Prefer the modules built as part of our source package. Otherwise, we may +# not find Perl modules while testing, or find the wrong versions. +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); + +# 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(automake_setup perl_dirs test_file_path test_tmpdir); + + # 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 = '5.09'; +} + +# Perl directories to skip globally for perl_dirs. We ignore the perl +# directory if it exists since, in my packages, it is treated as a Perl module +# distribution and has its own standalone test suite. +my @GLOBAL_SKIP = qw(.git perl); + +# 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 +# failure to do so). +my $TMPDIR; + +# Perform initial test setup for running a Perl test in an Automake package. +# This verifies that BUILD and SOURCE are set and then changes directory to +# the SOURCE directory by default. Sets LD_LIBRARY_PATH if the $LIBRARY_PATH +# configuration option is set. Calls BAIL_OUT if BUILD or SOURCE are missing +# or if anything else fails. +# +# $args_ref - Reference to a hash of arguments to configure behavior: +# chdir_build - If set to a true value, changes to BUILD instead of SOURCE +# +# Returns: undef +sub automake_setup { + my ($args_ref) = @_; + + # Bail if BUILD or SOURCE are not set. + if (!$ENV{BUILD}) { + BAIL_OUT('BUILD not defined (run under runtests)'); + } + if (!$ENV{SOURCE}) { + BAIL_OUT('SOURCE not defined (run under runtests)'); + } + + # BUILD or SOURCE will be the test directory. Change to the parent. + my $start = $args_ref->{chdir_build} ? $ENV{BUILD} : $ENV{SOURCE}; + my ($vol, $dirs) = File::Spec->splitpath($start, 1); + my @dirs = File::Spec->splitdir($dirs); + pop(@dirs); + + # Simplify relative paths at the end of the directory. + my $ups = 0; + my $i = $#dirs; + while ($i > 2 && $dirs[$i] eq File::Spec->updir) { + $ups++; + $i--; + } + for (1 .. $ups) { + pop(@dirs); + pop(@dirs); + } + my $root = File::Spec->catpath($vol, File::Spec->catdir(@dirs), q{}); + chdir($root) or BAIL_OUT("cannot chdir to $root: $!"); + + # If BUILD is a subdirectory of SOURCE, add it to the global ignore list. + my ($buildvol, $builddirs) = File::Spec->splitpath($ENV{BUILD}, 1); + my @builddirs = File::Spec->splitdir($builddirs); + pop(@builddirs); + if ($buildvol eq $vol && @builddirs == @dirs + 1) { + while (@dirs && $builddirs[0] eq $dirs[0]) { + shift(@builddirs); + shift(@dirs); + } + if (@builddirs == 1) { + push(@GLOBAL_SKIP, $builddirs[0]); + } + } + + # Set LD_LIBRARY_PATH if the $LIBRARY_PATH configuration option is set. + ## no critic (Variables::RequireLocalizedPunctuationVars) + if (defined($LIBRARY_PATH)) { + @builddirs = File::Spec->splitdir($builddirs); + pop(@builddirs); + my $libdir = File::Spec->catdir(@builddirs, $LIBRARY_PATH); + my $path = File::Spec->catpath($buildvol, $libdir, q{}); + if (-d "$path/.libs") { + $path .= '/.libs'; + } + if ($ENV{LD_LIBRARY_PATH}) { + $ENV{LD_LIBRARY_PATH} .= ":$path"; + } else { + $ENV{LD_LIBRARY_PATH} = $path; + } + } + return; +} + +# Returns a list of directories that may contain Perl scripts and that should +# be passed to Perl test infrastructure that expects a list of directories to +# recursively check. The list will be all eligible top-level directories in +# the package except for the tests directory, which is broken out to one +# additional level. Calls BAIL_OUT on any problems +# +# $args_ref - Reference to a hash of arguments to configure behavior: +# skip - A reference to an array of directories to skip +# +# Returns: List of directories possibly containing Perl scripts to test +sub perl_dirs { + my ($args_ref) = @_; + + # Add the global skip list. + my @skip = $args_ref->{skip} ? @{ $args_ref->{skip} } : (); + push(@skip, @GLOBAL_SKIP); + + # Separate directories to skip under tests from top-level directories. + my @skip_tests = grep { m{ \A tests/ }xms } @skip; + @skip = grep { !m{ \A tests }xms } @skip; + for my $skip_dir (@skip_tests) { + $skip_dir =~ s{ \A tests/ }{}xms; + } + + # Convert the skip lists into hashes for convenience. + my %skip = map { $_ => 1 } @skip, 'tests'; + my %skip_tests = map { $_ => 1 } @skip_tests; + + # Build the list of top-level directories to test. + opendir(my $rootdir, q{.}) or BAIL_OUT("cannot open .: $!"); + my @dirs = grep { -d && !$skip{$_} } readdir($rootdir); + closedir($rootdir); + @dirs = File::Spec->no_upwards(@dirs); + + # Add the list of subdirectories of the tests directory. + if (-d 'tests') { + opendir(my $testsdir, q{tests}) or BAIL_OUT("cannot open tests: $!"); + + # Skip if found in %skip_tests or if not a directory. + my $is_skipped = sub { + my ($dir) = @_; + return 1 if $skip_tests{$dir}; + $dir = File::Spec->catdir('tests', $dir); + return -d $dir ? 0 : 1; + }; + + # Build the filtered list of subdirectories of tests. + my @test_dirs = grep { !$is_skipped->($_) } readdir($testsdir); + closedir($testsdir); + @test_dirs = File::Spec->no_upwards(@test_dirs); + + # Add the tests directory to the start of the directory name. + push(@dirs, map { File::Spec->catdir('tests', $_) } @test_dirs); + } + return @dirs; +} + +# Find a configuration file for the test suite. Searches relative to BUILD +# first and then SOURCE and returns whichever is found first. Calls BAIL_OUT +# if the file could not be found. +# +# $file - Partial path to the file +# +# Returns: Full path to the file +sub test_file_path { + my ($file) = @_; + BASE: + for my $base ($ENV{BUILD}, $ENV{SOURCE}) { + next if !defined($base); + if (-f "$base/$file") { + return "$base/$file"; + } + } + BAIL_OUT("cannot find $file"); + return; +} + +# Create a temporary directory for tests to use for transient files and return +# the path to that directory. The directory is automatically removed on +# program exit. The directory permissions use the current umask. Calls +# BAIL_OUT if the directory could not be created. +# +# Returns: Path to a writable temporary directory +sub test_tmpdir { + my $path; + + # If we already figured out what directory to use, reuse the same path. + # Otherwise, create a directory relative to BUILD if set. + if (defined($TMPDIR)) { + $path = $TMPDIR; + } else { + my $base = defined($ENV{BUILD}) ? $ENV{BUILD} : File::Spec->curdir; + $path = File::Spec->catdir($base, 'tmp'); + } + + # Create the directory if it doesn't exist. + if (!-d $path) { + if (!mkdir($path, 0777)) { + BAIL_OUT("cannot create directory $path: $!"); + } + } + + # Store the directory name for cleanup and return it. + $TMPDIR = $path; + return $path; +} + +# On program exit, remove $TMPDIR if set and if possible. Report errors with +# diag but otherwise ignore them. +END { + if (defined($TMPDIR) && -d $TMPDIR) { + local $! = undef; + if (!rmdir($TMPDIR)) { + diag("cannot remove temporary directory $TMPDIR: $!"); + } + } +} + +1; +__END__ + +=for stopwords +Allbery Automake Automake-aware Automake-based rra-c-util ARGS +subdirectories sublicense MERCHANTABILITY NONINFRINGEMENT umask + +=head1 NAME + +Test::RRA::Automake - Automake-aware support functions for Perl tests + +=head1 SYNOPSIS + + use Test::RRA::Automake qw(automake_setup perl_dirs test_file_path); + automake_setup({ chdir_build => 1 }); + + # Paths to directories that may contain Perl scripts. + my @dirs = perl_dirs({ skip => [qw(lib)] }); + + # Configuration for Kerberos tests. + my $keytab = test_file_path('config/keytab'); + +=head1 DESCRIPTION + +This module collects utility functions that are useful for test scripts +written in Perl and included in a C Automake-based package. They assume +the layout of a package that uses rra-c-util and C TAP Harness for the +test structure. + +Loading this module will also add the directories C and +C to the Perl library search path, relative to BUILD if +that environment variable is set. This is harmless for C Automake +projects that don't contain an embedded Perl module, and for those +projects that do, this will allow subsequent C calls to find modules +that are built as part of the package build process. + +The automake_setup() function should be called before calling any other +functions provided by this module. + +=head1 FUNCTIONS + +None of these functions are imported by default. The ones used by a +script should be explicitly imported. On failure, all of these functions +call BAIL_OUT (from Test::More). + +=over 4 + +=item automake_setup([ARGS]) + +Verifies that the BUILD and SOURCE environment variables are set and +then changes directory to the top of the source tree (which is one +directory up from the SOURCE path, since SOURCE points to the top of +the tests directory). + +If ARGS is given, it should be a reference to a hash of configuration +options. Only one option is supported: C. If it is set +to a true value, automake_setup() changes directories to the top of +the build tree instead. + +=item perl_dirs([ARGS]) + +Returns a list of directories that may contain Perl scripts that should be +tested by test scripts that test all Perl in the source tree (such as +syntax or coding style checks). The paths will be simple directory names +relative to the current directory or two-part directory names under the +F directory. (Directories under F are broken out separately +since it's common to want to apply different policies to different +subdirectories of F.) + +If ARGS is given, it should be a reference to a hash of configuration +options. Only one option is supported: C, whose value should be a +reference to an array of additional top-level directories or directories +starting with C that should be skipped. + +=item test_file_path(FILE) + +Given FILE, which should be a relative path, locates that file relative to +the test directory in either the source or build tree. FILE will be +checked for relative to the environment variable BUILD first, and then +relative to SOURCE. test_file_path() returns the full path to FILE or +calls BAIL_OUT if FILE could not be found. + +=item test_tmpdir() + +Create a temporary directory for tests to use for transient files and +return the path to that directory. The directory is created relative to +the BUILD environment variable, which must be set. Permissions on the +directory are set using the current umask. test_tmpdir() returns the full +path to the temporary directory or calls BAIL_OUT if it could not be +created. + +The directory is automatically removed if possible on program exit. +Failure to remove the directory on exit is reported with diag() and +otherwise ignored. + +=back + +=head1 AUTHOR + +Russ Allbery + +=head1 COPYRIGHT AND LICENSE + +Copyright 2014 Russ Allbery + +Copyright 2013 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: + +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. + +=head1 SEE ALSO + +Test::More(3), Test::RRA(3), Test::RRA::Config(3) + +The C TAP Harness test driver and libraries for TAP-based C testing are +available from L. + +This module is maintained in the rra-c-util package. The current version +is available from L. + +=cut diff -Nru libpam-afs-session-2.5/tests/tap/perl/Test/RRA/Config.pm libpam-afs-session-2.6/tests/tap/perl/Test/RRA/Config.pm --- libpam-afs-session-2.5/tests/tap/perl/Test/RRA/Config.pm 1970-01-01 00:00:00.000000000 +0000 +++ libpam-afs-session-2.6/tests/tap/perl/Test/RRA/Config.pm 2015-09-19 18:25:37.000000000 +0000 @@ -0,0 +1,215 @@ +# Configuration for Perl test cases. +# +# In order to reuse the same Perl test cases in multiple packages, I use a +# configuration file to store some package-specific data. This module loads +# that configuration and provides the namespace for the configuration +# settings. + +package Test::RRA::Config; + +use 5.006; +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); + +# 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 @POD_COVERAGE_EXCLUDE @STRICT_IGNORE + @STRICT_PREREQ + ); + + # 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 = '5.09'; +} + +# If BUILD or SOURCE are set in the environment, look for data/perl.conf under +# those paths for a C Automake package. Otherwise, look in t/data/perl.conf +# for a standalone Perl module. Don't use Test::RRA::Automake since it may +# not exist. +our $PATH; +for my $base ($ENV{BUILD}, $ENV{SOURCE}, 't') { + next if !defined($base); + my $path = "$base/data/perl.conf"; + if (-r $path) { + $PATH = $path; + last; + } +} +if (!defined($PATH)) { + BAIL_OUT('cannot find data/perl.conf'); +} + +# Pre-declare all of our variables and set any defaults. +our $COVERAGE_LEVEL = 100; +our @COVERAGE_SKIP_TESTS; +our @CRITIC_IGNORE; +our $LIBRARY_PATH; +our $MINIMUM_VERSION = '5.008'; +our %MINIMUM_VERSION; +our @POD_COVERAGE_EXCLUDE; +our @STRICT_IGNORE; +our @STRICT_PREREQ; + +# Load the configuration. +if (!do($PATH)) { + my $error = $@ || $! || 'loading file did not return true'; + BAIL_OUT("cannot load data/perl.conf: $error"); +} + +1; +__END__ + +=for stopwords +Allbery rra-c-util Automake perlcritic .libs namespace subdirectory +sublicense MERCHANTABILITY NONINFRINGEMENT + +=head1 NAME + +Test::RRA::Config - Perl test configuration + +=head1 SYNOPSIS + + use Test::RRA::Config qw($MINIMUM_VERSION); + print "Required Perl version is $MINIMUM_VERSION\n"; + +=head1 DESCRIPTION + +Test::RRA::Config encapsulates per-package configuration for generic Perl +test programs that are shared between multiple packages using the +rra-c-util infrastructure. It handles locating and loading the test +configuration file for both C Automake packages and stand-alone Perl +modules. + +Test::RRA::Config looks for a file named F relative to the +root of the test directory. That root is taken from the environment +variables BUILD or SOURCE (in that order) if set, which will be the case +for C Automake packages using C TAP Harness. If neither is set, it +expects the root of the test directory to be a directory named F +relative to the current directory, which will be the case for stand-alone +Perl modules. + +The following variables are supported: + +=over 4 + +=item $COVERAGE_LEVEL + +The coverage level achieved by the test suite for Perl test coverage +testing using Test::Strict, as a percentage. The test will fail if test +coverage less than this percentage is achieved. If not given, defaults +to 100. + +=item @COVERAGE_SKIP_TESTS + +Directories under F whose tests should be skipped when doing coverage +testing. This can be tests that won't contribute to coverage or tests +that don't run properly under Devel::Cover for some reason (such as ones +that use taint checking). F and F