Codebase list libseccomp / 307de95
New upstream version 2.5.1 Felix Geyer 3 years ago
54 changed file(s) with 854 addition(s) and 1162 deletion(s). Raw diff Collapse all Expand all
00 libseccomp: Releases
11 ===============================================================================
22 https://github.com/seccomp/libseccomp
3
4 * Version 2.5.1 - November 20, 2020
5 - Fix a bug where seccomp_load() could only be called once
6 - Change the notification fd handling to only request a notification fd if
7 the filter has a _NOTIFY action
8 - Add documentation about SCMP_ACT_NOTIFY to the seccomp_add_rule(3) manpage
9 - Clarify the maintainers' GPG keys
310
411 * Version 2.5.0 - July 20, 2020
512 - Add support for the seccomp user notifications, see the
3939 Markos Chandras <markos.chandras@imgtec.com>
4040 Mathias Krause <minipli@googlemail.com>
4141 Michael Forney <mforney@mforney.org>
42 Michael Karcher <github@mkarcher.dialup.fu-berlin.de>
4243 Mike Frysinger <vapier@gentoo.org>
4344 Mike Strosaker <strosake@linux.vnet.ibm.com>
4445 Miroslav Lichvar <mlichvar@redhat.com>
4546 Paul Moore <paul@paul-moore.com>
47 Rodrigo Campos <rodrigo@kinvolk.io>
4648 Rolf Eike Beer <eb@emlix.com>
49 Samanta Navarro <ferivoz@riseup.net>
4750 Serge Hallyn <serge.hallyn@ubuntu.com>
4851 Stéphane Graber <stgraber@ubuntu.com>
4952 Stephen Coleman <omegacoleman@gmail.com>
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
185185 $(am__extra_recursive_targets)
186186 AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
187187 cscope distdir distdir-am dist dist-all distcheck
188 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \
189 configure.h.in
188 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
189 $(LISP)configure.h.in
190190 # Read a list of newline-separated strings from the standard input,
191191 # and print each of them once, without duplicates. Input order is
192192 # *not* preserved.
692692 tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
693693 $(am__post_remove_distdir)
694694
695 dist-zstd: distdir
696 tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
697 $(am__post_remove_distdir)
698
699695 dist-tarZ: distdir
700696 @echo WARNING: "Support for distribution archives compressed with" \
701697 "legacy program 'compress' is deprecated." >&2
738734 eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
739735 *.zip*) \
740736 unzip $(distdir).zip ;;\
741 *.tar.zst*) \
742 zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
743737 esac
744738 chmod -R a-w $(distdir)
745739 chmod u+w $(distdir)
920914 am--refresh check check-am clean clean-cscope clean-generic \
921915 clean-libtool clean-local cscope cscopelist-am ctags ctags-am \
922916 dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \
923 dist-tarZ dist-xz dist-zip dist-zstd distcheck distclean \
917 dist-tarZ dist-xz dist-zip distcheck distclean \
924918 distclean-generic distclean-hdr distclean-libtool \
925919 distclean-tags distcleancheck distdir distuninstallcheck dvi \
926920 dvi-am html html-am info info-am install install-am \
7373
7474 # gpg --verify file.asc file
7575
76 At present, only the following keys are authorized to sign official libseccomp
77 releases:
76 At present, only the following keys, specified via the fingerprints below, are
77 authorized to sign official libseccomp releases:
7878
7979 Paul Moore <paul@paul-moore.com>
8080 7100 AADF AE6E 6E94 0D2E 0AD6 55E4 5A5A E8CA 7C8A
8181
8282 Tom Hromatka <tom.hromatka@oracle.com>
8383 47A6 8FCE 37C7 D702 4FD6 5E11 356C E62C 2B52 4099
84
85 More information on GnuPG can be found at their website, https://gnupg.org.
8486
8587 ## Building and Installing the Library
8688
0 # generated automatically by aclocal 1.16.2 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
0 # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
33
44 # This file is free software; the Free Software Foundation
55 # gives unlimited permission to copy and/or distribute it,
1919 If you have problems, you may need to regenerate the build system entirely.
2020 To do so, use the procedure documented by the package, typically 'autoreconf'.])])
2121
22 # Copyright (C) 2002-2020 Free Software Foundation, Inc.
22 # Copyright (C) 2002-2018 Free Software Foundation, Inc.
2323 #
2424 # This file is free software; the Free Software Foundation
2525 # gives unlimited permission to copy and/or distribute it,
3434 [am__api_version='1.16'
3535 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3636 dnl require some minimum version. Point them to the right macro.
37 m4_if([$1], [1.16.2], [],
37 m4_if([$1], [1.16.1], [],
3838 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3939 ])
4040
5050 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5151 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5252 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
53 [AM_AUTOMAKE_VERSION([1.16.2])dnl
53 [AM_AUTOMAKE_VERSION([1.16.1])dnl
5454 m4_ifndef([AC_AUTOCONF_VERSION],
5555 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5656 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5757
58 # Copyright (C) 2011-2020 Free Software Foundation, Inc.
58 # Copyright (C) 2011-2018 Free Software Foundation, Inc.
5959 #
6060 # This file is free software; the Free Software Foundation
6161 # gives unlimited permission to copy and/or distribute it,
117117
118118 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
119119
120 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
120 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
121121 #
122122 # This file is free software; the Free Software Foundation
123123 # gives unlimited permission to copy and/or distribute it,
169169
170170 # AM_CONDITIONAL -*- Autoconf -*-
171171
172 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
172 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
173173 #
174174 # This file is free software; the Free Software Foundation
175175 # gives unlimited permission to copy and/or distribute it,
200200 Usually this means the macro was only invoked conditionally.]])
201201 fi])])
202202
203 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
203 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
204204 #
205205 # This file is free software; the Free Software Foundation
206206 # gives unlimited permission to copy and/or distribute it,
391391
392392 # Generate code to set up dependency tracking. -*- Autoconf -*-
393393
394 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
394 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
395395 #
396396 # This file is free software; the Free Software Foundation
397397 # gives unlimited permission to copy and/or distribute it,
430430 done
431431 if test $am_rc -ne 0; then
432432 AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
433 for automatic dependency tracking. If GNU make was not used, consider
434 re-running the configure script with MAKE="gmake" (or whatever is
435 necessary). You can also try re-running configure with the
433 for automatic dependency tracking. Try re-running configure with the
436434 '--disable-dependency-tracking' option to at least be able to build
437435 the package (albeit without support for automatic dependency tracking).])
438436 fi
459457
460458 # Do all the work for Automake. -*- Autoconf -*-
461459
462 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
460 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
463461 #
464462 # This file is free software; the Free Software Foundation
465463 # gives unlimited permission to copy and/or distribute it,
656654 done
657655 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
658656
659 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
657 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
660658 #
661659 # This file is free software; the Free Software Foundation
662660 # gives unlimited permission to copy and/or distribute it,
677675 fi
678676 AC_SUBST([install_sh])])
679677
680 # Copyright (C) 2003-2020 Free Software Foundation, Inc.
678 # Copyright (C) 2003-2018 Free Software Foundation, Inc.
681679 #
682680 # This file is free software; the Free Software Foundation
683681 # gives unlimited permission to copy and/or distribute it,
698696
699697 # Check to see how 'make' treats includes. -*- Autoconf -*-
700698
701 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
699 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
702700 #
703701 # This file is free software; the Free Software Foundation
704702 # gives unlimited permission to copy and/or distribute it,
741739
742740 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
743741
744 # Copyright (C) 1997-2020 Free Software Foundation, Inc.
742 # Copyright (C) 1997-2018 Free Software Foundation, Inc.
745743 #
746744 # This file is free software; the Free Software Foundation
747745 # gives unlimited permission to copy and/or distribute it,
780778
781779 # Helper functions for option handling. -*- Autoconf -*-
782780
783 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
781 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
784782 #
785783 # This file is free software; the Free Software Foundation
786784 # gives unlimited permission to copy and/or distribute it,
809807 AC_DEFUN([_AM_IF_OPTION],
810808 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
811809
812 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
810 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
813811 #
814812 # This file is free software; the Free Software Foundation
815813 # gives unlimited permission to copy and/or distribute it,
856854 # For backward compatibility.
857855 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
858856
859 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
857 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
860858 #
861859 # This file is free software; the Free Software Foundation
862860 # gives unlimited permission to copy and/or distribute it,
10941092 sys.exit(sys.hexversion < minverhex)"
10951093 AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
10961094
1097 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1095 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
10981096 #
10991097 # This file is free software; the Free Software Foundation
11001098 # gives unlimited permission to copy and/or distribute it,
11131111
11141112 # Check to make sure that the build environment is sane. -*- Autoconf -*-
11151113
1116 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
1114 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
11171115 #
11181116 # This file is free software; the Free Software Foundation
11191117 # gives unlimited permission to copy and/or distribute it,
11941192 rm -f conftest.file
11951193 ])
11961194
1197 # Copyright (C) 2009-2020 Free Software Foundation, Inc.
1195 # Copyright (C) 2009-2018 Free Software Foundation, Inc.
11981196 #
11991197 # This file is free software; the Free Software Foundation
12001198 # gives unlimited permission to copy and/or distribute it,
12541252 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
12551253 ])
12561254
1257 # Copyright (C) 2001-2020 Free Software Foundation, Inc.
1255 # Copyright (C) 2001-2018 Free Software Foundation, Inc.
12581256 #
12591257 # This file is free software; the Free Software Foundation
12601258 # gives unlimited permission to copy and/or distribute it,
12821280 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
12831281 AC_SUBST([INSTALL_STRIP_PROGRAM])])
12841282
1285 # Copyright (C) 2006-2020 Free Software Foundation, Inc.
1283 # Copyright (C) 2006-2018 Free Software Foundation, Inc.
12861284 #
12871285 # This file is free software; the Free Software Foundation
12881286 # gives unlimited permission to copy and/or distribute it,
13011299
13021300 # Check how to create a tarball. -*- Autoconf -*-
13031301
1304 # Copyright (C) 2004-2020 Free Software Foundation, Inc.
1302 # Copyright (C) 2004-2018 Free Software Foundation, Inc.
13051303 #
13061304 # This file is free software; the Free Software Foundation
13071305 # gives unlimited permission to copy and/or distribute it,
11 # Wrapper for Microsoft lib.exe
22
33 me=ar-lib
4 scriptversion=2019-07-04.01; # UTC
5
6 # Copyright (C) 2010-2020 Free Software Foundation, Inc.
4 scriptversion=2012-03-01.08; # UTC
5
6 # Copyright (C) 2010-2018 Free Software Foundation, Inc.
77 # Written by Peter Rosin <peda@lysator.liu.se>.
88 #
99 # This program is free software; you can redistribute it and/or modify
5252 MINGW*)
5353 file_conv=mingw
5454 ;;
55 CYGWIN* | MSYS*)
55 CYGWIN*)
5656 file_conv=cygwin
5757 ;;
5858 *)
6464 mingw)
6565 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
6666 ;;
67 cygwin | msys)
67 cygwin)
6868 file=`cygpath -m "$file" || echo "$file"`
6969 ;;
7070 wine)
223223 esac
224224 done
225225 else
226 $AR -NOLOGO -LIST "$archive" | tr -d '\r' | sed -e 's/\\/\\\\/g' \
227 | while read member
228 do
229 $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
230 done
226 $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
227 do
228 $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
229 done
231230 fi
232231
233232 elif test -n "$quick$replace"; then
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
66 # Written by Tom Tromey <tromey@cygnus.com>.
77 #
88 # This program is free software; you can redistribute it and/or modify
5252 MINGW*)
5353 file_conv=mingw
5454 ;;
55 CYGWIN* | MSYS*)
55 CYGWIN*)
5656 file_conv=cygwin
5757 ;;
5858 *)
6666 mingw/*)
6767 file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
6868 ;;
69 cygwin/* | msys/*)
69 cygwin/*)
7070 file=`cygpath -m "$file" || echo "$file"`
7171 ;;
7272 wine/*)
00 #! /bin/sh
11 # Attempt to guess a canonical system name.
2 # Copyright 1992-2020 Free Software Foundation, Inc.
3
4 timestamp='2020-01-01'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
4949 GNU config.guess ($timestamp)
5050
5151 Originally written by Per Bothner.
52 Copyright 1992-2020 Free Software Foundation, Inc.
52 Copyright 1992-2018 Free Software Foundation, Inc.
5353
5454 This is free software; see the source for copying conditions. There is NO
5555 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
9595
9696 tmp=
9797 # shellcheck disable=SC2172
98 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
98 trap 'test -z "$tmp" || rm -fr "$tmp"' 1 2 13 15
99 trap 'exitcode=$?; test -z "$tmp" || rm -fr "$tmp"; exit $exitcode' 0
99100
100101 set_cc_for_build() {
101 # prevent multiple calls if $tmp is already set
102 test "$tmp" && return 0
103102 : "${TMPDIR=/tmp}"
104103 # shellcheck disable=SC2039
105104 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
263262 *:SolidBSD:*:*)
264263 echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
265264 exit ;;
266 *:OS108:*:*)
267 echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
268 exit ;;
269265 macppc:MirBSD:*:*)
270266 echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
271267 exit ;;
275271 *:Sortix:*:*)
276272 echo "$UNAME_MACHINE"-unknown-sortix
277273 exit ;;
278 *:Twizzler:*:*)
279 echo "$UNAME_MACHINE"-unknown-twizzler
280 exit ;;
281274 *:Redox:*:*)
282275 echo "$UNAME_MACHINE"-unknown-redox
283276 exit ;;
284277 mips:OSF1:*.*)
285 echo mips-dec-osf1
286 exit ;;
278 echo mips-dec-osf1
279 exit ;;
287280 alpha:OSF1:*:*)
288281 case $UNAME_RELEASE in
289282 *4.0)
398391 echo i386-pc-auroraux"$UNAME_RELEASE"
399392 exit ;;
400393 i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
401 set_cc_for_build
402 SUN_ARCH=i386
403 # If there is a compiler, see if it is configured for 64-bit objects.
404 # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
405 # This test works for both compilers.
406 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
407 if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
408 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
409 grep IS_64BIT_ARCH >/dev/null
410 then
411 SUN_ARCH=x86_64
412 fi
413 fi
414 echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
394 UNAME_REL="`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
395 case `isainfo -b` in
396 32)
397 echo i386-pc-solaris2"$UNAME_REL"
398 ;;
399 64)
400 echo x86_64-pc-solaris2"$UNAME_REL"
401 ;;
402 esac
415403 exit ;;
416404 sun4*:SunOS:6*:*)
417405 # According to config.sub, this is the proper way to canonicalize
901889 echo "$UNAME_MACHINE"-pc-uwin
902890 exit ;;
903891 amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
904 echo x86_64-pc-cygwin
892 echo x86_64-unknown-cygwin
905893 exit ;;
906894 prep*:SunOS:5.*:*)
907895 echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
925913 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
926914 exit ;;
927915 alpha:Linux:*:*)
928 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
916 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
929917 EV5) UNAME_MACHINE=alphaev5 ;;
930918 EV56) UNAME_MACHINE=alphaev56 ;;
931919 PCA56) UNAME_MACHINE=alphapca56 ;;
992980 exit ;;
993981 mips:Linux:*:* | mips64:Linux:*:*)
994982 set_cc_for_build
995 IS_GLIBC=0
996 test x"${LIBC}" = xgnu && IS_GLIBC=1
997983 sed 's/^ //' << EOF > "$dummy.c"
998984 #undef CPU
999 #undef mips
1000 #undef mipsel
1001 #undef mips64
1002 #undef mips64el
1003 #if ${IS_GLIBC} && defined(_ABI64)
1004 LIBCABI=gnuabi64
1005 #else
1006 #if ${IS_GLIBC} && defined(_ABIN32)
1007 LIBCABI=gnuabin32
1008 #else
1009 LIBCABI=${LIBC}
1010 #endif
1011 #endif
1012
1013 #if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1014 CPU=mipsisa64r6
1015 #else
1016 #if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
1017 CPU=mipsisa32r6
1018 #else
1019 #if defined(__mips64)
1020 CPU=mips64
1021 #else
1022 CPU=mips
1023 #endif
1024 #endif
1025 #endif
1026
985 #undef ${UNAME_MACHINE}
986 #undef ${UNAME_MACHINE}el
1027987 #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
1028 MIPS_ENDIAN=el
988 CPU=${UNAME_MACHINE}el
1029989 #else
1030990 #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
1031 MIPS_ENDIAN=
991 CPU=${UNAME_MACHINE}
1032992 #else
1033 MIPS_ENDIAN=
993 CPU=
1034994 #endif
1035995 #endif
1036996 EOF
1037 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`"
1038 test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
997 eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
998 test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
1039999 ;;
10401000 mips64el:Linux:*:*)
10411001 echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
11481108 *Pentium) UNAME_MACHINE=i586 ;;
11491109 *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
11501110 esac
1151 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}"
1111 echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
11521112 exit ;;
11531113 i*86:*:3.2:*)
11541114 if test -f /usr/options/cb.name; then
13321292 echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
13331293 exit ;;
13341294 *:Darwin:*:*)
1335 UNAME_PROCESSOR=`uname -p`
1336 case $UNAME_PROCESSOR in
1337 unknown) UNAME_PROCESSOR=powerpc ;;
1338 esac
1339 if command -v xcode-select > /dev/null 2> /dev/null && \
1340 ! xcode-select --print-path > /dev/null 2> /dev/null ; then
1341 # Avoid executing cc if there is no toolchain installed as
1342 # cc will be a stub that puts up a graphical alert
1343 # prompting the user to install developer tools.
1344 CC_FOR_BUILD=no_compiler_found
1345 else
1346 set_cc_for_build
1347 fi
1348 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1349 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1350 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1351 grep IS_64BIT_ARCH >/dev/null
1352 then
1353 case $UNAME_PROCESSOR in
1354 i386) UNAME_PROCESSOR=x86_64 ;;
1355 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1356 esac
1357 fi
1358 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1359 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1360 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1361 grep IS_PPC >/dev/null
1362 then
1363 UNAME_PROCESSOR=powerpc
1295 UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1296 set_cc_for_build
1297 if test "$UNAME_PROCESSOR" = unknown ; then
1298 UNAME_PROCESSOR=powerpc
1299 fi
1300 if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
1301 if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
1302 if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1303 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1304 grep IS_64BIT_ARCH >/dev/null
1305 then
1306 case $UNAME_PROCESSOR in
1307 i386) UNAME_PROCESSOR=x86_64 ;;
1308 powerpc) UNAME_PROCESSOR=powerpc64 ;;
1309 esac
1310 fi
1311 # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
1312 if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
1313 (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
1314 grep IS_PPC >/dev/null
1315 then
1316 UNAME_PROCESSOR=powerpc
1317 fi
13641318 fi
13651319 elif test "$UNAME_PROCESSOR" = i386 ; then
1366 # uname -m returns i386 or x86_64
1367 UNAME_PROCESSOR=$UNAME_MACHINE
1320 # Avoid executing cc on OS X 10.9, as it ships with a stub
1321 # that puts up a graphical alert prompting to install
1322 # developer tools. Any system running Mac OS X 10.7 or
1323 # later (Darwin 11 and later) is required to have a 64-bit
1324 # processor. This is not true of the ARM version of Darwin
1325 # that Apple uses in portable devices.
1326 UNAME_PROCESSOR=x86_64
13681327 fi
13691328 echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
13701329 exit ;;
14641423 amd64:Isilon\ OneFS:*:*)
14651424 echo x86_64-unknown-onefs
14661425 exit ;;
1467 *:Unleashed:*:*)
1468 echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE"
1469 exit ;;
14701426 esac
1471
1472 # No uname command or uname output not recognized.
1473 set_cc_for_build
1474 cat > "$dummy.c" <<EOF
1475 #ifdef _SEQUENT_
1476 #include <sys/types.h>
1477 #include <sys/utsname.h>
1478 #endif
1479 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1480 #if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1481 #include <signal.h>
1482 #if defined(_SIZE_T_) || defined(SIGLOST)
1483 #include <sys/utsname.h>
1484 #endif
1485 #endif
1486 #endif
1487 main ()
1488 {
1489 #if defined (sony)
1490 #if defined (MIPSEB)
1491 /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
1492 I don't know.... */
1493 printf ("mips-sony-bsd\n"); exit (0);
1494 #else
1495 #include <sys/param.h>
1496 printf ("m68k-sony-newsos%s\n",
1497 #ifdef NEWSOS4
1498 "4"
1499 #else
1500 ""
1501 #endif
1502 ); exit (0);
1503 #endif
1504 #endif
1505
1506 #if defined (NeXT)
1507 #if !defined (__ARCHITECTURE__)
1508 #define __ARCHITECTURE__ "m68k"
1509 #endif
1510 int version;
1511 version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
1512 if (version < 4)
1513 printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
1514 else
1515 printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
1516 exit (0);
1517 #endif
1518
1519 #if defined (MULTIMAX) || defined (n16)
1520 #if defined (UMAXV)
1521 printf ("ns32k-encore-sysv\n"); exit (0);
1522 #else
1523 #if defined (CMU)
1524 printf ("ns32k-encore-mach\n"); exit (0);
1525 #else
1526 printf ("ns32k-encore-bsd\n"); exit (0);
1527 #endif
1528 #endif
1529 #endif
1530
1531 #if defined (__386BSD__)
1532 printf ("i386-pc-bsd\n"); exit (0);
1533 #endif
1534
1535 #if defined (sequent)
1536 #if defined (i386)
1537 printf ("i386-sequent-dynix\n"); exit (0);
1538 #endif
1539 #if defined (ns32000)
1540 printf ("ns32k-sequent-dynix\n"); exit (0);
1541 #endif
1542 #endif
1543
1544 #if defined (_SEQUENT_)
1545 struct utsname un;
1546
1547 uname(&un);
1548 if (strncmp(un.version, "V2", 2) == 0) {
1549 printf ("i386-sequent-ptx2\n"); exit (0);
1550 }
1551 if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
1552 printf ("i386-sequent-ptx1\n"); exit (0);
1553 }
1554 printf ("i386-sequent-ptx\n"); exit (0);
1555 #endif
1556
1557 #if defined (vax)
1558 #if !defined (ultrix)
1559 #include <sys/param.h>
1560 #if defined (BSD)
1561 #if BSD == 43
1562 printf ("vax-dec-bsd4.3\n"); exit (0);
1563 #else
1564 #if BSD == 199006
1565 printf ("vax-dec-bsd4.3reno\n"); exit (0);
1566 #else
1567 printf ("vax-dec-bsd\n"); exit (0);
1568 #endif
1569 #endif
1570 #else
1571 printf ("vax-dec-bsd\n"); exit (0);
1572 #endif
1573 #else
1574 #if defined(_SIZE_T_) || defined(SIGLOST)
1575 struct utsname un;
1576 uname (&un);
1577 printf ("vax-dec-ultrix%s\n", un.release); exit (0);
1578 #else
1579 printf ("vax-dec-ultrix\n"); exit (0);
1580 #endif
1581 #endif
1582 #endif
1583 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
1584 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
1585 #if defined(_SIZE_T_) || defined(SIGLOST)
1586 struct utsname *un;
1587 uname (&un);
1588 printf ("mips-dec-ultrix%s\n", un.release); exit (0);
1589 #else
1590 printf ("mips-dec-ultrix\n"); exit (0);
1591 #endif
1592 #endif
1593 #endif
1594
1595 #if defined (alliant) && defined (i860)
1596 printf ("i860-alliant-bsd\n"); exit (0);
1597 #endif
1598
1599 exit (1);
1600 }
1601 EOF
1602
1603 $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`$dummy` &&
1604 { echo "$SYSTEM_NAME"; exit; }
1605
1606 # Apollos put the system type in the environment.
1607 test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
16081427
16091428 echo "$0: unable to guess system type" >&2
16101429
00 #! /bin/sh
11 # Configuration validation subroutine script.
2 # Copyright 1992-2020 Free Software Foundation, Inc.
3
4 timestamp='2020-01-01'
2 # Copyright 1992-2018 Free Software Foundation, Inc.
3
4 timestamp='2018-08-29'
55
66 # This file is free software; you can redistribute it and/or modify it
77 # under the terms of the GNU General Public License as published by
6666 version="\
6767 GNU config.sub ($timestamp)
6868
69 Copyright 1992-2020 Free Software Foundation, Inc.
69 Copyright 1992-2018 Free Software Foundation, Inc.
7070
7171 This is free software; see the source for copying conditions. There is NO
7272 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
8888 - ) # Use stdin as input.
8989 break ;;
9090 -* )
91 echo "$me: invalid option $1$help" >&2
91 echo "$me: invalid option $1$help"
9292 exit 1 ;;
9393
9494 *local*)
110110 esac
111111
112112 # Split fields of configuration type
113 # shellcheck disable=SC2162
114 IFS="-" read field1 field2 field3 field4 <<EOF
113 IFS="-" read -r field1 field2 field3 field4 <<EOF
115114 $1
116115 EOF
117116
149148 esac
150149 ;;
151150 *-*)
152 # A lone config we happen to match not fitting any pattern
151 # A lone config we happen to match not fitting any patern
153152 case $field1-$field2 in
154153 decstation-3100)
155154 basic_machine=mips-dec
336335 basic_machine=m88k-harris
337336 os=sysv3
338337 ;;
339 hp300 | hp300hpux)
338 hp300)
340339 basic_machine=m68k-hp
341 os=hpux
342340 ;;
343341 hp300bsd)
344342 basic_machine=m68k-hp
345343 os=bsd
346344 ;;
345 hp300hpux)
346 basic_machine=m68k-hp
347 os=hpux
348 ;;
347349 hppaosf)
348350 basic_machine=hppa1.1-hp
349351 os=osf
356358 basic_machine=i386-mach
357359 os=mach
358360 ;;
361 vsta)
362 basic_machine=i386-pc
363 os=vsta
364 ;;
359365 isi68 | isi)
360366 basic_machine=m68k-isi
361367 os=sysv
603609 vms)
604610 basic_machine=vax-dec
605611 os=vms
606 ;;
607 vsta)
608 basic_machine=i386-pc
609 os=vsta
610612 ;;
611613 vxworks960)
612614 basic_machine=i960-wrs
818820 cpu=m68k
819821 vendor=next
820822 case $os in
821 openstep*)
822 ;;
823 nextstep*)
823 nextstep* )
824824 ;;
825825 ns2*)
826826 os=nextstep2
917917 ;;
918918
919919 *-*)
920 # shellcheck disable=SC2162
921 IFS="-" read cpu vendor <<EOF
920 IFS="-" read -r cpu vendor <<EOF
922921 $basic_machine
923922 EOF
924923 ;;
950949
951950 # Decode basic machines in the full and proper CPU-Company form.
952951 case $cpu-$vendor in
953 # Here we handle the default manufacturer of certain CPU types in canonical form. It is in
952 # Here we handle the default manufacturer of certain CPU types in cannonical form. It is in
954953 # some cases the only manufacturer, in others, it is the most popular.
955954 craynv-unknown)
956955 vendor=cray
11011100 cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
11021101 ;;
11031102
1104 # Recognize the canonical CPU Types that limit and/or modify the
1103 # Recognize the cannonical CPU Types that limit and/or modify the
11051104 # company names they are paired with.
11061105 cr16-*)
11071106 os=${os:-elf}
11501149 ;;
11511150
11521151 *)
1153 # Recognize the canonical CPU types that are allowed with any
1152 # Recognize the cannonical CPU types that are allowed with any
11541153 # company name.
11551154 case $cpu in
11561155 1750a | 580 \
11611160 | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
11621161 | alphapca5[67] | alpha64pca5[67] \
11631162 | am33_2.0 \
1164 | amdgcn \
11651163 | arc | arceb \
11661164 | arm | arm[lb]e | arme[lb] | armv* \
11671165 | avr | avr32 \
11681166 | asmjs \
11691167 | ba \
11701168 | be32 | be64 \
1171 | bfin | bpf | bs2000 \
1169 | bfin | bs2000 \
11721170 | c[123]* | c30 | [cjt]90 | c4x \
11731171 | c8051 | clipper | craynv | csky | cydra \
11741172 | d10v | d30v | dlx | dsp16xx \
11831181 | le32 | le64 \
11841182 | lm32 \
11851183 | m32c | m32r | m32rle \
1186 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
1187 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
1184 | m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k | v70 | w65 \
1185 | m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip \
11881186 | m88110 | m88k | maxq | mb | mcore | mep | metag \
11891187 | microblaze | microblazeel \
11901188 | mips | mipsbe | mipseb | mipsel | mipsle \
11911189 | mips16 \
1192 | mips64 | mips64eb | mips64el \
1190 | mips64 | mips64el \
11931191 | mips64octeon | mips64octeonel \
11941192 | mips64orion | mips64orionel \
11951193 | mips64r5900 | mips64r5900el \
12161214 | nds32 | nds32le | nds32be \
12171215 | nfp \
12181216 | nios | nios2 | nios2eb | nios2el \
1219 | none | np1 | ns16k | ns32k | nvptx \
1217 | none | np1 | ns16k | ns32k \
12201218 | open8 \
12211219 | or1k* \
12221220 | or32 \
12231221 | orion \
1224 | picochip \
12251222 | pdp10 | pdp11 | pj | pjl | pn | power \
12261223 | powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
12271224 | pru \
12291226 | riscv | riscv32 | riscv64 \
12301227 | rl78 | romp | rs6000 | rx \
12311228 | score \
1232 | sh | shl \
1233 | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
1229 | sh | sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
12341230 | sh[1234]e[lb] | sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
12351231 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
12361232 | sparclite \
12401236 | tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
12411237 | tron \
12421238 | ubicom32 \
1243 | v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
1239 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
12441240 | vax \
12451241 | visium \
1246 | w65 \
1247 | wasm32 | wasm64 \
1242 | wasm32 \
12481243 | we32k \
12491244 | x86 | x86_64 | xc16x | xgate | xps100 \
12501245 | xstormy16 | xtensa* \
13421337 | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
13431338 | sym* | kopensolaris* | plan9* \
13441339 | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
1345 | aos* | aros* | cloudabi* | sortix* | twizzler* \
1340 | aos* | aros* | cloudabi* | sortix* \
13461341 | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
13471342 | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
13481343 | knetbsd* | mirbsd* | netbsd* \
1349 | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
1344 | bitrig* | openbsd* | solidbsd* | libertybsd* \
13501345 | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
13511346 | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
13521347 | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
13641359 | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
13651360 | skyos* | haiku* | rdos* | toppers* | drops* | es* \
13661361 | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
1367 | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
1368 | nsk* | powerunix)
1362 | midnightbsd*)
13691363 # Remember, each alternative MUST END IN *, to match a version number.
13701364 ;;
13711365 qnx*)
14481442 ;;
14491443 ns2)
14501444 os=nextstep2
1445 ;;
1446 nsk*)
1447 os=nsk
14511448 ;;
14521449 # Preserve the version number of sinix5.
14531450 sinix5.*)
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1999-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1999-2018 Free Software Foundation, Inc.
66
77 # This program is free software; you can redistribute it and/or modify
88 # it under the terms of the GNU General Public License as published by
450450 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
451451
452452 # Copy the file name to the temp name.
453 (umask $cp_umask &&
454 { test -z "$stripcmd" || {
455 # Create $dsttmp read-write so that cp doesn't create it read-only,
456 # which would cause strip to fail.
457 if test -z "$doit"; then
458 : >"$dsttmp" # No need to fork-exec 'touch'.
459 else
460 $doit touch "$dsttmp"
461 fi
462 }
463 } &&
464 $doit_exec $cpprog "$src" "$dsttmp") &&
453 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
465454
466455 # and set any options; do chmod last to preserve setuid bits.
467456 #
00 #! /bin/sh
11 ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
2 ## by inline-source v2018-07-24.06
3
4 # libtool (GNU libtool) 2.4.6.42-b88ce-dirty
2 ## by inline-source v2014-01-03.01
3
4 # libtool (GNU libtool) 2.4.6
55 # Provide generalized library-building support services.
66 # Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
77
8 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
8 # Copyright (C) 1996-2015 Free Software Foundation, Inc.
99 # This is free software; see the source for copying conditions. There is NO
1010 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1111
3030
3131 PROGRAM=libtool
3232 PACKAGE=libtool
33 VERSION=2.4.6.42-b88ce-dirty
34 package_revision=2.4.6.42
33 VERSION=2.4.6
34 package_revision=2.4.6
3535
3636
3737 ## ------ ##
6363 # libraries, which are installed to $pkgauxdir.
6464
6565 # Set a version string for this script.
66 scriptversion=2018-07-24.06; # UTC
66 scriptversion=2015-01-20.17; # UTC
6767
6868 # General shell script boiler plate, and helper functions.
6969 # Written by Gary V. Vaughan, 2004
7070
71 # This is free software. There is NO warranty; not even for
72 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
73 #
74 # Copyright (C) 2004-2018 Bootstrap Authors
75 #
76 # This file is dual licensed under the terms of the MIT license
77 # <https://opensource.org/license/MIT>, and GPL version 3 or later
78 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
79 # these licenses when using or redistributing this software or any of
80 # the files within it. See the URLs above, or the file `LICENSE`
81 # included in the Bootstrap distribution for the full license texts.
82
83 # Please report bugs or propose patches to:
84 # <https://github.com/gnulib-modules/bootstrap/issues>
71 # Copyright (C) 2004-2015 Free Software Foundation, Inc.
72 # This is free software; see the source for copying conditions. There is NO
73 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
74
75 # This program is free software; you can redistribute it and/or modify
76 # it under the terms of the GNU General Public License as published by
77 # the Free Software Foundation; either version 3 of the License, or
78 # (at your option) any later version.
79
80 # As a special exception to the GNU General Public License, if you distribute
81 # this file as part of a program or library that is built using GNU Libtool,
82 # you may include this file under the same distribution terms that you use
83 # for the rest of that program.
84
85 # This program is distributed in the hope that it will be useful,
86 # but WITHOUT ANY WARRANTY; without even the implied warranty of
87 # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU
88 # General Public License for more details.
89
90 # You should have received a copy of the GNU General Public License
91 # along with this program. If not, see <http://www.gnu.org/licenses/>.
92
93 # Please report bugs or propose patches to gary@gnu.org.
8594
8695
8796 ## ------ ##
130139 fi"
131140 done
132141
142 # CDPATH.
143 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
144
133145 # Make sure IFS has a sensible default
134146 sp=' '
135147 nl='
145157 }
146158 fi
147159
148
149 # func_unset VAR
150 # --------------
151 # Portably unset VAR.
152 # In some shells, an 'unset VAR' statement leaves a non-zero return
153 # status if VAR is already unset, which might be problematic if the
154 # statement is used at the end of a function (thus poisoning its return
155 # value) or when 'set -e' is active (causing even a spurious abort of
156 # the script in this case).
157 func_unset ()
158 {
159 { eval $1=; (eval unset $1) >/dev/null 2>&1 && eval unset $1 || : ; }
160 }
161
162
163 # Make sure CDPATH doesn't cause `cd` commands to output the target dir.
164 func_unset CDPATH
165
166 # Make sure ${,E,F}GREP behave sanely.
167 func_unset GREP_OPTIONS
168160
169161
170162 ## ------------------------- ##
266258 rm -f conftest.in conftest.tmp conftest.nl conftest.out
267259 }
268260
269 func_path_progs "sed gsed" func_check_prog_sed "$PATH:/usr/xpg4/bin"
261 func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin
270262 rm -f conftest.sed
271263 SED=$func_path_progs_result
272264 }
302294 rm -f conftest.in conftest.tmp conftest.nl conftest.out
303295 }
304296
305 func_path_progs "grep ggrep" func_check_prog_grep "$PATH:/usr/xpg4/bin"
297 func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin
306298 GREP=$func_path_progs_result
307299 }
308300
587579 {
588580 $debug_cmd
589581
590 func_quote_arg pretty "$2"
591 eval "$1+=\\ \$func_quote_arg_result"
582 func_quote_for_eval "$2"
583 eval "$1+=\\ \$func_quote_for_eval_result"
592584 }'
593585 else
594586 func_append_quoted ()
595587 {
596588 $debug_cmd
597589
598 func_quote_arg pretty "$2"
599 eval "$1=\$$1\\ \$func_quote_arg_result"
590 func_quote_for_eval "$2"
591 eval "$1=\$$1\\ \$func_quote_for_eval_result"
600592 }
601593 fi
602594
10981090 }
10991091
11001092
1101 # func_quote_portable EVAL ARG
1102 # ----------------------------
1103 # Internal function to portably implement func_quote_arg. Note that we still
1104 # keep attention to performance here so we as much as possible try to avoid
1105 # calling sed binary (so far O(N) complexity as long as func_append is O(1)).
1106 func_quote_portable ()
1093 # func_quote_for_eval ARG...
1094 # --------------------------
1095 # Aesthetically quote ARGs to be evaled later.
1096 # This function returns two values:
1097 # i) func_quote_for_eval_result
1098 # double-quoted, suitable for a subsequent eval
1099 # ii) func_quote_for_eval_unquoted_result
1100 # has all characters that are still active within double
1101 # quotes backslashified.
1102 func_quote_for_eval ()
11071103 {
11081104 $debug_cmd
11091105
1110 func_quote_portable_result=$2
1111
1112 # one-time-loop (easy break)
1113 while true
1114 do
1115 if $1; then
1116 func_quote_portable_result=`$ECHO "$2" | $SED \
1117 -e "$sed_double_quote_subst" -e "$sed_double_backslash"`
1118 break
1106 func_quote_for_eval_unquoted_result=
1107 func_quote_for_eval_result=
1108 while test 0 -lt $#; do
1109 case $1 in
1110 *[\\\`\"\$]*)
1111 _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;;
1112 *)
1113 _G_unquoted_arg=$1 ;;
1114 esac
1115 if test -n "$func_quote_for_eval_unquoted_result"; then
1116 func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg"
1117 else
1118 func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg"
11191119 fi
11201120
1121 # Quote for eval.
1122 case $func_quote_portable_result in
1123 *[\\\`\"\$]*)
1124 case $func_quote_portable_result in
1125 *[\[\*\?]*)
1126 func_quote_portable_result=`$ECHO "$func_quote_portable_result" \
1127 | $SED "$sed_quote_subst"`
1128 break
1129 ;;
1130 esac
1131
1132 func_quote_portable_old_IFS=$IFS
1133 for _G_char in '\' '`' '"' '$'
1134 do
1135 # STATE($1) PREV($2) SEPARATOR($3)
1136 set start "" ""
1137 func_quote_portable_result=dummy"$_G_char$func_quote_portable_result$_G_char"dummy
1138 IFS=$_G_char
1139 for _G_part in $func_quote_portable_result
1140 do
1141 case $1 in
1142 quote)
1143 func_append func_quote_portable_result "$3$2"
1144 set quote "$_G_part" "\\$_G_char"
1145 ;;
1146 start)
1147 set first "" ""
1148 func_quote_portable_result=
1149 ;;
1150 first)
1151 set quote "$_G_part" ""
1152 ;;
1153 esac
1154 done
1155 done
1156 IFS=$func_quote_portable_old_IFS
1157 ;;
1158 *) ;;
1159 esac
1160 break
1161 done
1162
1163 func_quote_portable_unquoted_result=$func_quote_portable_result
1164 case $func_quote_portable_result in
1165 # double-quote args containing shell metacharacters to delay
1166 # word splitting, command substitution and variable expansion
1167 # for a subsequent eval.
1168 # many bourne shells cannot handle close brackets correctly
1169 # in scan sets, so we specify it separately.
1170 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1171 func_quote_portable_result=\"$func_quote_portable_result\"
1172 ;;
1173 esac
1174 }
1175
1176
1177 # func_quotefast_eval ARG
1178 # -----------------------
1179 # Quote one ARG (internal). This is equivalent to 'func_quote_arg eval ARG',
1180 # but optimized for speed. Result is stored in $func_quotefast_eval.
1181 if test xyes = `(x=; printf -v x %q yes; echo x"$x") 2>/dev/null`; then
1182 printf -v _GL_test_printf_tilde %q '~'
1183 if test '\~' = "$_GL_test_printf_tilde"; then
1184 func_quotefast_eval ()
1185 {
1186 printf -v func_quotefast_eval_result %q "$1"
1187 }
1188 else
1189 # Broken older Bash implementations. Make those faster too if possible.
1190 func_quotefast_eval ()
1191 {
1192 case $1 in
1193 '~'*)
1194 func_quote_portable false "$1"
1195 func_quotefast_eval_result=$func_quote_portable_result
1121 case $_G_unquoted_arg in
1122 # Double-quote args containing shell metacharacters to delay
1123 # word splitting, command substitution and variable expansion
1124 # for a subsequent eval.
1125 # Many Bourne shells cannot handle close brackets correctly
1126 # in scan sets, so we specify it separately.
1127 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1128 _G_quoted_arg=\"$_G_unquoted_arg\"
11961129 ;;
11971130 *)
1198 printf -v func_quotefast_eval_result %q "$1"
1199 ;;
1131 _G_quoted_arg=$_G_unquoted_arg
1132 ;;
12001133 esac
1201 }
1202 fi
1203 else
1204 func_quotefast_eval ()
1205 {
1206 func_quote_portable false "$1"
1207 func_quotefast_eval_result=$func_quote_portable_result
1208 }
1209 fi
1210
1211
1212 # func_quote_arg MODEs ARG
1213 # ------------------------
1214 # Quote one ARG to be evaled later. MODEs argument may contain zero or more
1215 # specifiers listed below separated by ',' character. This function returns two
1216 # values:
1217 # i) func_quote_arg_result
1218 # double-quoted (when needed), suitable for a subsequent eval
1219 # ii) func_quote_arg_unquoted_result
1220 # has all characters that are still active within double
1221 # quotes backslashified. Available only if 'unquoted' is specified.
1222 #
1223 # Available modes:
1224 # ----------------
1225 # 'eval' (default)
1226 # - escape shell special characters
1227 # 'expand'
1228 # - the same as 'eval'; but do not quote variable references
1229 # 'pretty'
1230 # - request aesthetic output, i.e. '"a b"' instead of 'a\ b'. This might
1231 # be used later in func_quote to get output like: 'echo "a b"' instead
1232 # of 'echo a\ b'. This is slower than default on some shells.
1233 # 'unquoted'
1234 # - produce also $func_quote_arg_unquoted_result which does not contain
1235 # wrapping double-quotes.
1236 #
1237 # Examples for 'func_quote_arg pretty,unquoted string':
1238 #
1239 # string | *_result | *_unquoted_result
1240 # ------------+-----------------------+-------------------
1241 # " | \" | \"
1242 # a b | "a b" | a b
1243 # "a b" | "\"a b\"" | \"a b\"
1244 # * | "*" | *
1245 # z="${x-$y}" | "z=\"\${x-\$y}\"" | z=\"\${x-\$y}\"
1246 #
1247 # Examples for 'func_quote_arg pretty,unquoted,expand string':
1248 #
1249 # string | *_result | *_unquoted_result
1250 # --------------+---------------------+--------------------
1251 # z="${x-$y}" | "z=\"${x-$y}\"" | z=\"${x-$y}\"
1252 func_quote_arg ()
1253 {
1254 _G_quote_expand=false
1255 case ,$1, in
1256 *,expand,*)
1257 _G_quote_expand=:
1258 ;;
1259 esac
1260
1261 case ,$1, in
1262 *,pretty,*|*,expand,*|*,unquoted,*)
1263 func_quote_portable $_G_quote_expand "$2"
1264 func_quote_arg_result=$func_quote_portable_result
1265 func_quote_arg_unquoted_result=$func_quote_portable_unquoted_result
1266 ;;
1267 *)
1268 # Faster quote-for-eval for some shells.
1269 func_quotefast_eval "$2"
1270 func_quote_arg_result=$func_quotefast_eval_result
1271 ;;
1272 esac
1273 }
1274
1275
1276 # func_quote MODEs ARGs...
1277 # ------------------------
1278 # Quote all ARGs to be evaled later and join them into single command. See
1279 # func_quote_arg's description for more info.
1280 func_quote ()
1281 {
1282 $debug_cmd
1283 _G_func_quote_mode=$1 ; shift
1284 func_quote_result=
1285 while test 0 -lt $#; do
1286 func_quote_arg "$_G_func_quote_mode" "$1"
1287 if test -n "$func_quote_result"; then
1288 func_append func_quote_result " $func_quote_arg_result"
1134
1135 if test -n "$func_quote_for_eval_result"; then
1136 func_append func_quote_for_eval_result " $_G_quoted_arg"
12891137 else
1290 func_append func_quote_result "$func_quote_arg_result"
1138 func_append func_quote_for_eval_result "$_G_quoted_arg"
12911139 fi
12921140 shift
12931141 done
1142 }
1143
1144
1145 # func_quote_for_expand ARG
1146 # -------------------------
1147 # Aesthetically quote ARG to be evaled later; same as above,
1148 # but do not quote variable references.
1149 func_quote_for_expand ()
1150 {
1151 $debug_cmd
1152
1153 case $1 in
1154 *[\\\`\"]*)
1155 _G_arg=`$ECHO "$1" | $SED \
1156 -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;;
1157 *)
1158 _G_arg=$1 ;;
1159 esac
1160
1161 case $_G_arg in
1162 # Double-quote args containing shell metacharacters to delay
1163 # word splitting and command substitution for a subsequent eval.
1164 # Many Bourne shells cannot handle close brackets correctly
1165 # in scan sets, so we specify it separately.
1166 *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1167 _G_arg=\"$_G_arg\"
1168 ;;
1169 esac
1170
1171 func_quote_for_expand_result=$_G_arg
12941172 }
12951173
12961174
13361214 _G_cmd=$1
13371215 _G_fail_exp=${2-':'}
13381216
1339 func_quote_arg pretty,expand "$_G_cmd"
1340 eval "func_notquiet $func_quote_arg_result"
1217 func_quote_for_expand "$_G_cmd"
1218 eval "func_notquiet $func_quote_for_expand_result"
13411219
13421220 $opt_dry_run || {
13431221 eval "$_G_cmd"
13621240 _G_fail_exp=${2-':'}
13631241
13641242 $opt_quiet || {
1365 func_quote_arg expand,pretty "$_G_cmd"
1366 eval "func_echo $func_quote_arg_result"
1243 func_quote_for_expand "$_G_cmd"
1244 eval "func_echo $func_quote_for_expand_result"
13671245 }
13681246
13691247 $opt_dry_run || {
14901368 # End:
14911369 #! /bin/sh
14921370
1371 # Set a version string for this script.
1372 scriptversion=2014-01-07.03; # UTC
1373
14931374 # A portable, pluggable option parser for Bourne shell.
14941375 # Written by Gary V. Vaughan, 2010
14951376
1496 # This is free software. There is NO warranty; not even for
1497 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1498 #
1499 # Copyright (C) 2010-2018 Bootstrap Authors
1500 #
1501 # This file is dual licensed under the terms of the MIT license
1502 # <https://opensource.org/license/MIT>, and GPL version 3 or later
1503 # <http://www.gnu.org/licenses/gpl-2.0.html>. You must apply one of
1504 # these licenses when using or redistributing this software or any of
1505 # the files within it. See the URLs above, or the file `LICENSE`
1506 # included in the Bootstrap distribution for the full license texts.
1507
1508 # Please report bugs or propose patches to:
1509 # <https://github.com/gnulib-modules/bootstrap/issues>
1510
1511 # Set a version string for this script.
1512 scriptversion=2018-07-24.06; # UTC
1377 # Copyright (C) 2010-2015 Free Software Foundation, Inc.
1378 # This is free software; see the source for copying conditions. There is NO
1379 # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1380
1381 # This program is free software: you can redistribute it and/or modify
1382 # it under the terms of the GNU General Public License as published by
1383 # the Free Software Foundation, either version 3 of the License, or
1384 # (at your option) any later version.
1385
1386 # This program is distributed in the hope that it will be useful,
1387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
1388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1389 # GNU General Public License for more details.
1390
1391 # You should have received a copy of the GNU General Public License
1392 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1393
1394 # Please report bugs or propose patches to gary@gnu.org.
15131395
15141396
15151397 ## ------ ##
15321414 #
15331415 # In order for the '--version' option to work, you will need to have a
15341416 # suitably formatted comment like the one at the top of this file
1535 # starting with '# Written by ' and ending with '# Copyright'.
1417 # starting with '# Written by ' and ending with '# warranty; '.
15361418 #
15371419 # For '-h' and '--help' to work, you will also need a one line
15381420 # description of your script's purpose in a comment directly above the
15441426 # to display verbose messages only when your user has specified
15451427 # '--verbose'.
15461428 #
1547 # After sourcing this file, you can plug in processing for additional
1429 # After sourcing this file, you can plug processing for additional
15481430 # options by amending the variables from the 'Configuration' section
15491431 # below, and following the instructions in the 'Option parsing'
15501432 # section further down.
15931475 ## ------------------------- ##
15941476
15951477 # This section contains functions for adding, removing, and running hooks
1596 # in the main code. A hook is just a list of function names that can be
1597 # run in order later on.
1478 # to the main code. A hook is just a named list of of function, that can
1479 # be run in order later on.
15981480
15991481 # func_hookable FUNC_NAME
16001482 # -----------------------
16271509
16281510 # func_remove_hook FUNC_NAME HOOK_FUNC
16291511 # ------------------------------------
1630 # Remove HOOK_FUNC from the list of hook functions to be called by
1631 # FUNC_NAME.
1512 # Remove HOOK_FUNC from the list of functions called by FUNC_NAME.
16321513 func_remove_hook ()
16331514 {
16341515 $debug_cmd
16351516
16361517 eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`'
1637 }
1638
1639
1640 # func_propagate_result FUNC_NAME_A FUNC_NAME_B
1641 # ---------------------------------------------
1642 # If the *_result variable of FUNC_NAME_A _is set_, assign its value to
1643 # *_result variable of FUNC_NAME_B.
1644 func_propagate_result ()
1645 {
1646 $debug_cmd
1647
1648 func_propagate_result_result=:
1649 if eval "test \"\${${1}_result+set}\" = set"
1650 then
1651 eval "${2}_result=\$${1}_result"
1652 else
1653 func_propagate_result_result=false
1654 fi
16551518 }
16561519
16571520
16581521 # func_run_hooks FUNC_NAME [ARG]...
16591522 # ---------------------------------
16601523 # Run all hook functions registered to FUNC_NAME.
1661 # It's assumed that the list of hook functions contains nothing more
1524 # It is assumed that the list of hook functions contains nothing more
16621525 # than a whitespace-delimited list of legal shell function names, and
16631526 # no effort is wasted trying to catch shell meta-characters or preserve
16641527 # whitespace.
16681531
16691532 case " $hookable_fns " in
16701533 *" $1 "*) ;;
1671 *) func_fatal_error "'$1' does not support hook functions." ;;
1534 *) func_fatal_error "'$1' does not support hook funcions.n" ;;
16721535 esac
16731536
16741537 eval _G_hook_fns=\$$1_hooks; shift
16751538
16761539 for _G_hook in $_G_hook_fns; do
1677 func_unset "${_G_hook}_result"
1678 eval $_G_hook '${1+"$@"}'
1679 func_propagate_result $_G_hook func_run_hooks
1680 if $func_propagate_result_result; then
1681 eval set dummy "$func_run_hooks_result"; shift
1682 fi
1540 eval $_G_hook '"$@"'
1541
1542 # store returned options list back into positional
1543 # parameters for next 'cmd' execution.
1544 eval _G_hook_result=\$${_G_hook}_result
1545 eval set dummy "$_G_hook_result"; shift
16831546 done
1547
1548 func_quote_for_eval ${1+"$@"}
1549 func_run_hooks_result=$func_quote_for_eval_result
16841550 }
16851551
16861552
16901556 ## --------------- ##
16911557
16921558 # In order to add your own option parsing hooks, you must accept the
1693 # full positional parameter list from your hook function. You may remove
1694 # or edit any options that you action, and then pass back the remaining
1695 # unprocessed options in '<hooked_function_name>_result', escaped
1696 # suitably for 'eval'.
1697 #
1698 # The '<hooked_function_name>_result' variable is automatically unset
1699 # before your hook gets called; for best performance, only set the
1700 # *_result variable when necessary (i.e. don't call the 'func_quote'
1701 # function unnecessarily because it can be an expensive operation on some
1702 # machines).
1703 #
1704 # Like this:
1559 # full positional parameter list in your hook function, remove any
1560 # options that you action, and then pass back the remaining unprocessed
1561 # options in '<hooked_function_name>_result', escaped suitably for
1562 # 'eval'. Like this:
17051563 #
17061564 # my_options_prep ()
17071565 # {
17111569 # usage_message=$usage_message'
17121570 # -s, --silent don'\''t print informational messages
17131571 # '
1714 # # No change in '$@' (ignored completely by this hook). Leave
1715 # # my_options_prep_result variable intact.
1572 #
1573 # func_quote_for_eval ${1+"$@"}
1574 # my_options_prep_result=$func_quote_for_eval_result
17161575 # }
17171576 # func_add_hook func_options_prep my_options_prep
17181577 #
17211580 # {
17221581 # $debug_cmd
17231582 #
1724 # args_changed=false
1725 #
1726 # # Note that, for efficiency, we parse as many options as we can
1583 # # Note that for efficiency, we parse as many options as we can
17271584 # # recognise in a loop before passing the remainder back to the
17281585 # # caller on the first unrecognised argument we encounter.
17291586 # while test $# -gt 0; do
17301587 # opt=$1; shift
17311588 # case $opt in
1732 # --silent|-s) opt_silent=:
1733 # args_changed=:
1734 # ;;
1589 # --silent|-s) opt_silent=: ;;
17351590 # # Separate non-argument short options:
17361591 # -s*) func_split_short_opt "$_G_opt"
17371592 # set dummy "$func_split_short_opt_name" \
17381593 # "-$func_split_short_opt_arg" ${1+"$@"}
17391594 # shift
1740 # args_changed=:
17411595 # ;;
1742 # *) # Make sure the first unrecognised option "$_G_opt"
1743 # # is added back to "$@" in case we need it later,
1744 # # if $args_changed was set to 'true'.
1745 # set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
1596 # *) set dummy "$_G_opt" "$*"; shift; break ;;
17461597 # esac
17471598 # done
17481599 #
1749 # # Only call 'func_quote' here if we processed at least one argument.
1750 # if $args_changed; then
1751 # func_quote eval ${1+"$@"}
1752 # my_silent_option_result=$func_quote_result
1753 # fi
1600 # func_quote_for_eval ${1+"$@"}
1601 # my_silent_option_result=$func_quote_for_eval_result
17541602 # }
17551603 # func_add_hook func_parse_options my_silent_option
17561604 #
17611609 #
17621610 # $opt_silent && $opt_verbose && func_fatal_help "\
17631611 # '--silent' and '--verbose' options are mutually exclusive."
1612 #
1613 # func_quote_for_eval ${1+"$@"}
1614 # my_option_validation_result=$func_quote_for_eval_result
17641615 # }
17651616 # func_add_hook func_validate_options my_option_validation
17661617 #
1767 # You'll also need to manually amend $usage_message to reflect the extra
1618 # You'll alse need to manually amend $usage_message to reflect the extra
17681619 # options you parse. It's preferable to append if you can, so that
17691620 # multiple option parsing hooks can be added safely.
1770
1771
1772 # func_options_finish [ARG]...
1773 # ----------------------------
1774 # Finishing the option parse loop (call 'func_options' hooks ATM).
1775 func_options_finish ()
1776 {
1777 $debug_cmd
1778
1779 func_run_hooks func_options ${1+"$@"}
1780 func_propagate_result func_run_hooks func_options_finish
1781 }
17821621
17831622
17841623 # func_options [ARG]...
17901629 {
17911630 $debug_cmd
17921631
1793 _G_options_quoted=false
1794
1795 for my_func in options_prep parse_options validate_options options_finish
1796 do
1797 func_unset func_${my_func}_result
1798 func_unset func_run_hooks_result
1799 eval func_$my_func '${1+"$@"}'
1800 func_propagate_result func_$my_func func_options
1801 if $func_propagate_result_result; then
1802 eval set dummy "$func_options_result"; shift
1803 _G_options_quoted=:
1804 fi
1805 done
1806
1807 $_G_options_quoted || {
1808 # As we (func_options) are top-level options-parser function and
1809 # nobody quoted "$@" for us yet, we need to do it explicitly for
1810 # caller.
1811 func_quote eval ${1+"$@"}
1812 func_options_result=$func_quote_result
1813 }
1632 func_options_prep ${1+"$@"}
1633 eval func_parse_options \
1634 ${func_options_prep_result+"$func_options_prep_result"}
1635 eval func_validate_options \
1636 ${func_parse_options_result+"$func_parse_options_result"}
1637
1638 eval func_run_hooks func_options \
1639 ${func_validate_options_result+"$func_validate_options_result"}
1640
1641 # save modified positional parameters for caller
1642 func_options_result=$func_run_hooks_result
18141643 }
18151644
18161645
18191648 # All initialisations required before starting the option parse loop.
18201649 # Note that when calling hook functions, we pass through the list of
18211650 # positional parameters. If a hook function modifies that list, and
1822 # needs to propagate that back to rest of this script, then the complete
1823 # modified list must be put in 'func_run_hooks_result' before returning.
1651 # needs to propogate that back to rest of this script, then the complete
1652 # modified list must be put in 'func_run_hooks_result' before
1653 # returning.
18241654 func_hookable func_options_prep
18251655 func_options_prep ()
18261656 {
18311661 opt_warning_types=
18321662
18331663 func_run_hooks func_options_prep ${1+"$@"}
1834 func_propagate_result func_run_hooks func_options_prep
1664
1665 # save modified positional parameters for caller
1666 func_options_prep_result=$func_run_hooks_result
18351667 }
18361668
18371669
18431675 {
18441676 $debug_cmd
18451677
1846 _G_parse_options_requote=false
1678 func_parse_options_result=
1679
18471680 # this just eases exit handling
18481681 while test $# -gt 0; do
18491682 # Defer to hook functions for initial option parsing, so they
18501683 # get priority in the event of reusing an option name.
18511684 func_run_hooks func_parse_options ${1+"$@"}
1852 func_propagate_result func_run_hooks func_parse_options
1853 if $func_propagate_result_result; then
1854 eval set dummy "$func_parse_options_result"; shift
1855 # Even though we may have changed "$@", we passed the "$@" array
1856 # down into the hook and it quoted it for us (because we are in
1857 # this if-branch). No need to quote it again.
1858 _G_parse_options_requote=false
1859 fi
1685
1686 # Adjust func_parse_options positional parameters to match
1687 eval set dummy "$func_run_hooks_result"; shift
18601688
18611689 # Break out of the loop if we already parsed every option.
18621690 test $# -gt 0 || break
18631691
1864 # We expect that one of the options parsed in this function matches
1865 # and thus we remove _G_opt from "$@" and need to re-quote.
1866 _G_match_parse_options=:
18671692 _G_opt=$1
18681693 shift
18691694 case $_G_opt in
18701695 --debug|-x) debug_cmd='set -x'
1871 func_echo "enabling shell trace mode" >&2
1696 func_echo "enabling shell trace mode"
18721697 $debug_cmd
18731698 ;;
18741699
18781703 ;;
18791704
18801705 --warnings|--warning|-W)
1881 if test $# = 0 && func_missing_arg $_G_opt; then
1882 _G_parse_options_requote=:
1883 break
1884 fi
1706 test $# = 0 && func_missing_arg $_G_opt && break
18851707 case " $warning_categories $1" in
18861708 *" $1 "*)
18871709 # trailing space prevents matching last $1 above
19341756 shift
19351757 ;;
19361758
1937 --) _G_parse_options_requote=: ; break ;;
1759 --) break ;;
19381760 -*) func_fatal_help "unrecognised option: '$_G_opt'" ;;
1939 *) set dummy "$_G_opt" ${1+"$@"}; shift
1940 _G_match_parse_options=false
1941 break
1942 ;;
1761 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
19431762 esac
1944
1945 if $_G_match_parse_options; then
1946 _G_parse_options_requote=:
1947 fi
19481763 done
19491764
1950 if $_G_parse_options_requote; then
1951 # save modified positional parameters for caller
1952 func_quote eval ${1+"$@"}
1953 func_parse_options_result=$func_quote_result
1954 fi
1765 # save modified positional parameters for caller
1766 func_quote_for_eval ${1+"$@"}
1767 func_parse_options_result=$func_quote_for_eval_result
19551768 }
19561769
19571770
19681781 test -n "$opt_warning_types" || opt_warning_types=" $warning_categories"
19691782
19701783 func_run_hooks func_validate_options ${1+"$@"}
1971 func_propagate_result func_run_hooks func_validate_options
19721784
19731785 # Bail if the options were screwed!
19741786 $exit_cmd $EXIT_FAILURE
1787
1788 # save modified positional parameters for caller
1789 func_validate_options_result=$func_run_hooks_result
19751790 }
19761791
19771792
20271842
20281843 # func_split_equals STRING
20291844 # ------------------------
2030 # Set func_split_equals_lhs and func_split_equals_rhs shell variables
2031 # after splitting STRING at the '=' sign.
1845 # Set func_split_equals_lhs and func_split_equals_rhs shell variables after
1846 # splitting STRING at the '=' sign.
20321847 test -z "$_G_HAVE_XSI_OPS" \
20331848 && (eval 'x=a/b/c;
20341849 test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \
20431858
20441859 func_split_equals_lhs=${1%%=*}
20451860 func_split_equals_rhs=${1#*=}
2046 if test "x$func_split_equals_lhs" = "x$1"; then
2047 func_split_equals_rhs=
2048 fi
1861 test "x$func_split_equals_lhs" = "x$1" \
1862 && func_split_equals_rhs=
20491863 }'
20501864 else
20511865 # ...otherwise fall back to using expr, which is often a shell builtin.
21231937 # func_version
21241938 # ------------
21251939 # Echo version message to standard output and exit.
2126 # The version message is extracted from the calling file's header
2127 # comments, with leading '# ' stripped:
2128 # 1. First display the progname and version
2129 # 2. Followed by the header comment line matching /^# Written by /
2130 # 3. Then a blank line followed by the first following line matching
2131 # /^# Copyright /
2132 # 4. Immediately followed by any lines between the previous matches,
2133 # except lines preceding the intervening completely blank line.
2134 # For example, see the header comments of this file.
21351940 func_version ()
21361941 {
21371942 $debug_cmd
21381943
21391944 printf '%s\n' "$progname $scriptversion"
21401945 $SED -n '
2141 /^# Written by /!b
2142 s|^# ||; p; n
2143
2144 :fwd2blnk
2145 /./ {
2146 n
2147 b fwd2blnk
1946 /(C)/!b go
1947 :more
1948 /\./!{
1949 N
1950 s|\n# | |
1951 b more
21481952 }
2149 p; n
2150
2151 :holdwrnt
2152 s|^# ||
2153 s|^# *$||
2154 /^Copyright /!{
2155 /./H
2156 n
2157 b holdwrnt
1953 :go
1954 /^# Written by /,/# warranty; / {
1955 s|^# ||
1956 s|^# *$||
1957 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
1958 p
21581959 }
2159
2160 s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2|
2161 G
2162 s|\(\n\)\n*|\1|g
2163 p; q' < "$progpath"
1960 /^# Written by / {
1961 s|^# ||
1962 p
1963 }
1964 /^warranty; /q' < "$progpath"
21641965
21651966 exit $?
21661967 }
21701971 # mode: shell-script
21711972 # sh-indentation: 2
21721973 # eval: (add-hook 'before-save-hook 'time-stamp)
2173 # time-stamp-pattern: "30/scriptversion=%:y-%02m-%02d.%02H; # UTC"
1974 # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC"
21741975 # time-stamp-time-zone: "UTC"
21751976 # End:
21761977
21771978 # Set a version string.
2178 scriptversion='(GNU libtool) 2.4.6.42-b88ce-dirty'
1979 scriptversion='(GNU libtool) 2.4.6'
21791980
21801981
21811982 # func_echo ARG...
22662067 compiler: $LTCC
22672068 compiler flags: $LTCFLAGS
22682069 linker: $LD (gnu? $with_gnu_ld)
2269 version: $progname (GNU libtool) 2.4.6.42-b88ce-dirty
2070 version: $progname (GNU libtool) 2.4.6
22702071 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
22712072 autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
22722073
22732074 Report bugs to <bug-libtool@gnu.org>.
2274 GNU libtool home page: <http://www.gnu.org/s/libtool/>.
2075 GNU libtool home page: <http://www.gnu.org/software/libtool/>.
22752076 General help using GNU software: <http://www.gnu.org/gethelp/>."
22762077 exit 0
22772078 }
24682269 nonopt=
24692270 preserve_args=
24702271
2471 _G_rc_lt_options_prep=:
2472
24732272 # Shorthand for --mode=foo, only valid as the first argument
24742273 case $1 in
24752274 clean|clea|cle|cl)
24932292 uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
24942293 shift; set dummy --mode uninstall ${1+"$@"}; shift
24952294 ;;
2496 *)
2497 _G_rc_lt_options_prep=false
2498 ;;
24992295 esac
25002296
2501 if $_G_rc_lt_options_prep; then
2502 # Pass back the list of options.
2503 func_quote eval ${1+"$@"}
2504 libtool_options_prep_result=$func_quote_result
2505 fi
2297 # Pass back the list of options.
2298 func_quote_for_eval ${1+"$@"}
2299 libtool_options_prep_result=$func_quote_for_eval_result
25062300 }
25072301 func_add_hook func_options_prep libtool_options_prep
25082302
25142308 {
25152309 $debug_cmd
25162310
2517 _G_rc_lt_parse_options=false
2518
25192311 # Perform our own loop to consume as many options as possible in
25202312 # each iteration.
25212313 while test $# -gt 0; do
2522 _G_match_lt_parse_options=:
25232314 _G_opt=$1
25242315 shift
25252316 case $_G_opt in
25942385 func_append preserve_args " $_G_opt"
25952386 ;;
25962387
2597 # An option not handled by this hook function:
2598 *) set dummy "$_G_opt" ${1+"$@"} ; shift
2599 _G_match_lt_parse_options=false
2600 break
2601 ;;
2388 # An option not handled by this hook function:
2389 *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;;
26022390 esac
2603 $_G_match_lt_parse_options && _G_rc_lt_parse_options=:
26042391 done
26052392
2606 if $_G_rc_lt_parse_options; then
2607 # save modified positional parameters for caller
2608 func_quote eval ${1+"$@"}
2609 libtool_parse_options_result=$func_quote_result
2610 fi
2393
2394 # save modified positional parameters for caller
2395 func_quote_for_eval ${1+"$@"}
2396 libtool_parse_options_result=$func_quote_for_eval_result
26112397 }
26122398 func_add_hook func_parse_options libtool_parse_options
26132399
26642450 }
26652451
26662452 # Pass back the unparsed argument list
2667 func_quote eval ${1+"$@"}
2668 libtool_validate_options_result=$func_quote_result
2453 func_quote_for_eval ${1+"$@"}
2454 libtool_validate_options_result=$func_quote_for_eval_result
26692455 }
26702456 func_add_hook func_validate_options libtool_validate_options
26712457
36313417 esac
36323418 done
36333419
3634 func_quote_arg pretty "$libobj"
3635 test "X$libobj" != "X$func_quote_arg_result" \
3420 func_quote_for_eval "$libobj"
3421 test "X$libobj" != "X$func_quote_for_eval_result" \
36363422 && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
36373423 && func_warning "libobj name '$libobj' may not contain shell special characters."
36383424 func_dirname_and_basename "$obj" "/" ""
37053491
37063492 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32
37073493 srcfile=$func_to_tool_file_result
3708 func_quote_arg pretty "$srcfile"
3709 qsrcfile=$func_quote_arg_result
3494 func_quote_for_eval "$srcfile"
3495 qsrcfile=$func_quote_for_eval_result
37103496
37113497 # Only build a PIC object if we are building libtool libraries.
37123498 if test yes = "$build_libtool_libs"; then
43094095 case $nonopt in *shtool*) :;; *) false;; esac
43104096 then
43114097 # Aesthetically quote it.
4312 func_quote_arg pretty "$nonopt"
4313 install_prog="$func_quote_arg_result "
4098 func_quote_for_eval "$nonopt"
4099 install_prog="$func_quote_for_eval_result "
43144100 arg=$1
43154101 shift
43164102 else
43204106
43214107 # The real first argument should be the name of the installation program.
43224108 # Aesthetically quote it.
4323 func_quote_arg pretty "$arg"
4324 func_append install_prog "$func_quote_arg_result"
4109 func_quote_for_eval "$arg"
4110 func_append install_prog "$func_quote_for_eval_result"
43254111 install_shared_prog=$install_prog
43264112 case " $install_prog " in
43274113 *[\\\ /]cp\ *) install_cp=: ;;
43784164 esac
43794165
43804166 # Aesthetically quote the argument.
4381 func_quote_arg pretty "$arg"
4382 func_append install_prog " $func_quote_arg_result"
4167 func_quote_for_eval "$arg"
4168 func_append install_prog " $func_quote_for_eval_result"
43834169 if test -n "$arg2"; then
4384 func_quote_arg pretty "$arg2"
4170 func_quote_for_eval "$arg2"
43854171 fi
4386 func_append install_shared_prog " $func_quote_arg_result"
4172 func_append install_shared_prog " $func_quote_for_eval_result"
43874173 done
43884174
43894175 test -z "$install_prog" && \
43944180
43954181 if test -n "$install_override_mode" && $no_mode; then
43964182 if $install_cp; then :; else
4397 func_quote_arg pretty "$install_override_mode"
4398 func_append install_shared_prog " -m $func_quote_arg_result"
4183 func_quote_for_eval "$install_override_mode"
4184 func_append install_shared_prog " -m $func_quote_for_eval_result"
43994185 fi
44004186 fi
44014187
46914477 relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'`
46924478
46934479 $opt_quiet || {
4694 func_quote_arg expand,pretty "$relink_command"
4695 eval "func_echo $func_quote_arg_result"
4480 func_quote_for_expand "$relink_command"
4481 eval "func_echo $func_quote_for_expand_result"
46964482 }
46974483 if eval "$relink_command"; then :
46984484 else
54715257 if test \"\$libtool_execute_magic\" != \"$magic\"; then
54725258 file=\"\$0\""
54735259
5474 func_quote_arg pretty "$ECHO"
5475 qECHO=$func_quote_arg_result
5260 qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"`
54765261 $ECHO "\
54775262
54785263 # A function that is used when there is no print builtin or printf.
54825267 \$1
54835268 _LTECHO_EOF'
54845269 }
5485 ECHO=$qECHO
5270 ECHO=\"$qECHO\"
54865271 fi
54875272
54885273 # Very basic option parsing. These options are (a) specific to
68256610 while test "$#" -gt 0; do
68266611 arg=$1
68276612 shift
6828 func_quote_arg pretty,unquoted "$arg"
6829 qarg=$func_quote_arg_unquoted_result
6830 func_append libtool_args " $func_quote_arg_result"
6613 func_quote_for_eval "$arg"
6614 qarg=$func_quote_for_eval_unquoted_result
6615 func_append libtool_args " $func_quote_for_eval_result"
68316616
68326617 # If the previous option needs an argument, assign it.
68336618 if test -n "$prev"; then
74257210 save_ifs=$IFS; IFS=,
74267211 for flag in $args; do
74277212 IFS=$save_ifs
7428 func_quote_arg pretty "$flag"
7429 func_append arg " $func_quote_arg_result"
7430 func_append compiler_flags " $func_quote_arg_result"
7213 func_quote_for_eval "$flag"
7214 func_append arg " $func_quote_for_eval_result"
7215 func_append compiler_flags " $func_quote_for_eval_result"
74317216 done
74327217 IFS=$save_ifs
74337218 func_stripname ' ' '' "$arg"
74417226 save_ifs=$IFS; IFS=,
74427227 for flag in $args; do
74437228 IFS=$save_ifs
7444 func_quote_arg pretty "$flag"
7445 func_append arg " $wl$func_quote_arg_result"
7446 func_append compiler_flags " $wl$func_quote_arg_result"
7447 func_append linker_flags " $func_quote_arg_result"
7229 func_quote_for_eval "$flag"
7230 func_append arg " $wl$func_quote_for_eval_result"
7231 func_append compiler_flags " $wl$func_quote_for_eval_result"
7232 func_append linker_flags " $func_quote_for_eval_result"
74487233 done
74497234 IFS=$save_ifs
74507235 func_stripname ' ' '' "$arg"
74687253
74697254 # -msg_* for osf cc
74707255 -msg_*)
7471 func_quote_arg pretty "$arg"
7472 arg=$func_quote_arg_result
7256 func_quote_for_eval "$arg"
7257 arg=$func_quote_for_eval_result
74737258 ;;
74747259
74757260 # Flags to be passed through unchanged, with rationale:
74887273 # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization
74897274 # -specs=* GCC specs files
74907275 # -stdlib=* select c++ std lib with clang
7491 # -fsanitize=* Clang/GCC memory and address sanitizer
7492 # -fuse-ld=* Linker select flags for GCC
74937276 -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
74947277 -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
74957278 -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \
7496 -specs=*|-fsanitize=*|-fuse-ld=*)
7497 func_quote_arg pretty "$arg"
7498 arg=$func_quote_arg_result
7279 -specs=*)
7280 func_quote_for_eval "$arg"
7281 arg=$func_quote_for_eval_result
74997282 func_append compile_command " $arg"
75007283 func_append finalize_command " $arg"
75017284 func_append compiler_flags " $arg"
75167299 continue
75177300 else
75187301 # Otherwise treat like 'Some other compiler flag' below
7519 func_quote_arg pretty "$arg"
7520 arg=$func_quote_arg_result
7302 func_quote_for_eval "$arg"
7303 arg=$func_quote_for_eval_result
75217304 fi
75227305 ;;
75237306
75247307 # Some other compiler flag.
75257308 -* | +*)
7526 func_quote_arg pretty "$arg"
7527 arg=$func_quote_arg_result
7309 func_quote_for_eval "$arg"
7310 arg=$func_quote_for_eval_result
75287311 ;;
75297312
75307313 *.$objext)
76447427 *)
76457428 # Unknown arguments in both finalize_command and compile_command need
76467429 # to be aesthetically quoted because they are evaled later.
7647 func_quote_arg pretty "$arg"
7648 arg=$func_quote_arg_result
7430 func_quote_for_eval "$arg"
7431 arg=$func_quote_for_eval_result
76497432 ;;
76507433 esac # arg
76517434
101519934 for cmd in $concat_cmds; do
101529935 IFS=$save_ifs
101539936 $opt_quiet || {
10154 func_quote_arg expand,pretty "$cmd"
10155 eval "func_echo $func_quote_arg_result"
9937 func_quote_for_expand "$cmd"
9938 eval "func_echo $func_quote_for_expand_result"
101569939 }
101579940 $opt_dry_run || eval "$cmd" || {
101589941 lt_exit=$?
1024510028 eval cmd=\"$cmd\"
1024610029 IFS=$save_ifs
1024710030 $opt_quiet || {
10248 func_quote_arg expand,pretty "$cmd"
10249 eval "func_echo $func_quote_arg_result"
10031 func_quote_for_expand "$cmd"
10032 eval "func_echo $func_quote_for_expand_result"
1025010033 }
1025110034 $opt_dry_run || eval "$cmd" || {
1025210035 lt_exit=$?
1072010503 elif eval var_value=\$$var; test -z "$var_value"; then
1072110504 relink_command="$var=; export $var; $relink_command"
1072210505 else
10723 func_quote_arg pretty "$var_value"
10724 relink_command="$var=$func_quote_arg_result; export $var; $relink_command"
10506 func_quote_for_eval "$var_value"
10507 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
1072510508 fi
1072610509 done
10727 func_quote eval cd "`pwd`"
10728 func_quote_arg pretty,unquoted "($func_quote_result; $relink_command)"
10729 relink_command=$func_quote_arg_unquoted_result
10510 relink_command="(cd `pwd`; $relink_command)"
10511 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
1073010512 fi
1073110513
1073210514 # Only actually do things if not in dry run mode.
1096610748 elif eval var_value=\$$var; test -z "$var_value"; then
1096710749 relink_command="$var=; export $var; $relink_command"
1096810750 else
10969 func_quote_arg pretty,unquoted "$var_value"
10970 relink_command="$var=$func_quote_arg_unquoted_result; export $var; $relink_command"
10751 func_quote_for_eval "$var_value"
10752 relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
1097110753 fi
1097210754 done
1097310755 # Quote the link command for shipping.
10974 func_quote eval cd "`pwd`"
10975 relink_command="($func_quote_result; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10976 func_quote_arg pretty,unquoted "$relink_command"
10977 relink_command=$func_quote_arg_unquoted_result
10756 relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
10757 relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"`
1097810758 if test yes = "$hardcode_automatic"; then
1097910759 relink_command=
1098010760 fi
22
33 scriptversion=2018-03-07.03; # UTC
44
5 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
5 # Copyright (C) 1996-2018 Free Software Foundation, Inc.
66 # Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
77
88 # This program is free software; you can redistribute it and/or modify
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.69 for libseccomp 2.5.0.
2 # Generated by GNU Autoconf 2.69 for libseccomp 2.5.1.
33 #
44 #
55 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
586586 # Identity of this package.
587587 PACKAGE_NAME='libseccomp'
588588 PACKAGE_TARNAME='libseccomp'
589 PACKAGE_VERSION='2.5.0'
590 PACKAGE_STRING='libseccomp 2.5.0'
589 PACKAGE_VERSION='2.5.1'
590 PACKAGE_STRING='libseccomp 2.5.1'
591591 PACKAGE_BUGREPORT=''
592592 PACKAGE_URL=''
593593
13471347 # Omit some internal or obsolete options to make the list less imposing.
13481348 # This message is too long to be a string in the A/UX 3.1 sh.
13491349 cat <<_ACEOF
1350 \`configure' configures libseccomp 2.5.0 to adapt to many kinds of systems.
1350 \`configure' configures libseccomp 2.5.1 to adapt to many kinds of systems.
13511351
13521352 Usage: $0 [OPTION]... [VAR=VALUE]...
13531353
14171417
14181418 if test -n "$ac_init_help"; then
14191419 case $ac_init_help in
1420 short | recursive ) echo "Configuration of libseccomp 2.5.0:";;
1420 short | recursive ) echo "Configuration of libseccomp 2.5.1:";;
14211421 esac
14221422 cat <<\_ACEOF
14231423
15311531 test -n "$ac_init_help" && exit $ac_status
15321532 if $ac_init_version; then
15331533 cat <<\_ACEOF
1534 libseccomp configure 2.5.0
1534 libseccomp configure 2.5.1
15351535 generated by GNU Autoconf 2.69
15361536
15371537 Copyright (C) 2012 Free Software Foundation, Inc.
18091809 This file contains any messages produced by compilers while
18101810 running configure, to aid debugging if configure makes a mistake.
18111811
1812 It was created by libseccomp $as_me 2.5.0, which was
1812 It was created by libseccomp $as_me 2.5.1, which was
18131813 generated by GNU Autoconf 2.69. Invocation command line was
18141814
18151815 $ $0 $@
26792679
26802680 # Define the identity of the package.
26812681 PACKAGE='libseccomp'
2682 VERSION='2.5.0'
2682 VERSION='2.5.1'
26832683
26842684
26852685 cat >>confdefs.h <<_ACEOF
40794079
40804080
40814081
4082 macro_version='2.4.6.42-b88ce-dirty'
4083 macro_revision='2.4.6.42'
4082 macro_version='2.4.6'
4083 macro_revision='2.4.6'
40844084
40854085
40864086
57425742 fi
57435743
57445744 : ${AR=ar}
5745
5746
5747
5748
5749
5750
5751 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
5752 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
5753 # higher priority because thats what people were doing historically (setting
5754 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
5755 # variable obsoleted/removed.
5756
5757 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
5758 lt_ar_flags=$AR_FLAGS
5759
5760
5761
5762
5763
5764
5765 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
5766 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
5745 : ${AR_FLAGS=cru}
5746
5747
5748
5749
5750
57675751
57685752
57695753
62136197 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
62146198 # Fake it for dumpbin and say T for any non-static function,
62156199 # D for any global variable and I for any imported variable.
6216 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
6200 # Also find C++ and __fastcall symbols from MSVC++,
62176201 # which start with @ or ?.
62186202 lt_cv_sys_global_symbol_pipe="$AWK '"\
62196203 " {last_section=section; section=\$ 3};"\
74827466 _LT_EOF
74837467 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5
74847468 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5
7485 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&5
7486 $AR $AR_FLAGS libconftest.a conftest.o 2>&5
7469 echo "$AR cru libconftest.a conftest.o" >&5
7470 $AR cru libconftest.a conftest.o 2>&5
74877471 echo "$RANLIB libconftest.a" >&5
74887472 $RANLIB libconftest.a 2>&5
74897473 cat > conftest.c << _LT_EOF
81448128 ofile=libtool
81458129 can_build_shared=yes
81468130
8147 # All known linkers require a '.a' archive for static linking (except MSVC and
8148 # ICC, which need '.lib').
8131 # All known linkers require a '.a' archive for static linking (except MSVC,
8132 # which needs '.lib').
81498133 libext=a
81508134
81518135 with_gnu_ld=$lt_cv_prog_gnu_ld
90729056
90739057 case $host_os in
90749058 cygwin* | mingw* | pw32* | cegcc*)
9075 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
9059 # FIXME: the MSVC++ port hasn't been tested in a loooong time
90769060 # When not using gcc, we currently assume that we are using
9077 # Microsoft Visual C++ or Intel C++ Compiler.
9061 # Microsoft Visual C++.
90789062 if test yes != "$GCC"; then
90799063 with_gnu_ld=no
90809064 fi
90819065 ;;
90829066 interix*)
9083 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
9067 # we just hope/assume this is gcc and not c89 (= MSVC++)
90849068 with_gnu_ld=yes
90859069 ;;
90869070 openbsd* | bitrig*)
92449228 emximp -o $lib $output_objdir/$libname.def'
92459229 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
92469230 enable_shared_with_static_runtimes=yes
9247 file_list_spec='@'
92489231 ;;
92499232
92509233 interix[3-9]*)
94629445 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
94639446 export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
94649447 else
9465 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
9448 export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
94669449 fi
94679450 aix_use_runtimelinking=no
94689451
97299712
97309713 cygwin* | mingw* | pw32* | cegcc*)
97319714 # When not using gcc, we currently assume that we are using
9732 # Microsoft Visual C++ or Intel C++ Compiler.
9715 # Microsoft Visual C++.
97339716 # hardcode_libdir_flag_spec is actually meaningless, as there is
97349717 # no search path for DLLs.
97359718 case $cc_basename in
9736 cl* | icl*)
9737 # Native MSVC or ICC
9719 cl*)
9720 # Native MSVC
97389721 hardcode_libdir_flag_spec=' '
97399722 allow_undefined_flag=unsupported
97409723 always_export_symbols=yes
97759758 fi'
97769759 ;;
97779760 *)
9778 # Assume MSVC and ICC wrapper
9761 # Assume MSVC wrapper
97799762 hardcode_libdir_flag_spec=' '
97809763 allow_undefined_flag=unsupported
97819764 # Tell ltmain to make .lib files, not .a files.
1009910082 emximp -o $lib $output_objdir/$libname.def'
1010010083 old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
1010110084 enable_shared_with_static_runtimes=yes
10102 file_list_spec='@'
1010310085 ;;
1010410086
1010510087 osf3*)
1080710789 dynamic_linker='Win32 ld.exe'
1080810790 ;;
1080910791
10810 *,cl* | *,icl*)
10811 # Native MSVC or ICC
10792 *,cl*)
10793 # Native MSVC
1081210794 libname_spec='$name'
1081310795 soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
1081410796 library_names_spec='$libname.dll.lib'
1086410846 ;;
1086510847
1086610848 *)
10867 # Assume MSVC and ICC wrapper
10849 # Assume MSVC wrapper
1086810850 library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
1086910851 dynamic_linker='Win32 ld.exe'
1087010852 ;;
1112811110 # before this can be enabled.
1112911111 hardcode_into_libs=yes
1113011112
11113 # Add ABI-specific directories to the system library path.
11114 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
11115
1113111116 # Ideally, we could use ldconfig to report *all* directores which are
1113211117 # searched for libraries, however this is still not possible. Aside from not
1113311118 # being certain /sbin/ldconfig is available, command
1113611121 # appending ld.so.conf contents (and includes) to the search path.
1113711122 if test -f /etc/ld.so.conf; then
1113811123 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
11139 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
11124 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1114011125 fi
1114111126
1114211127 # We used to test for /lib/ld.so.1 and disable shared libraries on
1204312028 old_striplib=
1204412029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
1204512030 $as_echo_n "checking whether stripping libraries is possible... " >&6; }
12046 if test -z "$STRIP"; then
12047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12048 $as_echo "no" >&6; }
12049 else
12050 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12051 old_striplib="$STRIP --strip-debug"
12052 striplib="$STRIP --strip-unneeded"
12053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12031 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
12032 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
12033 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1205412035 $as_echo "yes" >&6; }
12055 else
12056 case $host_os in
12057 darwin*)
12058 # FIXME - insert some real tests, host_os isn't really good enough
12036 else
12037 # FIXME - insert some real tests, host_os isn't really good enough
12038 case $host_os in
12039 darwin*)
12040 if test -n "$STRIP"; then
1205912041 striplib="$STRIP -x"
1206012042 old_striplib="$STRIP -S"
1206112043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
1206212044 $as_echo "yes" >&6; }
12063 ;;
12064 freebsd*)
12065 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
12066 old_striplib="$STRIP --strip-debug"
12067 striplib="$STRIP --strip-unneeded"
12068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12069 $as_echo "yes" >&6; }
12070 else
12071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12072 $as_echo "no" >&6; }
12073 fi
12074 ;;
12075 *)
12045 else
1207612046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1207712047 $as_echo "no" >&6; }
12078 ;;
12079 esac
12080 fi
12048 fi
12049 ;;
12050 *)
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12052 $as_echo "no" >&6; }
12053 ;;
12054 esac
1208112055 fi
1208212056
1208312057
1220812182
1220912183
1221012184 AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include"
12211 AM_CFLAGS="-Wall"
12185 AM_CFLAGS="-Wall -Umips"
1221212186 AM_LDFLAGS="-Wl,-z -Wl,relro"
1221312187
1221412188
1365013624 # report actual input values of CONFIG_FILES etc. instead of their
1365113625 # values after options handling.
1365213626 ac_log="
13653 This file was extended by libseccomp $as_me 2.5.0, which was
13627 This file was extended by libseccomp $as_me 2.5.1, which was
1365413628 generated by GNU Autoconf 2.69. Invocation command line was
1365513629
1365613630 CONFIG_FILES = $CONFIG_FILES
1371613690 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1371713691 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1371813692 ac_cs_version="\\
13719 libseccomp config.status 2.5.0
13693 libseccomp config.status 2.5.1
1372013694 configured by $0, generated by GNU Autoconf 2.69,
1372113695 with options \\"\$ac_cs_config\\"
1372213696
1388713861 DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`'
1388813862 sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`'
1388913863 AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`'
13890 lt_ar_flags='`$ECHO "$lt_ar_flags" | $SED "$delay_single_quote_subst"`'
1389113864 AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`'
1389213865 archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`'
1389313866 STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`'
1401613989 DLLTOOL \
1401713990 sharedlib_from_linklib_cmd \
1401813991 AR \
13992 AR_FLAGS \
1401913993 archiver_list_spec \
1402013994 STRIP \
1402113995 RANLIB \
1481714791 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1481814792 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1481914793 as_fn_error $? "Something went wrong bootstrapping makefile fragments
14820 for automatic dependency tracking. If GNU make was not used, consider
14821 re-running the configure script with MAKE=\"gmake\" (or whatever is
14822 necessary). You can also try re-running configure with the
14794 for automatic dependency tracking. Try re-running configure with the
1482314795 '--disable-dependency-tracking' option to at least be able to build
1482414796 the package (albeit without support for automatic dependency tracking).
1482514797 See \`config.log' for more details" "$LINENO" 5; }
1484614818 cat <<_LT_EOF >> "$cfgfile"
1484714819 #! $SHELL
1484814820 # Generated automatically by $as_me ($PACKAGE) $VERSION
14821 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
1484914822 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
1485014823
1485114824 # Provide generalized library-building support services.
1498914962 # The archiver.
1499014963 AR=$lt_AR
1499114964
14992 # Flags to create an archive (by configure).
14993 lt_ar_flags=$lt_ar_flags
14994
1499514965 # Flags to create an archive.
14996 AR_FLAGS=\${ARFLAGS-"\$lt_ar_flags"}
14966 AR_FLAGS=$lt_AR_FLAGS
1499714967
1499814968 # How to feed a file listing to the archiver.
1499914969 archiver_list_spec=$lt_archiver_list_spec
1818 dnl ####
1919 dnl libseccomp defines
2020 dnl ####
21 AC_INIT([libseccomp], [2.5.0])
21 AC_INIT([libseccomp], [2.5.1])
2222
2323 dnl ####
2424 dnl autoconf configuration
6464
6565 dnl ####
6666 dnl build flags
67 dnl NOTE: the '-Umips' is here because MIPS GCC compilers "helpfully" define it
68 dnl for us which wreaks havoc on the build
6769 dnl ####
6870 AM_CPPFLAGS="-I\${top_srcdir}/include -I\${top_builddir}/include"
69 AM_CFLAGS="-Wall"
71 AM_CFLAGS="-Wall -Umips"
7072 AM_LDFLAGS="-Wl,-z -Wl,relro"
7173 AC_SUBST([AM_CPPFLAGS])
7274 AC_SUBST([AM_CFLAGS])
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
0 .TH "seccomp_api_get" 3 "13 June 2020" "paul@paul-moore.com" "libseccomp Documentation"
0 .TH "seccomp_api_get" 3 "6 November 2020" "paul@paul-moore.com" "libseccomp Documentation"
11 .\" //////////////////////////////////////////////////////////////////////////
22 .SH NAME
33 .\" //////////////////////////////////////////////////////////////////////////
5757 .B 5
5858 The SCMP_ACT_NOTIFY action and the notify APIs are supported.
5959 .TP
60 .B 5
60 .B 6
6161 The simultaneous use of SCMP_FLTATR_CTL_TSYNC and the notify APIs are supported.
6262 .\" //////////////////////////////////////////////////////////////////////////
6363 .SH RETURN VALUE
2323 .BR seccomp_export_bpf ()
2424 and
2525 .BR seccomp_export_pfc ()
26 functions generate and output the current seccomp filter in either BPF (Berkley
26 functions generate and output the current seccomp filter in either BPF (Berkeley
2727 Packet Filter) or PFC (Pseudo Filter Code). The output of
2828 .BR seccomp_export_bpf ()
2929 is suitable for loading into the kernel, while the output of
3535 function releases the existing filter context state before reinitializing it
3636 and can only be called after a call to
3737 .BR seccomp_init ()
38 has succeeded.
38 has succeeded. If
39 .BR seccomp_reset ()
40 is called with a NULL filter, it resets the library's global task state,
41 including any notification file descriptors retrieved by
42 .BR seccomp_notify_fd(3) .
43 Normally this is not needed, but it may be required to continue using the
44 library after a
45 .BR fork ()
46 or
47 .BR clone ()
48 call to ensure the API level and user notification state is properly reset.
3949 .P
4050 When the caller is finished configuring the seccomp filter and has loaded it
4151 into the kernel, the caller should call
5858 .\" //////////////////////////////////////////////////////////////////////////
5959 The
6060 .BR seccomp_notify_fd ()
61 returns the notification fd of the loaded filter.
61 returns the notification fd of the loaded filter, -1 if a notification fd has
62 not yet been created, and -EINVAL if the filter context is invalid.
6263 .P
6364 The
6465 .BR seccomp_notify_id_valid ()
208208 .B SCMP_ACT_ALLOW
209209 The seccomp filter will have no effect on the thread calling the syscall if it
210210 matches the filter rule.
211 .TP
212 .B SCMP_ACT_NOTIFY
213 A monitoring process will be notified when a process running the seccomp
214 filter calls a syscall that matches the filter rule. The process that invokes
215 the syscall waits in the kernel until the monitoring process has responded via
216 .B seccomp_notify_respond(3)
217 \&.
218
219 When a filter utilizing
220 .B SCMP_ACT_NOTIFY
221 is loaded into the kernel, the kernel generates a notification fd that must be
222 used to communicate between the monitoring process and the process(es) being
223 filtered. See
224 .B seccomp_notif_fd(3)
225 for more information.
226
211227 .P
212228 Valid comparison
213229 .I op
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
3939
4040 #define SCMP_VER_MAJOR 2
4141 #define SCMP_VER_MINOR 5
42 #define SCMP_VER_MICRO 0
42 #define SCMP_VER_MICRO 1
4343
4444 struct scmp_version {
4545 unsigned int major;
00 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11 #
2 # Copyright (C) 1996-2001, 2003-2018 Free Software Foundation, Inc.
2 # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc.
33 # Written by Gordon Matzigkeit, 1996
44 #
55 # This file is free software; the Free Software Foundation gives
218218 ofile=libtool
219219 can_build_shared=yes
220220
221 # All known linkers require a '.a' archive for static linking (except MSVC and
222 # ICC, which need '.lib').
221 # All known linkers require a '.a' archive for static linking (except MSVC,
222 # which needs '.lib').
223223 libext=a
224224
225225 with_gnu_ld=$lt_cv_prog_gnu_ld
727727 cat <<_LT_EOF >> "$cfgfile"
728728 #! $SHELL
729729 # Generated automatically by $as_me ($PACKAGE) $VERSION
730 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
730731 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
731732
732733 # Provide generalized library-building support services.
10401041 _LT_EOF
10411042 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
10421043 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
1043 echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1044 $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
1044 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
1045 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
10451046 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
10461047 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
10471048 cat > conftest.c << _LT_EOF
14911492 m4_defun([_LT_PROG_AR],
14921493 [AC_CHECK_TOOLS(AR, [ar], false)
14931494 : ${AR=ar}
1495 : ${AR_FLAGS=cru}
14941496 _LT_DECL([], [AR], [1], [The archiver])
1495
1496 # Use ARFLAGS variable as AR's operation code to sync the variable naming with
1497 # Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
1498 # higher priority because thats what people were doing historically (setting
1499 # ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS
1500 # variable obsoleted/removed.
1501
1502 test ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
1503 lt_ar_flags=$AR_FLAGS
1504 _LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
1505
1506 # Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override
1507 # by AR_FLAGS because that was never working and AR_FLAGS is about to die.
1508 _LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
1509 [Flags to create an archive])
1497 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
15101498
15111499 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
15121500 [lt_cv_ar_at_file=no
22182206 striplib=
22192207 old_striplib=
22202208 AC_MSG_CHECKING([whether stripping libraries is possible])
2221 if test -z "$STRIP"; then
2222 AC_MSG_RESULT([no])
2209 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2210 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2211 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2212 AC_MSG_RESULT([yes])
22232213 else
2224 if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
2225 old_striplib="$STRIP --strip-debug"
2226 striplib="$STRIP --strip-unneeded"
2227 AC_MSG_RESULT([yes])
2228 else
2229 case $host_os in
2230 darwin*)
2231 # FIXME - insert some real tests, host_os isn't really good enough
2214 # FIXME - insert some real tests, host_os isn't really good enough
2215 case $host_os in
2216 darwin*)
2217 if test -n "$STRIP"; then
22322218 striplib="$STRIP -x"
22332219 old_striplib="$STRIP -S"
22342220 AC_MSG_RESULT([yes])
2235 ;;
2236 freebsd*)
2237 if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
2238 old_striplib="$STRIP --strip-debug"
2239 striplib="$STRIP --strip-unneeded"
2240 AC_MSG_RESULT([yes])
2241 else
2242 AC_MSG_RESULT([no])
2243 fi
2244 ;;
2245 *)
2221 else
22462222 AC_MSG_RESULT([no])
2247 ;;
2248 esac
2249 fi
2223 fi
2224 ;;
2225 *)
2226 AC_MSG_RESULT([no])
2227 ;;
2228 esac
22502229 fi
22512230 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
22522231 _LT_DECL([], [striplib], [1])
25852564 dynamic_linker='Win32 ld.exe'
25862565 ;;
25872566
2588 *,cl* | *,icl*)
2589 # Native MSVC or ICC
2567 *,cl*)
2568 # Native MSVC
25902569 libname_spec='$name'
25912570 soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
25922571 library_names_spec='$libname.dll.lib'
26422621 ;;
26432622
26442623 *)
2645 # Assume MSVC and ICC wrapper
2624 # Assume MSVC wrapper
26462625 library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
26472626 dynamic_linker='Win32 ld.exe'
26482627 ;;
28872866 # before this can be enabled.
28882867 hardcode_into_libs=yes
28892868
2869 # Add ABI-specific directories to the system library path.
2870 sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
2871
28902872 # Ideally, we could use ldconfig to report *all* directores which are
28912873 # searched for libraries, however this is still not possible. Aside from not
28922874 # being certain /sbin/ldconfig is available, command
28952877 # appending ld.so.conf contents (and includes) to the search path.
28962878 if test -f /etc/ld.so.conf; then
28972879 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
2898 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
2880 sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
28992881 fi
29002882
29012883 # We used to test for /lib/ld.so.1 and disable shared libraries on
40304012 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
40314013 # Fake it for dumpbin and say T for any non-static function,
40324014 # D for any global variable and I for any imported variable.
4033 # Also find C++ and __fastcall symbols from MSVC++ or ICC,
4015 # Also find C++ and __fastcall symbols from MSVC++,
40344016 # which start with @ or ?.
40354017 lt_cv_sys_global_symbol_pipe="$AWK ['"\
40364018 " {last_section=section; section=\$ 3};"\
49394921 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
49404922 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
49414923 else
4942 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
4924 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
49434925 fi
49444926 ;;
49454927 pw32*)
49474929 ;;
49484930 cygwin* | mingw* | cegcc*)
49494931 case $cc_basename in
4950 cl* | icl*)
4932 cl*)
49514933 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
49524934 ;;
49534935 *)
50044986
50054987 case $host_os in
50064988 cygwin* | mingw* | pw32* | cegcc*)
5007 # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
4989 # FIXME: the MSVC++ port hasn't been tested in a loooong time
50084990 # When not using gcc, we currently assume that we are using
5009 # Microsoft Visual C++ or Intel C++ Compiler.
4991 # Microsoft Visual C++.
50104992 if test yes != "$GCC"; then
50114993 with_gnu_ld=no
50124994 fi
50134995 ;;
50144996 interix*)
5015 # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
4997 # we just hope/assume this is gcc and not c89 (= MSVC++)
50164998 with_gnu_ld=yes
50174999 ;;
50185000 openbsd* | bitrig*)
51765158 emximp -o $lib $output_objdir/$libname.def'
51775159 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
51785160 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5179 _LT_TAGVAR(file_list_spec, $1)='@'
51805161 ;;
51815162
51825163 interix[[3-9]]*)
53945375 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
53955376 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
53965377 else
5397 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
5378 _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
53985379 fi
53995380 aix_use_runtimelinking=no
54005381
55775558
55785559 cygwin* | mingw* | pw32* | cegcc*)
55795560 # When not using gcc, we currently assume that we are using
5580 # Microsoft Visual C++ or Intel C++ Compiler.
5561 # Microsoft Visual C++.
55815562 # hardcode_libdir_flag_spec is actually meaningless, as there is
55825563 # no search path for DLLs.
55835564 case $cc_basename in
5584 cl* | icl*)
5585 # Native MSVC or ICC
5565 cl*)
5566 # Native MSVC
55865567 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
55875568 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
55885569 _LT_TAGVAR(always_export_symbols, $1)=yes
56235604 fi'
56245605 ;;
56255606 *)
5626 # Assume MSVC and ICC wrapper
5607 # Assume MSVC wrapper
56275608 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
56285609 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
56295610 # Tell ltmain to make .lib files, not .a files.
58825863 emximp -o $lib $output_objdir/$libname.def'
58835864 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
58845865 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5885 _LT_TAGVAR(file_list_spec, $1)='@'
58865866 ;;
58875867
58885868 osf3*)
66536633
66546634 cygwin* | mingw* | pw32* | cegcc*)
66556635 case $GXX,$cc_basename in
6656 ,cl* | no,cl* | ,icl* | no,icl*)
6657 # Native MSVC or ICC
6636 ,cl* | no,cl*)
6637 # Native MSVC
66586638 # hardcode_libdir_flag_spec is actually meaningless, as there is
66596639 # no search path for DLLs.
66606640 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
67526732 emximp -o $lib $output_objdir/$libname.def'
67536733 _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
67546734 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6755 _LT_TAGVAR(file_list_spec, $1)='@'
67566735 ;;
67576736
67586737 dgux*)
00 # Helper functions for option handling. -*- Autoconf -*-
11 #
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2018 Free Software
2 # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
33 # Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
00 # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2018 Free Software
2 # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
33 # Foundation, Inc.
44 # Written by Gary V. Vaughan, 2004
55 #
00 # ltversion.m4 -- version numbers -*- Autoconf -*-
11 #
2 # Copyright (C) 2004, 2011-2018 Free Software Foundation, Inc.
2 # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
33 # Written by Scott James Remnant, 2004
44 #
55 # This file is free software; the Free Software Foundation gives
88
99 # @configure_input@
1010
11 # serial 4221 ltversion.m4
11 # serial 4179 ltversion.m4
1212 # This file is part of GNU Libtool
1313
14 m4_define([LT_PACKAGE_VERSION], [2.4.6.42-b88ce-dirty])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6.42])
14 m4_define([LT_PACKAGE_VERSION], [2.4.6])
15 m4_define([LT_PACKAGE_REVISION], [2.4.6])
1616
1717 AC_DEFUN([LTVERSION_VERSION],
18 [macro_version='2.4.6.42-b88ce-dirty'
19 macro_revision='2.4.6.42'
18 [macro_version='2.4.6'
19 macro_revision='2.4.6'
2020 _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
2121 _LT_DECL(, macro_revision, 0)
2222 ])
00 # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
11 #
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2018 Free Software
2 # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
33 # Foundation, Inc.
44 # Written by Scott James Remnant, 2004.
55 #
6060 arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL}
6161
6262 arch_syscall_check_SOURCES = arch-syscall-check.c ${SOURCES_ALL}
63 arch_syscall_check_CFLAGS = ${CODE_COVERAGE_CFLAGS}
63 arch_syscall_check_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS}
6464 arch_syscall_check_LDFLAGS = ${CODE_COVERAGE_LDFLAGS}
6565
6666 libseccomp_la_SOURCES = ${SOURCES_ALL}
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
586586 lib_LTLIBRARIES = libseccomp.la
587587 arch_syscall_dump_SOURCES = arch-syscall-dump.c ${SOURCES_ALL}
588588 arch_syscall_check_SOURCES = arch-syscall-check.c ${SOURCES_ALL}
589 arch_syscall_check_CFLAGS = ${CODE_COVERAGE_CFLAGS}
589 arch_syscall_check_CFLAGS = ${AM_CFLAGS} ${CODE_COVERAGE_CFLAGS}
590590 arch_syscall_check_LDFLAGS = ${CODE_COVERAGE_LDFLAGS}
591591 libseccomp_la_SOURCES = ${SOURCES_ALL}
592592 libseccomp_la_CPPFLAGS = ${AM_CPPFLAGS} ${CODE_COVERAGE_CPPFLAGS}
300300 {
301301 struct db_filter_col *col = (struct db_filter_col *)ctx;
302302
303 /* use a NULL filter collection here since we are resetting it */
304 if (ctx == NULL || db_col_action_valid(NULL, def_action) < 0)
305 return _rc_filter(-EINVAL);
306
303 /* a NULL filter context indicates we are resetting the global state */
304 if (ctx == NULL) {
305 /* reset the global state and redetermine the api level */
306 sys_reset_state();
307 _seccomp_api_update();
308 return _rc_filter(0);
309 }
310 /* ensure the default action is valid */
311 if (db_col_action_valid(NULL, def_action) < 0)
312 return _rc_filter(-EINVAL);
313
314 /* reset the filter */
307315 return _rc_filter(db_col_reset(col, def_action));
308316 }
309317
674682 /* NOTE - function header comment in include/seccomp.h */
675683 API int seccomp_notify_fd(const scmp_filter_ctx ctx)
676684 {
677 struct db_filter_col *col;
685 /* NOTE: for historical reasons, and possibly future use, we require a
686 * valid filter context even though we don't actual use it here; the
687 * api update is also not strictly necessary, but keep it for now */
678688
679689 /* force a runtime api level detection */
680690 _seccomp_api_update();
681691
682692 if (_ctx_valid(ctx))
683693 return _rc_filter(-EINVAL);
684 col = (struct db_filter_col *)ctx;
685
686 return _rc_filter(col->notify_fd);
694
695 return _rc_filter(sys_notify_fd());
687696 }
688697
689698 /* NOTE - function header comment in include/seccomp.h */
4949 {
5050 int sys;
5151
52 /* NOTE: we don't want to modify the pseudo-syscall numbers */
5253 sys = arm_syscall_resolve_name(name);
53 if (sys == __NR_SCMP_ERROR)
54 if (sys == __NR_SCMP_ERROR || sys < 0)
5455 return sys;
5556
5657 return (sys | __SCMP_NR_BASE);
6768 */
6869 const char *arm_syscall_resolve_num_munge(int num)
6970 {
70 return arm_syscall_resolve_num(num & (~__SCMP_NR_BASE));
71 /* NOTE: we don't want to modify the pseudo-syscall numbers */
72 if (num >= 0)
73 num &= ~__SCMP_NR_BASE;
74 return arm_syscall_resolve_num(num);
7175 }
7276
7377 const struct arch_def arch_def_arm = {
4242 {
4343 int sys;
4444
45 /* NOTE: we don't want to modify the pseudo-syscall numbers */
4546 sys = mips_syscall_resolve_name(name);
46 if (sys == __NR_SCMP_ERROR)
47 if (sys == __NR_SCMP_ERROR || sys < 0)
4748 return sys;
4849
4950 return sys + __SCMP_NR_BASE;
6061 */
6162 const char *mips_syscall_resolve_num_munge(int num)
6263 {
63 return mips_syscall_resolve_num(num - __SCMP_NR_BASE);
64 /* NOTE: we don't want to modify the pseudo-syscall numbers */
65 if (num >= __SCMP_NR_BASE)
66 num -= __SCMP_NR_BASE;
67 return mips_syscall_resolve_num(num);
6468 }
6569
6670 const struct arch_def arch_def_mips = {
4040 {
4141 int sys;
4242
43 /* NOTE: we don't want to modify the pseudo-syscall numbers */
4344 sys = mips64_syscall_resolve_name(name);
44 if (sys == __NR_SCMP_ERROR)
45 if (sys == __NR_SCMP_ERROR || sys < 0)
4546 return sys;
4647
4748 return sys + __SCMP_NR_BASE;
5859 */
5960 const char *mips64_syscall_resolve_num_munge(int num)
6061 {
61 return mips64_syscall_resolve_num(num - __SCMP_NR_BASE);
62 /* NOTE: we don't want to modify the pseudo-syscall numbers */
63 if (num >= __SCMP_NR_BASE)
64 num -= __SCMP_NR_BASE;
65 return mips64_syscall_resolve_num(num);
6266 }
6367
6468 const struct arch_def arch_def_mips64 = {
4242 {
4343 int sys;
4444
45 /* NOTE: we don't want to modify the pseudo-syscall numbers */
4546 sys = mips64n32_syscall_resolve_name(name);
46 if (sys == __NR_SCMP_ERROR)
47 if (sys == __NR_SCMP_ERROR || sys < 0)
4748 return sys;
4849
4950 return sys + __SCMP_NR_BASE;
6061 */
6162 const char *mips64n32_syscall_resolve_num_munge(int num)
6263 {
63 return mips64n32_syscall_resolve_num(num - __SCMP_NR_BASE);
64 /* NOTE: we don't want to modify the pseudo-syscall numbers */
65 if (num >= __SCMP_NR_BASE)
66 num -= __SCMP_NR_BASE;
67 return mips64n32_syscall_resolve_num(num);
6468 }
6569
6670 const struct arch_def arch_def_mips64n32 = {
3838 {
3939 int sys;
4040
41 /* NOTE: we don't want to modify the pseudo-syscall numbers */
4142 sys = x32_syscall_resolve_name(name);
42 if (sys == __NR_SCMP_ERROR)
43 if (sys == __NR_SCMP_ERROR || sys < 0)
4344 return sys;
4445
4546 return (sys | X32_SYSCALL_BIT);
5657 */
5758 const char *x32_syscall_resolve_num_munge(int num)
5859 {
59 return x32_syscall_resolve_num(num & (~X32_SYSCALL_BIT));
60 /* NOTE: we don't want to modify the pseudo-syscall numbers */
61 if (num >= 0)
62 num &= ~X32_SYSCALL_BIT;
63 return x32_syscall_resolve_num(num);
6064 }
6165
6266 const struct arch_def arch_def_x32 = {
10561056 if (col->filters)
10571057 free(col->filters);
10581058 col->filters = NULL;
1059 col->notify_fd = -1;
10601059
10611060 /* set the endianess to undefined */
10621061 col->endian = 0;
159159 /* transaction snapshots */
160160 struct db_filter_snap *snapshots;
161161
162 /* notification fd that was returned from seccomp() */
163 int notify_fd;
162 /* userspace notification */
164163 bool notify_used;
165164 };
166165
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
10221022 file - the output file
10231023
10241024 Description:
1025 Output the filter in Berkley Packet Filter (BPF) to the given
1025 Output the filter in Berkeley Packet Filter (BPF) to the given
10261026 file. The output is identical to what is loaded into the
10271027 Linux Kernel.
10281028 """
3939 * our next release we may have to enable the allowlist */
4040 #define SYSCALL_ALLOWLIST_ENABLE 0
4141
42 static int _nr_seccomp = -1;
43 static int _support_seccomp_syscall = -1;
44 static int _support_seccomp_flag_tsync = -1;
45 static int _support_seccomp_flag_log = -1;
46 static int _support_seccomp_action_log = -1;
47 static int _support_seccomp_kill_process = -1;
48 static int _support_seccomp_flag_spec_allow = -1;
49 static int _support_seccomp_flag_new_listener = -1;
50 static int _support_seccomp_user_notif = -1;
51 static int _support_seccomp_flag_tsync_esrch = -1;
42 /* task global state */
43 struct task_state {
44 /* seccomp(2) syscall */
45 int nr_seccomp;
46
47 /* userspace notification fd */
48 int notify_fd;
49
50 /* runtime support flags */
51 int sup_syscall;
52 int sup_flag_tsync;
53 int sup_flag_log;
54 int sup_action_log;
55 int sup_kill_process;
56 int sup_flag_spec_allow;
57 int sup_flag_new_listener;
58 int sup_user_notif;
59 int sup_flag_tsync_esrch;
60 };
61 static struct task_state state = {
62 .nr_seccomp = -1,
63
64 .notify_fd = -1,
65
66 .sup_syscall = -1,
67 .sup_flag_tsync = -1,
68 .sup_flag_log = -1,
69 .sup_action_log = -1,
70 .sup_kill_process = -1,
71 .sup_flag_spec_allow = -1,
72 .sup_flag_new_listener = -1,
73 .sup_user_notif = -1,
74 .sup_flag_tsync_esrch = -1,
75 };
76
77 /**
78 * Reset the task state
79 *
80 * This function fully resets the library's global "system task state".
81 *
82 */
83 void sys_reset_state(void)
84 {
85 state.nr_seccomp = -1;
86
87 if (state.notify_fd > 0)
88 close(state.notify_fd);
89 state.notify_fd = -1;
90
91 state.sup_syscall = -1;
92 state.sup_flag_tsync = -1;
93 state.sup_flag_log = -1;
94 state.sup_action_log = -1;
95 state.sup_kill_process = -1;
96 state.sup_flag_spec_allow = -1;
97 state.sup_flag_new_listener = -1;
98 state.sup_user_notif = -1;
99 state.sup_flag_tsync_esrch = -1;
100 }
52101
53102 /**
54103 * Check to see if the seccomp() syscall is supported
67116 /* NOTE: it is reasonably safe to assume that we should be able to call
68117 * seccomp() when the caller first starts, but we can't rely on
69118 * it later so we need to cache our findings for use later */
70 if (_support_seccomp_syscall >= 0)
71 return _support_seccomp_syscall;
119 if (state.sup_syscall >= 0)
120 return state.sup_syscall;
72121
73122 #if SYSCALL_ALLOWLIST_ENABLE
74123 /* architecture allowlist */
99148 goto supported;
100149
101150 unsupported:
102 _support_seccomp_syscall = 0;
151 state.sup_syscall = 0;
103152 return 0;
104153 supported:
105 _nr_seccomp = nr_seccomp;
106 _support_seccomp_syscall = 1;
154 state.nr_seccomp = nr_seccomp;
155 state.sup_syscall = 1;
107156 return 1;
108157 }
109158
117166 */
118167 void sys_set_seccomp_syscall(bool enable)
119168 {
120 _support_seccomp_syscall = (enable ? 1 : 0);
169 state.sup_syscall = (enable ? 1 : 0);
121170 }
122171
123172 /**
131180 int sys_chk_seccomp_action(uint32_t action)
132181 {
133182 if (action == SCMP_ACT_KILL_PROCESS) {
134 if (_support_seccomp_kill_process < 0) {
183 if (state.sup_kill_process < 0) {
135184 if (sys_chk_seccomp_syscall() == 1 &&
136 syscall(_nr_seccomp, SECCOMP_GET_ACTION_AVAIL, 0,
137 &action) == 0)
138 _support_seccomp_kill_process = 1;
185 syscall(state.nr_seccomp,
186 SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0)
187 state.sup_kill_process = 1;
139188 else
140 _support_seccomp_kill_process = 0;
189 state.sup_kill_process = 0;
141190 }
142191
143 return _support_seccomp_kill_process;
192 return state.sup_kill_process;
144193 } else if (action == SCMP_ACT_KILL_THREAD) {
145194 return 1;
146195 } else if (action == SCMP_ACT_TRAP) {
151200 } else if (action == SCMP_ACT_TRACE(action & 0x0000ffff)) {
152201 return 1;
153202 } else if (action == SCMP_ACT_LOG) {
154 if (_support_seccomp_action_log < 0) {
203 if (state.sup_action_log < 0) {
155204 if (sys_chk_seccomp_syscall() == 1 &&
156 syscall(_nr_seccomp, SECCOMP_GET_ACTION_AVAIL, 0,
157 &action) == 0)
158 _support_seccomp_action_log = 1;
205 syscall(state.nr_seccomp,
206 SECCOMP_GET_ACTION_AVAIL, 0, &action) == 0)
207 state.sup_action_log = 1;
159208 else
160 _support_seccomp_action_log = 0;
209 state.sup_action_log = 0;
161210 }
162211
163 return _support_seccomp_action_log;
212 return state.sup_action_log;
164213 } else if (action == SCMP_ACT_ALLOW) {
165214 return 1;
166215 } else if (action == SCMP_ACT_NOTIFY) {
167 if (_support_seccomp_user_notif < 0) {
216 if (state.sup_user_notif < 0) {
168217 struct seccomp_notif_sizes sizes;
169218 if (sys_chk_seccomp_syscall() == 1 &&
170 syscall(_nr_seccomp, SECCOMP_GET_NOTIF_SIZES, 0,
171 &sizes) == 0)
172 _support_seccomp_user_notif = 1;
219 syscall(state.nr_seccomp,
220 SECCOMP_GET_NOTIF_SIZES, 0, &sizes) == 0)
221 state.sup_user_notif = 1;
173222 else
174 _support_seccomp_user_notif = 0;
223 state.sup_user_notif = 0;
175224 }
176225
177 return _support_seccomp_user_notif;
226 return state.sup_user_notif;
178227 }
179228
180229 return 0;
192241 {
193242 switch (action) {
194243 case SCMP_ACT_LOG:
195 _support_seccomp_action_log = (enable ? 1 : 0);
244 state.sup_action_log = (enable ? 1 : 0);
196245 break;
197246 case SCMP_ACT_KILL_PROCESS:
198 _support_seccomp_kill_process = (enable ? 1 : 0);
247 state.sup_kill_process = (enable ? 1 : 0);
199248 break;
200249 case SCMP_ACT_NOTIFY:
201 _support_seccomp_user_notif = (enable ? 1 : 0);
250 state.sup_user_notif = (enable ? 1 : 0);
202251 break;
203252 }
204253 }
211260 * Return one if the flag is supported, zero otherwise.
212261 *
213262 */
214 static int _sys_chk_seccomp_flag_kernel(int flag)
263 static int _sys_chk_flag_kernel(int flag)
215264 {
216265 /* this is an invalid seccomp(2) call because the last argument
217266 * is NULL, but depending on the errno value of EFAULT we can
218267 * guess if the filter flag is supported or not */
219268 if (sys_chk_seccomp_syscall() == 1 &&
220 syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flag, NULL) == -1 &&
269 syscall(state.nr_seccomp,
270 SECCOMP_SET_MODE_FILTER, flag, NULL) == -1 &&
221271 errno == EFAULT)
222272 return 1;
223273
237287 {
238288 switch (flag) {
239289 case SECCOMP_FILTER_FLAG_TSYNC:
240 if (_support_seccomp_flag_tsync < 0)
241 _support_seccomp_flag_tsync = _sys_chk_seccomp_flag_kernel(flag);
242
243 return _support_seccomp_flag_tsync;
290 if (state.sup_flag_tsync < 0)
291 state.sup_flag_tsync = _sys_chk_flag_kernel(flag);
292 return state.sup_flag_tsync;
244293 case SECCOMP_FILTER_FLAG_LOG:
245 if (_support_seccomp_flag_log < 0)
246 _support_seccomp_flag_log = _sys_chk_seccomp_flag_kernel(flag);
247
248 return _support_seccomp_flag_log;
294 if (state.sup_flag_log < 0)
295 state.sup_flag_log = _sys_chk_flag_kernel(flag);
296 return state.sup_flag_log;
249297 case SECCOMP_FILTER_FLAG_SPEC_ALLOW:
250 if (_support_seccomp_flag_spec_allow < 0)
251 _support_seccomp_flag_spec_allow = _sys_chk_seccomp_flag_kernel(flag);
252
253 return _support_seccomp_flag_spec_allow;
298 if (state.sup_flag_spec_allow < 0)
299 state.sup_flag_spec_allow = _sys_chk_flag_kernel(flag);
300 return state.sup_flag_spec_allow;
254301 case SECCOMP_FILTER_FLAG_NEW_LISTENER:
255 if (_support_seccomp_flag_new_listener < 0)
256 _support_seccomp_flag_new_listener = _sys_chk_seccomp_flag_kernel(flag);
257
258 return _support_seccomp_flag_new_listener;
302 if (state.sup_flag_new_listener < 0)
303 state.sup_flag_new_listener = _sys_chk_flag_kernel(flag);
304 return state.sup_flag_new_listener;
259305 case SECCOMP_FILTER_FLAG_TSYNC_ESRCH:
260 if (_support_seccomp_flag_tsync_esrch < 0)
261 _support_seccomp_flag_tsync_esrch = _sys_chk_seccomp_flag_kernel(flag);
262 return _support_seccomp_flag_tsync_esrch;
306 if (state.sup_flag_tsync_esrch < 0)
307 state.sup_flag_tsync_esrch = _sys_chk_flag_kernel(flag);
308 return state.sup_flag_tsync_esrch;
263309 }
264310
265311 return -EOPNOTSUPP;
278324 {
279325 switch (flag) {
280326 case SECCOMP_FILTER_FLAG_TSYNC:
281 _support_seccomp_flag_tsync = (enable ? 1 : 0);
327 state.sup_flag_tsync = (enable ? 1 : 0);
282328 break;
283329 case SECCOMP_FILTER_FLAG_LOG:
284 _support_seccomp_flag_log = (enable ? 1 : 0);
330 state.sup_flag_log = (enable ? 1 : 0);
285331 break;
286332 case SECCOMP_FILTER_FLAG_SPEC_ALLOW:
287 _support_seccomp_flag_spec_allow = (enable ? 1 : 0);
333 state.sup_flag_spec_allow = (enable ? 1 : 0);
288334 break;
289335 case SECCOMP_FILTER_FLAG_NEW_LISTENER:
290 _support_seccomp_flag_new_listener = (enable ? 1 : 0);
336 state.sup_flag_new_listener = (enable ? 1 : 0);
291337 break;
292338 case SECCOMP_FILTER_FLAG_TSYNC_ESRCH:
293 _support_seccomp_flag_tsync_esrch = (enable ? 1 : 0);
339 state.sup_flag_tsync_esrch = (enable ? 1 : 0);
294340 break;
295341 }
296342 }
310356 {
311357 int rc;
312358 bool tsync_notify;
359 bool listener_req;
313360 struct bpf_program *prgm = NULL;
314361
315362 rc = gen_bpf_generate(col, &prgm);
323370 goto filter_load_out;
324371 }
325372
326 tsync_notify = (_support_seccomp_flag_tsync_esrch > 0);
373 tsync_notify = state.sup_flag_tsync_esrch > 0 && state.notify_fd == -1;
374 listener_req = state.sup_user_notif > 0 && \
375 col->notify_used && state.notify_fd == -1;
327376
328377 /* load the filter into the kernel */
329378 if (sys_chk_seccomp_syscall() == 1) {
332381 if (col->attr.tsync_enable)
333382 flgs |= SECCOMP_FILTER_FLAG_TSYNC | \
334383 SECCOMP_FILTER_FLAG_TSYNC_ESRCH;
335 if (_support_seccomp_user_notif > 0)
384 if (listener_req)
336385 flgs |= SECCOMP_FILTER_FLAG_NEW_LISTENER;
337 } else if (col->attr.tsync_enable)
386 } else if (col->attr.tsync_enable) {
387 if (listener_req) {
388 /* NOTE: we _should_ catch this in db.c */
389 rc = -EFAULT;
390 goto filter_load_out;
391 }
338392 flgs |= SECCOMP_FILTER_FLAG_TSYNC;
339 else if (_support_seccomp_user_notif > 0)
393 } else if (listener_req)
340394 flgs |= SECCOMP_FILTER_FLAG_NEW_LISTENER;
341395 if (col->attr.log_enable)
342396 flgs |= SECCOMP_FILTER_FLAG_LOG;
343397 if (col->attr.spec_allow)
344398 flgs |= SECCOMP_FILTER_FLAG_SPEC_ALLOW;
345 rc = syscall(_nr_seccomp, SECCOMP_SET_MODE_FILTER, flgs, prgm);
399 rc = syscall(state.nr_seccomp,
400 SECCOMP_SET_MODE_FILTER, flgs, prgm);
346401 if (tsync_notify && rc > 0) {
347402 /* return 0 on NEW_LISTENER success, but save the fd */
348 col->notify_fd = rc;
403 state.notify_fd = rc;
349404 rc = 0;
350405 } else if (rc > 0 && col->attr.tsync_enable) {
351406 /* always return -ESRCH if we fail to sync threads */
352407 errno = ESRCH;
353408 rc = -errno;
354 } else if (rc > 0 && _support_seccomp_user_notif > 0) {
409 } else if (rc > 0 && state.sup_user_notif > 0) {
355410 /* return 0 on NEW_LISTENER success, but save the fd */
356 col->notify_fd = rc;
411 state.notify_fd = rc;
357412 rc = 0;
358413 }
359414 } else
370425 }
371426
372427 /**
428 * Return the userspace notification fd
429 *
430 * This function returns the userspace notification fd from
431 * SECCOMP_FILTER_FLAG_NEW_LISTENER. If the notification fd has not yet been
432 * set, or an error has occurred, -1 is returned.
433 *
434 */
435 int sys_notify_fd(void)
436 {
437 return state.notify_fd;
438 }
439
440 /**
373441 * Allocate a pair of notification request/response structures
374442 * @param req the request location
375443 * @param resp the response location
385453 int rc;
386454 static struct seccomp_notif_sizes sizes = { 0, 0, 0 };
387455
388 if (_support_seccomp_syscall <= 0)
456 if (state.sup_syscall <= 0)
389457 return -EOPNOTSUPP;
390458
391459 if (sizes.seccomp_notif == 0 && sizes.seccomp_notif_resp == 0) {
426494 */
427495 int sys_notify_receive(int fd, struct seccomp_notif *req)
428496 {
429 if (_support_seccomp_user_notif <= 0)
497 if (state.sup_user_notif <= 0)
430498 return -EOPNOTSUPP;
431499
432500 if (ioctl(fd, SECCOMP_IOCTL_NOTIF_RECV, req) < 0)
447515 */
448516 int sys_notify_respond(int fd, struct seccomp_notif_resp *resp)
449517 {
450 if (_support_seccomp_user_notif <= 0)
518 if (state.sup_user_notif <= 0)
451519 return -EOPNOTSUPP;
452520
453521 if (ioctl(fd, SECCOMP_IOCTL_NOTIF_SEND, resp) < 0)
466534 */
467535 int sys_notify_id_valid(int fd, uint64_t id)
468536 {
469 if (_support_seccomp_user_notif <= 0)
537 if (state.sup_user_notif <= 0)
470538 return -EOPNOTSUPP;
471539
472540 if (ioctl(fd, SECCOMP_IOCTL_NOTIF_ID_VALID, &id) < 0)
181181 #define SECCOMP_IOCTL_NOTIF_ID_VALID SECCOMP_IOR(2, __u64)
182182 #endif /* SECCOMP_RET_USER_NOTIF */
183183
184 void sys_reset_state(void);
185
184186 int sys_chk_seccomp_syscall(void);
185187 void sys_set_seccomp_syscall(bool enable);
186188
192194
193195 int sys_filter_load(struct db_filter_col *col, bool rawrc);
194196
197 int sys_notify_fd(void);
195198 int sys_notify_alloc(struct seccomp_notif **req,
196199 struct seccomp_notif_resp **resp);
197200 int sys_notify_receive(int fd, struct seccomp_notif *req);
4040 if (ctx == NULL)
4141 return ENOMEM;
4242
43 rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(open), 0);
43 rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(openat), 0);
4444 if (rc != 0)
4545 goto out;
4646
2929
3030 def test(args):
3131 f = SyscallFilter(KILL)
32 f.add_rule(ALLOW, "open")
32 f.add_rule(ALLOW, "openat")
3333 f.add_rule(ALLOW, "close")
3434 f.add_rule(ALLOW, "read",
3535 Arg(0, EQ, sys.stdin.fileno()),
77 test type: bpf-sim
88
99 # Testname Arch Syscall Arg0 Arg1 Arg2 Arg3 Arg4 Arg5 Result
10 04-sim-multilevel_chains all,-aarch64 open 0x856B008 4 N N N N ALLOW
10 04-sim-multilevel_chains all openat 0 0x856B008 4 N N N ALLOW
1111 04-sim-multilevel_chains all close 4 N N N N N ALLOW
1212 04-sim-multilevel_chains x86 read 0 0x856B008 0x7FFFFFFE N N N ALLOW
1313 04-sim-multilevel_chains x86_64 read 0 0x856B008 0x7FFFFFFFFFFFFFFE N N N ALLOW
2626 04-sim-multilevel_chains all rt_sigreturn N N N N N N ALLOW
2727 04-sim-multilevel_chains x86 0-2 N N N N N N KILL
2828 04-sim-multilevel_chains x86 7-172 N N N N N N KILL
29 04-sim-multilevel_chains x86 174-350 N N N N N N KILL
29 04-sim-multilevel_chains x86 174-294 N N N N N N KILL
30 04-sim-multilevel_chains x86 296-350 N N N N N N KILL
3031 04-sim-multilevel_chains x86_64 4-14 N N N N N N KILL
31 04-sim-multilevel_chains x86_64 16-350 N N N N N N KILL
32 04-sim-multilevel_chains x86_64 16-256 N N N N N N KILL
33 04-sim-multilevel_chains x86_64 258-350 N N N N N N KILL
3234
3335 test type: bpf-sim-fuzz
3436
5959 if (rc != 0)
6060 goto out;
6161
62 rc = seccomp_rule_add(ctx, SCMP_ACT_TRACE(1234), SCMP_SYS(open), 0);
62 rc = seccomp_rule_add(ctx, SCMP_ACT_TRACE(1234), SCMP_SYS(openat), 0);
6363 if (rc != 0)
6464 goto out;
6565
66 rc = seccomp_rule_add(ctx, SCMP_ACT_KILL_PROCESS, SCMP_SYS(stat), 0);
66 rc = seccomp_rule_add(ctx, SCMP_ACT_KILL_PROCESS, SCMP_SYS(fstat), 0);
6767 if (rc != 0)
6868 goto out;
6969
3636 f.add_rule(LOG, "rt_sigreturn")
3737 f.add_rule(ERRNO(errno.EPERM), "write")
3838 f.add_rule(TRAP, "close")
39 f.add_rule(TRACE(1234), "open")
40 f.add_rule(KILL_PROCESS, "stat")
39 f.add_rule(TRACE(1234), "openat")
40 f.add_rule(KILL_PROCESS, "fstat")
4141 return f
4242
4343 args = util.get_opt()
1010 06-sim-actions all read 4 0x856B008 80 N N N ALLOW
1111 06-sim-actions all write 1 0x856B008 N N N N ERRNO(1)
1212 06-sim-actions all close 4 N N N N N TRAP
13 06-sim-actions all,-aarch64 open 0x856B008 4 N N N N TRACE(1234)
14 06-sim-actions all,-aarch64 stat N N N N N N KILL_PROCESS
13 06-sim-actions all openat 0 0x856B008 4 N N N TRACE(1234)
14 06-sim-actions all fstat N N N N N N KILL_PROCESS
1515 06-sim-actions all rt_sigreturn N N N N N N LOG
1616 06-sim-actions x86 0-2 N N N N N N KILL
17 06-sim-actions x86 7-105 N N N N N N KILL
18 06-sim-actions x86 107-172 N N N N N N KILL
19 06-sim-actions x86 174-350 N N N N N N KILL
20 06-sim-actions x86_64 5-14 N N N N N N KILL
21 06-sim-actions x86_64 16-350 N N N N N N KILL
17 06-sim-actions x86 7-107 N N N N N N KILL
18 06-sim-actions x86 109-172 N N N N N N KILL
19 06-sim-actions x86 174-294 N N N N N N KILL
20 06-sim-actions x86 296-350 N N N N N N KILL
21 06-sim-actions x86_64 6-14 N N N N N N KILL
22 06-sim-actions x86_64 16-256 N N N N N N KILL
23 06-sim-actions x86_64 258-350 N N N N N N KILL
2224
2325 test type: bpf-sim-fuzz
2426
4040 seccomp_release(ctx);
4141 ctx = NULL;
4242
43 /* seccomp_reset error */
44 rc = seccomp_reset(ctx, SCMP_ACT_KILL + 1);
45 if (rc != -EINVAL)
46 return -1;
47 rc = seccomp_reset(ctx, SCMP_ACT_KILL);
48 if (rc != -EINVAL)
43 /* ensure that seccomp_reset(NULL, ...) is accepted */
44 rc = seccomp_reset(NULL, SCMP_ACT_ALLOW);
45 if (rc != 0)
4946 return -1;
5047
5148 /* seccomp_load error */
2020
2121 #include <sys/types.h>
2222 #include <sys/wait.h>
23 #include <asm/unistd.h>
2324 #include <unistd.h>
2425 #include <seccomp.h>
2526 #include <signal.h>
2930
3031 #include "util.h"
3132
32 #define MAGIC 0x1122334455667788UL
33
3433 int main(int argc, char *argv[])
3534 {
3635 int rc, fd = -1, status;
3736 struct seccomp_notif *req = NULL;
3837 struct seccomp_notif_resp *resp = NULL;
3938 scmp_filter_ctx ctx = NULL;
40 pid_t pid = 0;
39 pid_t pid = 0, magic;
40
41 magic = getpid();
4142
4243 ctx = seccomp_init(SCMP_ACT_ALLOW);
4344 if (ctx == NULL)
5859
5960 pid = fork();
6061 if (pid == 0)
61 exit(syscall(SCMP_SYS(getpid)) != MAGIC);
62 exit(syscall(__NR_getpid) != magic);
6263
6364 rc = seccomp_notify_alloc(&req, &resp);
6465 if (rc)
6768 rc = seccomp_notify_receive(fd, req);
6869 if (rc)
6970 goto out;
70 if (req->data.nr != SCMP_SYS(getpid)) {
71 if (req->data.nr != __NR_getpid) {
7172 rc = -EFAULT;
7273 goto out;
7374 }
7677 goto out;
7778
7879 resp->id = req->id;
79 resp->val = MAGIC;
80 resp->val = magic;
8081 resp->error = 0;
8182 resp->flags = 0;
8283 rc = seccomp_notify_respond(fd, resp);
9798 goto out;
9899 }
99100
101 rc = seccomp_reset(ctx, SCMP_ACT_ALLOW);
102 if (rc < 0)
103 goto out;
104
105 rc = seccomp_rule_add(ctx, SCMP_ACT_NOTIFY, SCMP_SYS(getppid), 0, NULL);
106 if (rc)
107 goto out;
108
109 rc = seccomp_load(ctx);
110 if (rc < 0)
111 goto out;
112
113 rc = seccomp_notify_fd(ctx);
114 if (rc < 0)
115 goto out;
116 if (rc != fd) {
117 rc = -EFAULT;
118 goto out;
119 } else
120 rc = 0;
121
100122 out:
101123 if (fd >= 0)
102124 close(fd);
5151 raise RuntimeError("Child process error")
5252 if os.WEXITSTATUS(rc) != 0:
5353 raise RuntimeError("Child process error")
54 f.reset(ALLOW)
55 f.add_rule(NOTIFY, "getppid")
56 f.load()
57 # no easy way to check the notification fd here
5458 quit(160)
5559
5660 test()
2020
2121 #include <sys/types.h>
2222 #include <sys/wait.h>
23 #include <asm/unistd.h>
2324 #include <unistd.h>
2425 #include <seccomp.h>
2526 #include <signal.h>
2930
3031 #include "util.h"
3132
32 #define MAGIC 0x1122334455667788UL
33
3433 int main(int argc, char *argv[])
3534 {
3635 int rc, fd = -1, status;
3736 struct seccomp_notif *req = NULL;
3837 struct seccomp_notif_resp *resp = NULL;
3938 scmp_filter_ctx ctx = NULL;
40 pid_t pid = 0;
39 pid_t pid = 0, magic;
40
41 magic = getpid();
4142
4243 ctx = seccomp_init(SCMP_ACT_ALLOW);
4344 if (ctx == NULL)
6263
6364 pid = fork();
6465 if (pid == 0)
65 exit(syscall(SCMP_SYS(getpid)) != MAGIC);
66 exit(syscall(__NR_getpid) != magic);
6667
6768 rc = seccomp_notify_alloc(&req, &resp);
6869 if (rc)
7172 rc = seccomp_notify_receive(fd, req);
7273 if (rc)
7374 goto out;
74 if (req->data.nr != SCMP_SYS(getpid)) {
75 if (req->data.nr != __NR_getpid) {
7576 rc = -EFAULT;
7677 goto out;
7778 }
8081 goto out;
8182
8283 resp->id = req->id;
83 resp->val = MAGIC;
84 resp->val = magic;
8485 resp->error = 0;
8586 resp->flags = 0;
8687 rc = seccomp_notify_respond(fd, resp);
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,
0 # Makefile.in generated by automake 1.16.2 from Makefile.am.
0 # Makefile.in generated by automake 1.16.1 from Makefile.am.
11 # @configure_input@
22
3 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
3 # Copyright (C) 1994-2018 Free Software Foundation, Inc.
44
55 # This Makefile.in is free software; the Free Software Foundation
66 # gives unlimited permission to copy and/or distribute it,