git: 3ba4c8c81a28 - main - Upgrade to OpenPAM Ximenia.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Jun 2023 17:05:00 UTC
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456 commit 3ba4c8c81a28de3e00ccf6d7f92c6f8e58bef456 Merge: 9cfed089ac48 5894a4142a9d Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2023-06-27 17:03:17 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2023-06-27 17:03:17 +0000 Upgrade to OpenPAM Ximenia. Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b' contrib/openpam/CREDITS | 1 + contrib/openpam/HISTORY | 11 + contrib/openpam/LICENSE | 2 +- contrib/openpam/Makefile.am | 31 +- contrib/openpam/Makefile.in | 99 +- contrib/openpam/RELNOTES | 4 +- contrib/openpam/aclocal.m4 | 119 +- contrib/openpam/autogen.sh | 3 - contrib/openpam/bin/Makefile.am | 2 - contrib/openpam/bin/Makefile.in | 29 +- .../openpam/bin/openpam_dump_policy/Makefile.am | 2 - .../openpam/bin/openpam_dump_policy/Makefile.in | 29 +- .../bin/openpam_dump_policy/openpam_dump_policy.c | 2 - contrib/openpam/bin/pamtest/Makefile.am | 2 - contrib/openpam/bin/pamtest/Makefile.in | 29 +- contrib/openpam/bin/pamtest/pamtest.1 | 4 +- contrib/openpam/bin/pamtest/pamtest.c | 2 - contrib/openpam/bin/su/Makefile.am | 2 - contrib/openpam/bin/su/Makefile.in | 29 +- contrib/openpam/bin/su/su.1 | 4 +- contrib/openpam/bin/su/su.c | 2 - contrib/openpam/compile | 6 +- contrib/openpam/config.guess | 747 +- contrib/openpam/config.h.in | 114 +- contrib/openpam/config.sub | 1674 +- contrib/openpam/configure | 23391 +++++++++++-------- contrib/openpam/configure.ac | 55 +- contrib/openpam/depcomp | 2 +- contrib/openpam/doc/Makefile.am | 2 - contrib/openpam/doc/Makefile.in | 29 +- contrib/openpam/doc/man/Makefile.am | 2 - contrib/openpam/doc/man/Makefile.in | 27 +- contrib/openpam/doc/man/openpam.3 | 5 +- contrib/openpam/doc/man/openpam.man | 3 - contrib/openpam/doc/man/openpam_borrow_cred.3 | 3 +- contrib/openpam/doc/man/openpam_free_data.3 | 3 +- contrib/openpam/doc/man/openpam_free_envlist.3 | 3 +- contrib/openpam/doc/man/openpam_get_feature.3 | 3 +- contrib/openpam/doc/man/openpam_get_option.3 | 3 +- contrib/openpam/doc/man/openpam_log.3 | 3 +- contrib/openpam/doc/man/openpam_nullconv.3 | 3 +- contrib/openpam/doc/man/openpam_readline.3 | 3 +- contrib/openpam/doc/man/openpam_readlinev.3 | 3 +- contrib/openpam/doc/man/openpam_readword.3 | 3 +- contrib/openpam/doc/man/openpam_restore_cred.3 | 3 +- contrib/openpam/doc/man/openpam_set_feature.3 | 3 +- contrib/openpam/doc/man/openpam_set_option.3 | 3 +- contrib/openpam/doc/man/openpam_straddch.3 | 3 +- contrib/openpam/doc/man/openpam_subst.3 | 3 +- contrib/openpam/doc/man/openpam_ttyconv.3 | 3 +- contrib/openpam/doc/man/pam.3 | 5 +- contrib/openpam/doc/man/pam.conf.5 | 4 +- contrib/openpam/doc/man/pam.man | 3 - contrib/openpam/doc/man/pam_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_close_session.3 | 3 +- contrib/openpam/doc/man/pam_conv.3 | 4 +- contrib/openpam/doc/man/pam_end.3 | 3 +- contrib/openpam/doc/man/pam_error.3 | 3 +- contrib/openpam/doc/man/pam_get_authtok.3 | 3 +- contrib/openpam/doc/man/pam_get_data.3 | 3 +- contrib/openpam/doc/man/pam_get_item.3 | 3 +- contrib/openpam/doc/man/pam_get_user.3 | 3 +- contrib/openpam/doc/man/pam_getenv.3 | 3 +- contrib/openpam/doc/man/pam_getenvlist.3 | 3 +- contrib/openpam/doc/man/pam_info.3 | 3 +- contrib/openpam/doc/man/pam_open_session.3 | 3 +- contrib/openpam/doc/man/pam_prompt.3 | 3 +- contrib/openpam/doc/man/pam_putenv.3 | 3 +- contrib/openpam/doc/man/pam_set_data.3 | 3 +- contrib/openpam/doc/man/pam_set_item.3 | 3 +- contrib/openpam/doc/man/pam_setcred.3 | 3 +- contrib/openpam/doc/man/pam_setenv.3 | 3 +- contrib/openpam/doc/man/pam_sm_acct_mgmt.3 | 3 +- contrib/openpam/doc/man/pam_sm_authenticate.3 | 3 +- contrib/openpam/doc/man/pam_sm_chauthtok.3 | 3 +- contrib/openpam/doc/man/pam_sm_close_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_open_session.3 | 3 +- contrib/openpam/doc/man/pam_sm_setcred.3 | 3 +- contrib/openpam/doc/man/pam_start.3 | 3 +- contrib/openpam/doc/man/pam_strerror.3 | 3 +- contrib/openpam/doc/man/pam_verror.3 | 3 +- contrib/openpam/doc/man/pam_vinfo.3 | 3 +- contrib/openpam/doc/man/pam_vprompt.3 | 3 +- contrib/openpam/freebsd/Makefile.in | 33 + contrib/openpam/include/Makefile.am | 2 - contrib/openpam/include/Makefile.in | 29 +- contrib/openpam/include/security/Makefile.am | 2 - contrib/openpam/include/security/Makefile.in | 29 +- contrib/openpam/include/security/openpam.h | 2 - contrib/openpam/include/security/openpam_attr.h | 4 - contrib/openpam/include/security/openpam_version.h | 8 +- contrib/openpam/include/security/pam_appl.h | 2 - contrib/openpam/include/security/pam_constants.h | 2 - contrib/openpam/include/security/pam_modules.h | 2 - contrib/openpam/include/security/pam_types.h | 2 - contrib/openpam/install-sh | 172 +- contrib/openpam/lib/Makefile.am | 2 - contrib/openpam/lib/Makefile.in | 29 +- contrib/openpam/lib/libpam/Makefile.am | 2 - contrib/openpam/lib/libpam/Makefile.in | 29 +- contrib/openpam/lib/libpam/openpam_asprintf.c | 2 - contrib/openpam/lib/libpam/openpam_asprintf.h | 2 - contrib/openpam/lib/libpam/openpam_borrow_cred.c | 2 - .../openpam/lib/libpam/openpam_check_owner_perms.c | 2 - contrib/openpam/lib/libpam/openpam_configure.c | 2 - contrib/openpam/lib/libpam/openpam_constants.c | 2 - contrib/openpam/lib/libpam/openpam_constants.h | 2 - contrib/openpam/lib/libpam/openpam_cred.h | 2 - contrib/openpam/lib/libpam/openpam_ctype.h | 2 - contrib/openpam/lib/libpam/openpam_debug.h | 2 - contrib/openpam/lib/libpam/openpam_dispatch.c | 2 - contrib/openpam/lib/libpam/openpam_dlfunc.h | 2 - contrib/openpam/lib/libpam/openpam_dynamic.c | 2 - contrib/openpam/lib/libpam/openpam_features.c | 2 - contrib/openpam/lib/libpam/openpam_features.h | 2 - contrib/openpam/lib/libpam/openpam_findenv.c | 2 - contrib/openpam/lib/libpam/openpam_free_data.c | 2 - contrib/openpam/lib/libpam/openpam_free_envlist.c | 2 - contrib/openpam/lib/libpam/openpam_get_feature.c | 2 - contrib/openpam/lib/libpam/openpam_get_option.c | 2 - contrib/openpam/lib/libpam/openpam_impl.h | 2 - contrib/openpam/lib/libpam/openpam_load.c | 2 - contrib/openpam/lib/libpam/openpam_log.c | 2 - contrib/openpam/lib/libpam/openpam_nullconv.c | 2 - contrib/openpam/lib/libpam/openpam_readline.c | 2 - contrib/openpam/lib/libpam/openpam_readlinev.c | 4 - contrib/openpam/lib/libpam/openpam_readword.c | 3 - contrib/openpam/lib/libpam/openpam_restore_cred.c | 2 - contrib/openpam/lib/libpam/openpam_set_feature.c | 2 - contrib/openpam/lib/libpam/openpam_set_option.c | 5 +- contrib/openpam/lib/libpam/openpam_static.c | 2 - contrib/openpam/lib/libpam/openpam_straddch.c | 4 - contrib/openpam/lib/libpam/openpam_strlcat.c | 2 - contrib/openpam/lib/libpam/openpam_strlcat.h | 2 - contrib/openpam/lib/libpam/openpam_strlcmp.h | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.c | 2 - contrib/openpam/lib/libpam/openpam_strlcpy.h | 2 - contrib/openpam/lib/libpam/openpam_strlset.c | 2 - contrib/openpam/lib/libpam/openpam_strlset.h | 2 - contrib/openpam/lib/libpam/openpam_subst.c | 7 +- contrib/openpam/lib/libpam/openpam_ttyconv.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.c | 2 - contrib/openpam/lib/libpam/openpam_vasprintf.h | 2 - contrib/openpam/lib/libpam/pam_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_authenticate.c | 2 - .../lib/libpam/pam_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_close_session.c | 2 - contrib/openpam/lib/libpam/pam_end.c | 2 - contrib/openpam/lib/libpam/pam_error.c | 2 - contrib/openpam/lib/libpam/pam_get_authtok.c | 2 - contrib/openpam/lib/libpam/pam_get_data.c | 2 - contrib/openpam/lib/libpam/pam_get_item.c | 2 - .../openpam/lib/libpam/pam_get_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_get_user.c | 2 - contrib/openpam/lib/libpam/pam_getenv.c | 2 - contrib/openpam/lib/libpam/pam_getenvlist.c | 2 - contrib/openpam/lib/libpam/pam_info.c | 2 - contrib/openpam/lib/libpam/pam_open_session.c | 2 - contrib/openpam/lib/libpam/pam_prompt.c | 2 - contrib/openpam/lib/libpam/pam_putenv.c | 2 - contrib/openpam/lib/libpam/pam_set_data.c | 2 - contrib/openpam/lib/libpam/pam_set_item.c | 2 - .../openpam/lib/libpam/pam_set_mapped_authtok.c | 2 - .../openpam/lib/libpam/pam_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_setcred.c | 2 - contrib/openpam/lib/libpam/pam_setenv.c | 2 - contrib/openpam/lib/libpam/pam_sm_acct_mgmt.c | 2 - contrib/openpam/lib/libpam/pam_sm_authenticate.c | 2 - .../lib/libpam/pam_sm_authenticate_secondary.c | 2 - contrib/openpam/lib/libpam/pam_sm_chauthtok.c | 2 - contrib/openpam/lib/libpam/pam_sm_close_session.c | 2 - .../openpam/lib/libpam/pam_sm_get_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_get_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_open_session.c | 2 - .../openpam/lib/libpam/pam_sm_set_mapped_authtok.c | 2 - .../lib/libpam/pam_sm_set_mapped_username.c | 2 - contrib/openpam/lib/libpam/pam_sm_setcred.c | 2 - contrib/openpam/lib/libpam/pam_start.c | 2 - contrib/openpam/lib/libpam/pam_strerror.c | 2 - contrib/openpam/lib/libpam/pam_verror.c | 2 - contrib/openpam/lib/libpam/pam_vinfo.c | 2 - contrib/openpam/lib/libpam/pam_vprompt.c | 2 - contrib/openpam/ltmain.sh | 855 +- contrib/openpam/m4/ax_compiler_vendor.m4 | 117 + contrib/openpam/m4/libtool.m4 | 227 +- contrib/openpam/m4/ltoptions.m4 | 4 +- contrib/openpam/m4/ltsugar.m4 | 2 +- contrib/openpam/m4/ltversion.m4 | 13 +- contrib/openpam/m4/lt~obsolete.m4 | 4 +- contrib/openpam/misc/Makefile.am | 2 +- contrib/openpam/misc/Makefile.in | 34 +- contrib/openpam/misc/coverage.sh.in | 33 - contrib/openpam/misc/gendoc.pl | 2 - contrib/openpam/missing | 2 +- contrib/openpam/mkpkgng.in | 177 - contrib/openpam/modules/Makefile.am | 2 - contrib/openpam/modules/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/Makefile.am | 2 - contrib/openpam/modules/pam_deny/Makefile.in | 29 +- contrib/openpam/modules/pam_deny/pam_deny.c | 2 - contrib/openpam/modules/pam_permit/Makefile.am | 2 - contrib/openpam/modules/pam_permit/Makefile.in | 29 +- contrib/openpam/modules/pam_permit/pam_permit.c | 2 - contrib/openpam/modules/pam_return/Makefile.am | 2 - contrib/openpam/modules/pam_return/Makefile.in | 29 +- contrib/openpam/modules/pam_return/pam_return.c | 2 - contrib/openpam/modules/pam_unix/Makefile.am | 2 - contrib/openpam/modules/pam_unix/Makefile.in | 29 +- contrib/openpam/modules/pam_unix/pam_unix.c | 2 - contrib/openpam/t/Makefile.am | 4 +- contrib/openpam/t/Makefile.in | 87 +- contrib/openpam/t/t_openpam_ctype.c | 2 - contrib/openpam/t/t_openpam_dispatch.c | 2 - contrib/openpam/t/t_openpam_readlinev.c | 2 - contrib/openpam/t/t_openpam_readword.c | 2 - contrib/openpam/t/t_openpam_straddch.c | 183 + contrib/openpam/t/t_openpam_subst.c | 105 + contrib/openpam/t/t_pam_conv.c | 2 - contrib/openpam/t/t_pam_conv.h | 2 - contrib/openpam/t/t_pam_env.c | 2 - contrib/openpam/t/t_pam_err.c | 2 - contrib/openpam/t/t_pam_err.h | 2 - contrib/openpam/test-driver | 25 +- 227 files changed, 17395 insertions(+), 11816 deletions(-) diff --cc contrib/openpam/RELNOTES index 895370ae8774,000000000000..3bbd7bb19721 mode 100644,000000..100644 --- a/contrib/openpam/RELNOTES +++ b/contrib/openpam/RELNOTES @@@ -1,21 -1,0 +1,21 @@@ + - Release notes for OpenPAM Tabebuia - ================================== ++ Release notes for OpenPAM Ximenia ++ ================================= + +OpenPAM is developed primarily on FreeBSD, but is expected to work on +almost any POSIX-like platform that has GNU autotools, GNU make and +the GNU compiler suite installed. + +The OpenPAM distribution consists of the following components: + + - The PAM library itself, with complete API documentation. + + - Sample modules (pam_permit, pam_deny and pam_unix) and a sample + application (su) which demonstrate how to use the PAM library. + + - A test application (pamtest) which can be used to test policies and + modules. + + - Unit tests for limited portions of the library. + +Please direct bug reports and inquiries to <des@des.no>. diff --cc contrib/openpam/compile index 99e50524b3ba,000000000000..df363c8fbfbc mode 100755,000000..100755 --- a/contrib/openpam/compile +++ b/contrib/openpam/compile @@@ -1,348 -1,0 +1,348 @@@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2018-03-07.03; # UTC + - # Copyright (C) 1999-2018 Free Software Foundation, Inc. ++# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration 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 <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +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*) ++ CYGWIN* | MSYS*) + 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/*) ++ cygwin/* | msys/*) + 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 + 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 +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'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +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'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # 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 + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +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 +# 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 +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'before-save-hook 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC0" +# time-stamp-end: "; # UTC" +# End: diff --cc contrib/openpam/config.guess index 0bb53aebf96d,b1f709e5aa0f..b1f709e5aa0f mode 100644,100755..100755 --- a/contrib/openpam/config.guess +++ b/contrib/openpam/config.guess diff --cc contrib/openpam/config.sub index 3580aaf3ef9c,dad71239a8f8..dad71239a8f8 mode 100644,100755..100755 --- a/contrib/openpam/config.sub +++ b/contrib/openpam/config.sub diff --cc contrib/openpam/depcomp index 65cbf7093a1e,000000000000..715e34311ed2 mode 100755,000000..100755 --- a/contrib/openpam/depcomp +++ b/contrib/openpam/depcomp @@@ -1,791 -1,0 +1,791 @@@ +#! /bin/sh +# depcomp - compile a program generating dependencies as side-effects + +scriptversion=2018-03-07.03; # UTC + - # Copyright (C) 1999-2018 Free Software Foundation, Inc. ++# Copyright (C) 1999-2021 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 +# 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 <https://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration 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 Alexandre Oliva <oliva@dcc.unicamp.br>. + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: depcomp [--help] [--version] PROGRAM [ARGS] + +Run PROGRAMS ARGS to compile a file, generating dependencies +as side-effects. + +Environment variables: + depmode Dependency tracking mode. + 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 outputting dependencies. + libtool Whether libtool is used (yes/no). + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "depcomp $scriptversion" + exit $? + ;; +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 +fi + +# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. +depfile=${depfile-`echo "$object" | + sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +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 +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # 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 +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 +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. +## Unfortunately, FreeBSD c89 acceptance of flags depends upon +## the command line argument order; so add the flags where they +## appear in depend2.am. Note that the slowdown incurred here +## affects only configure: in makefiles, %FASTDEP% shortcuts this. + for arg + do + case $arg in + -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; + *) set fnord "$@" "$arg" ;; + esac + shift # fnord + shift # $arg + done + "$@" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +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). 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 + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # 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. +## 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. +## 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. 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. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # 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 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + 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 + # dependency line. + 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 ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" + else + 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 + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + set_dir_from "$object" + set_base_from "$object" + if test "$libtool" = yes; then + tmpdepfile1=$dir$base.u + tmpdepfile2=$base.u + tmpdepfile3=$dir.libs/$base.u + "$@" -Wc,-M + else + tmpdepfile1=$dir$base.u + tmpdepfile2=$dir$base.u + tmpdepfile3=$dir$base.u + "$@" -M + fi + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + 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 *** 1311 LINES SKIPPED ***