xcrypt 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (199) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +106 -0
  3. data/ext/libxcrypt/AUTHORS +38 -0
  4. data/ext/libxcrypt/COPYING.LIB +502 -0
  5. data/ext/libxcrypt/ChangeLog +239 -0
  6. data/ext/libxcrypt/INSTALL +380 -0
  7. data/ext/libxcrypt/LICENSING +152 -0
  8. data/ext/libxcrypt/Makefile.am +704 -0
  9. data/ext/libxcrypt/Makefile.in +4110 -0
  10. data/ext/libxcrypt/NEWS +630 -0
  11. data/ext/libxcrypt/README +1 -0
  12. data/ext/libxcrypt/README.md +179 -0
  13. data/ext/libxcrypt/THANKS +13 -0
  14. data/ext/libxcrypt/TODO +1 -0
  15. data/ext/libxcrypt/TODO.md +100 -0
  16. data/ext/libxcrypt/aclocal.m4 +2617 -0
  17. data/ext/libxcrypt/autogen.sh +33 -0
  18. data/ext/libxcrypt/autom4te.cache/output.0 +19884 -0
  19. data/ext/libxcrypt/autom4te.cache/output.1 +19884 -0
  20. data/ext/libxcrypt/autom4te.cache/output.2 +19884 -0
  21. data/ext/libxcrypt/autom4te.cache/output.3 +19885 -0
  22. data/ext/libxcrypt/autom4te.cache/requests +714 -0
  23. data/ext/libxcrypt/autom4te.cache/traces.0 +4088 -0
  24. data/ext/libxcrypt/autom4te.cache/traces.1 +1060 -0
  25. data/ext/libxcrypt/autom4te.cache/traces.2 +4088 -0
  26. data/ext/libxcrypt/autom4te.cache/traces.3 +1060 -0
  27. data/ext/libxcrypt/build-aux/ci/ci-log-dependency-versions +79 -0
  28. data/ext/libxcrypt/build-aux/ci/ci-log-logfiles +22 -0
  29. data/ext/libxcrypt/build-aux/ci/clang-gcov-wrapper +2 -0
  30. data/ext/libxcrypt/build-aux/ci/configure-wrapper +10 -0
  31. data/ext/libxcrypt/build-aux/ci/summarize-coverage +24 -0
  32. data/ext/libxcrypt/build-aux/m4/ax_append_compile_flags.m4 +46 -0
  33. data/ext/libxcrypt/build-aux/m4/ax_append_flag.m4 +50 -0
  34. data/ext/libxcrypt/build-aux/m4/ax_check_compile_flag.m4 +53 -0
  35. data/ext/libxcrypt/build-aux/m4/ax_check_vscript.m4 +142 -0
  36. data/ext/libxcrypt/build-aux/m4/ax_gcc_func_attribute.m4 +246 -0
  37. data/ext/libxcrypt/build-aux/m4/ax_require_defined.m4 +37 -0
  38. data/ext/libxcrypt/build-aux/m4/ax_valgrind_check.m4 +239 -0
  39. data/ext/libxcrypt/build-aux/m4/libtool.m4 +8488 -0
  40. data/ext/libxcrypt/build-aux/m4/ltoptions.m4 +467 -0
  41. data/ext/libxcrypt/build-aux/m4/ltsugar.m4 +124 -0
  42. data/ext/libxcrypt/build-aux/m4/ltversion.m4 +24 -0
  43. data/ext/libxcrypt/build-aux/m4/lt~obsolete.m4 +99 -0
  44. data/ext/libxcrypt/build-aux/m4/pkg_compat.m4 +88 -0
  45. data/ext/libxcrypt/build-aux/m4/zw_alignment.m4 +90 -0
  46. data/ext/libxcrypt/build-aux/m4/zw_automodern.m4 +307 -0
  47. data/ext/libxcrypt/build-aux/m4/zw_detect_asan.m4 +24 -0
  48. data/ext/libxcrypt/build-aux/m4/zw_endianness.m4 +152 -0
  49. data/ext/libxcrypt/build-aux/m4/zw_ld_wrap.m4 +47 -0
  50. data/ext/libxcrypt/build-aux/m4/zw_prog_perl.m4 +40 -0
  51. data/ext/libxcrypt/build-aux/m4/zw_simple_warnings.m4 +150 -0
  52. data/ext/libxcrypt/build-aux/m4/zw_static_assert.m4 +68 -0
  53. data/ext/libxcrypt/build-aux/m4-autogen/compile +364 -0
  54. data/ext/libxcrypt/build-aux/m4-autogen/config.guess +1815 -0
  55. data/ext/libxcrypt/build-aux/m4-autogen/config.sub +2354 -0
  56. data/ext/libxcrypt/build-aux/m4-autogen/depcomp +792 -0
  57. data/ext/libxcrypt/build-aux/m4-autogen/install-sh +541 -0
  58. data/ext/libxcrypt/build-aux/m4-autogen/ltmain.sh +11524 -0
  59. data/ext/libxcrypt/build-aux/m4-autogen/missing +236 -0
  60. data/ext/libxcrypt/build-aux/m4-autogen/test-driver +160 -0
  61. data/ext/libxcrypt/build-aux/scripts/BuildCommon.pm +712 -0
  62. data/ext/libxcrypt/build-aux/scripts/check-perlcritic-config +76 -0
  63. data/ext/libxcrypt/build-aux/scripts/compute-symver-floor +116 -0
  64. data/ext/libxcrypt/build-aux/scripts/expand-selected-hashes +80 -0
  65. data/ext/libxcrypt/build-aux/scripts/gen-crypt-h +131 -0
  66. data/ext/libxcrypt/build-aux/scripts/gen-crypt-hashes-h +141 -0
  67. data/ext/libxcrypt/build-aux/scripts/gen-crypt-symbol-vers-h +150 -0
  68. data/ext/libxcrypt/build-aux/scripts/gen-libcrypt-map +67 -0
  69. data/ext/libxcrypt/build-aux/scripts/move-if-change +84 -0
  70. data/ext/libxcrypt/build-aux/scripts/skip-if-exec-format-error +78 -0
  71. data/ext/libxcrypt/codecov.yml +4 -0
  72. data/ext/libxcrypt/config.h.in +303 -0
  73. data/ext/libxcrypt/configure +19885 -0
  74. data/ext/libxcrypt/configure.ac +549 -0
  75. data/ext/libxcrypt/doc/crypt.3 +512 -0
  76. data/ext/libxcrypt/doc/crypt.5 +343 -0
  77. data/ext/libxcrypt/doc/crypt_checksalt.3 +106 -0
  78. data/ext/libxcrypt/doc/crypt_gensalt.3 +285 -0
  79. data/ext/libxcrypt/doc/crypt_gensalt_ra.3 +1 -0
  80. data/ext/libxcrypt/doc/crypt_gensalt_rn.3 +1 -0
  81. data/ext/libxcrypt/doc/crypt_preferred_method.3 +68 -0
  82. data/ext/libxcrypt/doc/crypt_r.3 +1 -0
  83. data/ext/libxcrypt/doc/crypt_ra.3 +1 -0
  84. data/ext/libxcrypt/doc/crypt_rn.3 +1 -0
  85. data/ext/libxcrypt/lib/alg-des-tables.c +3858 -0
  86. data/ext/libxcrypt/lib/alg-des.c +269 -0
  87. data/ext/libxcrypt/lib/alg-des.h +74 -0
  88. data/ext/libxcrypt/lib/alg-gost3411-2012-const.h +313 -0
  89. data/ext/libxcrypt/lib/alg-gost3411-2012-core.c +238 -0
  90. data/ext/libxcrypt/lib/alg-gost3411-2012-core.h +51 -0
  91. data/ext/libxcrypt/lib/alg-gost3411-2012-hmac.c +78 -0
  92. data/ext/libxcrypt/lib/alg-gost3411-2012-hmac.h +46 -0
  93. data/ext/libxcrypt/lib/alg-gost3411-2012-precalc.h +1426 -0
  94. data/ext/libxcrypt/lib/alg-gost3411-2012-ref.h +67 -0
  95. data/ext/libxcrypt/lib/alg-hmac-sha1.c +140 -0
  96. data/ext/libxcrypt/lib/alg-hmac-sha1.h +35 -0
  97. data/ext/libxcrypt/lib/alg-md4.c +270 -0
  98. data/ext/libxcrypt/lib/alg-md4.h +43 -0
  99. data/ext/libxcrypt/lib/alg-md5.c +291 -0
  100. data/ext/libxcrypt/lib/alg-md5.h +43 -0
  101. data/ext/libxcrypt/lib/alg-sha1.c +288 -0
  102. data/ext/libxcrypt/lib/alg-sha1.h +34 -0
  103. data/ext/libxcrypt/lib/alg-sha256.c +630 -0
  104. data/ext/libxcrypt/lib/alg-sha256.h +123 -0
  105. data/ext/libxcrypt/lib/alg-sha512.c +311 -0
  106. data/ext/libxcrypt/lib/alg-sha512.h +81 -0
  107. data/ext/libxcrypt/lib/alg-sm3-hmac.c +113 -0
  108. data/ext/libxcrypt/lib/alg-sm3-hmac.h +42 -0
  109. data/ext/libxcrypt/lib/alg-sm3.c +449 -0
  110. data/ext/libxcrypt/lib/alg-sm3.h +63 -0
  111. data/ext/libxcrypt/lib/alg-yescrypt-common.c +713 -0
  112. data/ext/libxcrypt/lib/alg-yescrypt-opt.c +1568 -0
  113. data/ext/libxcrypt/lib/alg-yescrypt-platform.c +106 -0
  114. data/ext/libxcrypt/lib/alg-yescrypt.h +360 -0
  115. data/ext/libxcrypt/lib/byteorder.h +164 -0
  116. data/ext/libxcrypt/lib/crypt-bcrypt.c +1061 -0
  117. data/ext/libxcrypt/lib/crypt-des-obsolete.c +215 -0
  118. data/ext/libxcrypt/lib/crypt-des.c +491 -0
  119. data/ext/libxcrypt/lib/crypt-gensalt-static.c +40 -0
  120. data/ext/libxcrypt/lib/crypt-gost-yescrypt.c +182 -0
  121. data/ext/libxcrypt/lib/crypt-md5.c +232 -0
  122. data/ext/libxcrypt/lib/crypt-nthash.c +134 -0
  123. data/ext/libxcrypt/lib/crypt-obsolete.h +40 -0
  124. data/ext/libxcrypt/lib/crypt-pbkdf1-sha1.c +260 -0
  125. data/ext/libxcrypt/lib/crypt-port.h +514 -0
  126. data/ext/libxcrypt/lib/crypt-scrypt.c +247 -0
  127. data/ext/libxcrypt/lib/crypt-sha256.c +308 -0
  128. data/ext/libxcrypt/lib/crypt-sha512.c +323 -0
  129. data/ext/libxcrypt/lib/crypt-sm3-yescrypt.c +189 -0
  130. data/ext/libxcrypt/lib/crypt-sm3.c +308 -0
  131. data/ext/libxcrypt/lib/crypt-static.c +44 -0
  132. data/ext/libxcrypt/lib/crypt-sunmd5.c +314 -0
  133. data/ext/libxcrypt/lib/crypt-yescrypt.c +177 -0
  134. data/ext/libxcrypt/lib/crypt.c +421 -0
  135. data/ext/libxcrypt/lib/crypt.h.in +249 -0
  136. data/ext/libxcrypt/lib/gen-des-tables.c +363 -0
  137. data/ext/libxcrypt/lib/hashes.conf +59 -0
  138. data/ext/libxcrypt/lib/libcrypt.map.in +48 -0
  139. data/ext/libxcrypt/lib/libcrypt.minver +97 -0
  140. data/ext/libxcrypt/lib/libxcrypt.pc.in +15 -0
  141. data/ext/libxcrypt/lib/util-base64.c +26 -0
  142. data/ext/libxcrypt/lib/util-gensalt-sha.c +88 -0
  143. data/ext/libxcrypt/lib/util-get-random-bytes.c +154 -0
  144. data/ext/libxcrypt/lib/util-make-failure-token.c +48 -0
  145. data/ext/libxcrypt/lib/util-xbzero.c +43 -0
  146. data/ext/libxcrypt/lib/util-xstrcpy.c +42 -0
  147. data/ext/libxcrypt/lib/xcrypt.h.in +58 -0
  148. data/ext/libxcrypt/libxcrypt.spec.rpkg +481 -0
  149. data/ext/libxcrypt/rpkg.conf +2 -0
  150. data/ext/libxcrypt/rpkg.macros +86 -0
  151. data/ext/libxcrypt/test/TestCommon.pm +326 -0
  152. data/ext/libxcrypt/test/alg-des.c +80 -0
  153. data/ext/libxcrypt/test/alg-gost3411-2012-hmac.c +90 -0
  154. data/ext/libxcrypt/test/alg-gost3411-2012.c +191 -0
  155. data/ext/libxcrypt/test/alg-hmac-sha1.c +187 -0
  156. data/ext/libxcrypt/test/alg-md4.c +111 -0
  157. data/ext/libxcrypt/test/alg-md5.c +134 -0
  158. data/ext/libxcrypt/test/alg-pbkdf-hmac-sha256.c +269 -0
  159. data/ext/libxcrypt/test/alg-sha1.c +111 -0
  160. data/ext/libxcrypt/test/alg-sha256.c +141 -0
  161. data/ext/libxcrypt/test/alg-sha512.c +170 -0
  162. data/ext/libxcrypt/test/alg-sm3-hmac.c +149 -0
  163. data/ext/libxcrypt/test/alg-sm3.c +168 -0
  164. data/ext/libxcrypt/test/alg-yescrypt.c +466 -0
  165. data/ext/libxcrypt/test/badsalt.c +726 -0
  166. data/ext/libxcrypt/test/badsetting.c +350 -0
  167. data/ext/libxcrypt/test/byteorder.c +254 -0
  168. data/ext/libxcrypt/test/checksalt.c +265 -0
  169. data/ext/libxcrypt/test/compile-strong-alias.c +43 -0
  170. data/ext/libxcrypt/test/crypt-badargs.c +392 -0
  171. data/ext/libxcrypt/test/crypt-gost-yescrypt.c +149 -0
  172. data/ext/libxcrypt/test/crypt-nested-call.c +180 -0
  173. data/ext/libxcrypt/test/crypt-sm3-yescrypt.c +149 -0
  174. data/ext/libxcrypt/test/crypt-too-long-phrase.c +157 -0
  175. data/ext/libxcrypt/test/des-cases.h +196 -0
  176. data/ext/libxcrypt/test/des-obsolete.c +206 -0
  177. data/ext/libxcrypt/test/des-obsolete_r.c +207 -0
  178. data/ext/libxcrypt/test/explicit-bzero.c +334 -0
  179. data/ext/libxcrypt/test/gensalt-bcrypt_x.c +54 -0
  180. data/ext/libxcrypt/test/gensalt-extradata.c +246 -0
  181. data/ext/libxcrypt/test/gensalt-nested-call.c +126 -0
  182. data/ext/libxcrypt/test/gensalt-nthash.c +65 -0
  183. data/ext/libxcrypt/test/gensalt.c +599 -0
  184. data/ext/libxcrypt/test/getrandom-fallbacks.c +295 -0
  185. data/ext/libxcrypt/test/getrandom-interface.c +211 -0
  186. data/ext/libxcrypt/test/ka-table-gen.py +945 -0
  187. data/ext/libxcrypt/test/ka-table.inc +5849 -0
  188. data/ext/libxcrypt/test/ka-tester.c +240 -0
  189. data/ext/libxcrypt/test/preferred-method.c +133 -0
  190. data/ext/libxcrypt/test/short-outbuf.c +119 -0
  191. data/ext/libxcrypt/test/special-char-salt.c +1160 -0
  192. data/ext/libxcrypt/test/symbols-compat.pl +137 -0
  193. data/ext/libxcrypt/test/symbols-renames.pl +107 -0
  194. data/ext/libxcrypt/test/symbols-static.pl +87 -0
  195. data/ext/xcrypt/xcrypt.c +9 -0
  196. data/lib/xcrypt/ffi.rb +76 -0
  197. data/lib/xcrypt/version.rb +5 -0
  198. data/lib/xcrypt.rb +89 -0
  199. metadata +267 -0
@@ -0,0 +1,67 @@
1
+ #! /usr/bin/perl
2
+ # Written by Zack Weinberg <zackw at panix.com> in 2017 and 2021.
3
+ # To the extent possible under law, Zack Weinberg has waived all
4
+ # copyright and related or neighboring rights to this work.
5
+ #
6
+ # See https://creativecommons.org/publicdomain/zero/1.0/ for further
7
+ # details.
8
+
9
+ # Generate an ELF-style "symbol version script" from a .map.in file.
10
+ # See libcrypt.map.in for an explanation of the format of .map.in
11
+ # files.
12
+
13
+ use v5.14; # implicit use strict, use feature ':5.14'
14
+ use warnings FATAL => 'all';
15
+ use utf8;
16
+ use open qw(:std :utf8);
17
+ no if $] >= 5.022, warnings => 'experimental::re_strict';
18
+ use if $] >= 5.022, re => 'strict';
19
+
20
+ use FindBin ();
21
+ use lib $FindBin::Bin;
22
+ use BuildCommon qw(
23
+ parse_version_map_in
24
+ );
25
+
26
+ sub output {
27
+ my ($symvers) = @_;
28
+ my $basemap = $symvers->basemap;
29
+ print "/* Generated from $basemap by ${FindBin::Script}. "
30
+ . "DO NOT EDIT. */\n";
31
+
32
+ my %symbols_for_ver;
33
+ for my $sym (@{$symvers->symbols}) {
34
+ next if !$sym->included;
35
+ for my $v (@{$sym->versions}) {
36
+ push @{$symbols_for_ver{$v}}, $sym->name;
37
+ }
38
+ }
39
+
40
+ my $vp;
41
+ for my $v (@{$symvers->versions}) {
42
+ next unless exists $symbols_for_ver{$v};
43
+ print "$v {\n global:\n";
44
+ for my $s (sort @{$symbols_for_ver{$v}}) {
45
+ print " $s;\n";
46
+ }
47
+ if (defined $vp) {
48
+ print "} $vp;\n";
49
+ } else {
50
+ print " local:\n *;\n};\n";
51
+ }
52
+ $vp = $v;
53
+ }
54
+ close STDOUT or die "write error: $!\n";
55
+ return;
56
+ }
57
+
58
+ #
59
+ # Main
60
+ #
61
+ exit 0 if eval {
62
+ output(parse_version_map_in(@ARGV));
63
+ 1;
64
+ };
65
+
66
+ print {*STDERR} "${FindBin::Script}: $@";
67
+ exit 1;
@@ -0,0 +1,84 @@
1
+ #!/bin/sh
2
+ # Like mv $1 $2, but if the files are the same, just delete $1.
3
+ # Status is zero if successful, nonzero otherwise.
4
+
5
+ VERSION='2018-03-07 03:47'; # UTC
6
+ # The definition above must lie within the first 8 lines in order
7
+ # for the Emacs time-stamp write hook (at end) to update it.
8
+ # If you change this file with Emacs, please let the write hook
9
+ # do its job. Otherwise, update this string manually.
10
+
11
+ # Copyright (C) 2002-2020 Free Software Foundation, Inc.
12
+
13
+ # This program is free software: you can redistribute it and/or modify
14
+ # it under the terms of the GNU General Public License as published by
15
+ # the Free Software Foundation, either version 3 of the License, or
16
+ # (at your option) any later version.
17
+
18
+ # This program is distributed in the hope that it will be useful,
19
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
20
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
+ # GNU General Public License for more details.
22
+
23
+ # You should have received a copy of the GNU General Public License
24
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
25
+
26
+ usage="usage: $0 SOURCE DEST"
27
+
28
+ help="$usage
29
+ or: $0 OPTION
30
+ If SOURCE is different than DEST, then move it to DEST; else remove SOURCE.
31
+
32
+ --help display this help and exit
33
+ --version output version information and exit
34
+
35
+ The variable CMPPROG can be used to specify an alternative to 'cmp'.
36
+
37
+ Report bugs to <bug-gnulib@gnu.org>."
38
+
39
+ year=`expr "$VERSION" : '\([^-]*\)'`
40
+ version=`expr "$VERSION" : '\([^ ]*\)'`
41
+ version="move-if-change (gnulib) $version
42
+ Copyright $year Free Software Foundation, Inc.
43
+ License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
44
+ This is free software: you are free to change and redistribute it.
45
+ There is NO WARRANTY, to the extent permitted by law."
46
+
47
+ cmpprog=${CMPPROG-cmp}
48
+
49
+ for arg
50
+ do
51
+ case $arg in
52
+ --help | --hel | --he | --h)
53
+ exec echo "$help" ;;
54
+ --version | --versio | --versi | --vers | --ver | --ve | --v)
55
+ exec echo "$version" ;;
56
+ --)
57
+ shift
58
+ break ;;
59
+ -*)
60
+ echo "$0: invalid option: $arg" >&2
61
+ exit 1 ;;
62
+ *)
63
+ break ;;
64
+ esac
65
+ done
66
+
67
+ test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; }
68
+
69
+ if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then
70
+ rm -f -- "$1"
71
+ else
72
+ if mv -f -- "$1" "$2"; then :; else
73
+ # Ignore failure due to a concurrent move-if-change.
74
+ test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1"
75
+ fi
76
+ fi
77
+
78
+ ## Local Variables:
79
+ ## eval: (add-hook 'before-save-hook 'time-stamp)
80
+ ## time-stamp-start: "VERSION='"
81
+ ## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
82
+ ## time-stamp-time-zone: "UTC0"
83
+ ## time-stamp-end: "'; # UTC"
84
+ ## End:
@@ -0,0 +1,78 @@
1
+ #! /usr/bin/perl
2
+ # Run a test given as @ARGV, and then munge its exit code to 77 if it
3
+ # failed because of an "exec format error."
4
+ #
5
+ # Written by Zack Weinberg <zackw at panix.com> in 2017--2020.
6
+ # To the extent possible under law, Zack Weinberg has waived all
7
+ # copyright and related or neighboring rights to this work.
8
+ #
9
+ # See https://creativecommons.org/publicdomain/zero/1.0/ for further
10
+ # details.
11
+
12
+ use v5.14; # implicit use strict; use feature ':5.14';
13
+ use warnings FATAL => 'all';
14
+ use utf8;
15
+ use open qw(:std :utf8);
16
+ no if $] >= 5.022, warnings => 'experimental::re_strict';
17
+ use if $] >= 5.022, re => 'strict';
18
+
19
+ use FindBin ();
20
+ use IPC::Open3 qw(open3);
21
+ use Symbol qw(gensym);
22
+
23
+ use lib $FindBin::Bin;
24
+ use BuildCommon qw(subprocess_error);
25
+
26
+ # We cannot simply exec the program and then check $!{ENOEXEC} if that
27
+ # fails, because Perl's `exec` primitive calls execvp(3), and POSIX
28
+ # requires execvp(3) to retry after rewriting the command line as
29
+ # `/bin/sh PROGRAM ARGUMENTS...` if execve(2) fails with ENOEXEC.
30
+ # This is a backward compatibility quirk for the sake of code written
31
+ # before `#!` was a thing; if you ask me, on modern systems it's a
32
+ # misfeature, but the Austin Group seems unwilling to change anything
33
+ # (see https://austingroupbugs.net/view.php?id=1435). Even if they
34
+ # did, we would be stuck with build-system C libraries that
35
+ # implemented the old bad behavior for many years.
36
+ #
37
+ # There is no way to call execve(2) directly from Perl. We could
38
+ # implement this program in C, but then we would need $(CC_FOR_BUILD),
39
+ # which currently we do not. So what we do, is rely on /bin/sh to
40
+ # have some kind of heuristic to detect when it's being asked to
41
+ # interpret a machine-code executable, and to print a recognizable
42
+ # error message when this happens. This is the same thing the old
43
+ # shell-based implementation did, so we can live with it.
44
+
45
+ my $status = eval {
46
+ my $child_err = gensym;
47
+ my $pid = open3('<&STDIN', '>&STDOUT', $child_err, @ARGV);
48
+ my $saw_enoexec = 0;
49
+
50
+ local $_;
51
+ while (<$child_err>) {
52
+ $saw_enoexec = 1
53
+ if m{\b(?:
54
+ [Ex]ec \s+ format \s+ error
55
+ | cannot \s+ execute \s+ (?:ELF \s+)? binary
56
+ )\b}x;
57
+ print {*STDERR} $_;
58
+ }
59
+ close $child_err or die "read error: $!\n";
60
+ waitpid $pid, 0 or die "waitpid: $!\n";
61
+
62
+ if (my $sig = ($? & 0x7F)) {
63
+ # subprocess_error knows how to print symbolic names for signals.
64
+ subprocess_error($ARGV[0]);
65
+ } else {
66
+ return 77 if $saw_enoexec;
67
+ return $? >> 8;
68
+ }
69
+ };
70
+ exit $status if defined $status;
71
+
72
+ # We only get here if there was an error.
73
+ my $err = $@;
74
+ $err =~ s/\s+ at \s+ \S+ \s+ line \s+ \d+ \.? \n? \Z//x;
75
+ $err =~ s/^open3: //;
76
+
77
+ print {*STDERR} "${FindBin::Script}: $err\n";
78
+ exit(($err =~ /\bExec format error\b/) ? 77 : 99);
@@ -0,0 +1,4 @@
1
+ ignore:
2
+ - "lib/gen-des-tables.c"
3
+ - "test"
4
+ - "/usr/**/*"
@@ -0,0 +1,303 @@
1
+ /* config.h.in. Generated from configure.ac by autoheader. */
2
+
3
+ #ifndef _CRYPT_CONFIG_H
4
+ #define _CRYPT_CONFIG_H 1
5
+
6
+ /* Define to 1 if crypt and crypt_r should return a "failure token" on
7
+ failure, or 0 if they should return NULL. */
8
+ #undef ENABLE_FAILURE_TOKENS
9
+
10
+ /* Define as 1 if the obsolete APIs (fcrypt, encrypt, setkey) should be
11
+ included, 0 otherwise. */
12
+ #undef ENABLE_OBSOLETE_API
13
+
14
+ /* Define to 1 if fcrypt, encrypt{,_r}, setkey{,_r} should set errno to
15
+ ENOSYS, or 0 if they should perform real operations. */
16
+ #undef ENABLE_OBSOLETE_API_ENOSYS
17
+
18
+ /* Define as an #if expression that is true when compiling for a big-endian
19
+ CPU. */
20
+ #undef ENDIANNESS_IS_BIG
21
+
22
+ /* Define as an #if expression that is true when compiling for a little-endian
23
+ CPU. */
24
+ #undef ENDIANNESS_IS_LITTLE
25
+
26
+ /* Define as an #if expression that is true when compiling for a PDP-endian
27
+ CPU. */
28
+ #undef ENDIANNESS_IS_PDP
29
+
30
+ /* Define to 1 if you have the 'arc4random_buf' function. */
31
+ #undef HAVE_ARC4RANDOM_BUF
32
+
33
+ /* Define to 1 if you have the <dlfcn.h> header file. */
34
+ #undef HAVE_DLFCN_H
35
+
36
+ /* Define to 1 if you have the <endian.h> header file. */
37
+ #undef HAVE_ENDIAN_H
38
+
39
+ /* Define to 1 if you have the 'explicit_bzero' function. */
40
+ #undef HAVE_EXPLICIT_BZERO
41
+
42
+ /* Define to 1 if you have the 'explicit_memset' function. */
43
+ #undef HAVE_EXPLICIT_MEMSET
44
+
45
+ /* Define to 1 if you have the <fcntl.h> header file. */
46
+ #undef HAVE_FCNTL_H
47
+
48
+ /* Define to 1 if the system has the `symver' function attribute */
49
+ #undef HAVE_FUNC_ATTRIBUTE_SYMVER
50
+
51
+ /* Define to 1 if you have the 'getentropy' function. */
52
+ #undef HAVE_GETENTROPY
53
+
54
+ /* Define to 1 if you have the 'getrandom' function. */
55
+ #undef HAVE_GETRANDOM
56
+
57
+ /* Define to 1 if you have the <inttypes.h> header file. */
58
+ #undef HAVE_INTTYPES_H
59
+
60
+ /* Define to 1 if -Wl,--wrap,SYMBOL can be used to intercept calls to SYMBOL
61
+ at link time. */
62
+ #undef HAVE_LD_WRAP
63
+
64
+ /* Define if stddef.h provides max_align_t. */
65
+ #undef HAVE_MAX_ALIGN_T
66
+
67
+ /* Define to 1 if you have the 'memset_explicit' function. */
68
+ #undef HAVE_MEMSET_EXPLICIT
69
+
70
+ /* Define to 1 if you have the 'memset_s' function. */
71
+ #undef HAVE_MEMSET_S
72
+
73
+ /* Define to 1 if you have the <minix/config.h> header file. */
74
+ #undef HAVE_MINIX_CONFIG_H
75
+
76
+ /* Define to 1 if you have the 'open64' function. */
77
+ #undef HAVE_OPEN64
78
+
79
+ /* Define if <assert.h> defines static_assert. */
80
+ #undef HAVE_STATIC_ASSERT_IN_ASSERT_H
81
+
82
+ /* Define to 1 if you have the <stdbool.h> header file. */
83
+ #undef HAVE_STDBOOL_H
84
+
85
+ /* Define to 1 if you have the <stdint.h> header file. */
86
+ #undef HAVE_STDINT_H
87
+
88
+ /* Define to 1 if you have the <stdio.h> header file. */
89
+ #undef HAVE_STDIO_H
90
+
91
+ /* Define to 1 if you have the <stdlib.h> header file. */
92
+ #undef HAVE_STDLIB_H
93
+
94
+ /* Define to 1 if you have the <strings.h> header file. */
95
+ #undef HAVE_STRINGS_H
96
+
97
+ /* Define to 1 if you have the <string.h> header file. */
98
+ #undef HAVE_STRING_H
99
+
100
+ /* Define as 1 if symbol versioning is enabled and applied. */
101
+ #undef HAVE_SYMVER
102
+
103
+ /* Define to 1 if you have the 'syscall' function. */
104
+ #undef HAVE_SYSCALL
105
+
106
+ /* Define if <sys/cdefs.h> defines __BEGIN_DECLS and __END_DECLS. */
107
+ #undef HAVE_SYS_CDEFS_BEGIN_END_DECLS
108
+
109
+ /* Define to 1 if you have the <sys/cdefs.h> header file. */
110
+ #undef HAVE_SYS_CDEFS_H
111
+
112
+ /* Define if <sys/cdefs.h> defines __THROW. */
113
+ #undef HAVE_SYS_CDEFS_THROW
114
+
115
+ /* Define to 1 if you have the <sys/endian.h> header file. */
116
+ #undef HAVE_SYS_ENDIAN_H
117
+
118
+ /* Define to 1 if you have the <sys/param.h> header file. */
119
+ #undef HAVE_SYS_PARAM_H
120
+
121
+ /* Define to 1 if you have the <sys/random.h> header file. */
122
+ #undef HAVE_SYS_RANDOM_H
123
+
124
+ /* Define to 1 if you have the <sys/stat.h> header file. */
125
+ #undef HAVE_SYS_STAT_H
126
+
127
+ /* Define to 1 if you have the <sys/syscall.h> header file. */
128
+ #undef HAVE_SYS_SYSCALL_H
129
+
130
+ /* Define to 1 if you have the <sys/types.h> header file. */
131
+ #undef HAVE_SYS_TYPES_H
132
+
133
+ /* Define to 1 if you have the <ucontext.h> header file. */
134
+ #undef HAVE_UCONTEXT_H
135
+
136
+ /* Define to 1 if you have the <unistd.h> header file. */
137
+ #undef HAVE_UNISTD_H
138
+
139
+ /* Define to 1 if you have the <valgrind/valgrind.h> header file. */
140
+ #undef HAVE_VALGRIND_VALGRIND_H
141
+
142
+ /* Define to 1 if you have the <wchar.h> header file. */
143
+ #undef HAVE_WCHAR_H
144
+
145
+ /* Define if the compiler supports the _Static_assert intrinsic. */
146
+ #undef HAVE__STATIC_ASSERT
147
+
148
+ /* Define to the sub-directory where libtool stores uninstalled libraries. */
149
+ #undef LT_OBJDIR
150
+
151
+ /* Name of package */
152
+ #undef PACKAGE
153
+
154
+ /* Define to the address where bug reports for this package should be sent. */
155
+ #undef PACKAGE_BUGREPORT
156
+
157
+ /* Define to the full name of this package. */
158
+ #undef PACKAGE_NAME
159
+
160
+ /* Define to the full name and version of this package. */
161
+ #undef PACKAGE_STRING
162
+
163
+ /* Define to the one symbol short name of this package. */
164
+ #undef PACKAGE_TARNAME
165
+
166
+ /* Define to the home page for this package. */
167
+ #undef PACKAGE_URL
168
+
169
+ /* Define to the version of this package. */
170
+ #undef PACKAGE_VERSION
171
+
172
+ /* Define to 1 if all of the C89 standard headers exist (not just the ones
173
+ required in a freestanding environment). This macro is provided for
174
+ backward compatibility; new code need not use it. */
175
+ #undef STDC_HEADERS
176
+
177
+ /* Define as the lowest compatibility symbol version that is actually included
178
+ in libcrypt.so. */
179
+ #undef SYMVER_FLOOR
180
+
181
+ /* Define to 1 if getcontext, setcontext, makecontext, and swapcontext are
182
+ available from ucontext.h without deprecation warnings. */
183
+ #undef USE_SWAPCONTEXT
184
+
185
+ /* Enable extensions on AIX, Interix, z/OS. */
186
+ #ifndef _ALL_SOURCE
187
+ # undef _ALL_SOURCE
188
+ #endif
189
+ /* Enable general extensions on macOS. */
190
+ #ifndef _DARWIN_C_SOURCE
191
+ # undef _DARWIN_C_SOURCE
192
+ #endif
193
+ /* Enable general extensions on Solaris. */
194
+ #ifndef __EXTENSIONS__
195
+ # undef __EXTENSIONS__
196
+ #endif
197
+ /* Enable GNU extensions on systems that have them. */
198
+ #ifndef _GNU_SOURCE
199
+ # undef _GNU_SOURCE
200
+ #endif
201
+ /* Enable X/Open compliant socket functions that do not require linking
202
+ with -lxnet on HP-UX 11.11. */
203
+ #ifndef _HPUX_ALT_XOPEN_SOCKET_API
204
+ # undef _HPUX_ALT_XOPEN_SOCKET_API
205
+ #endif
206
+ /* Identify the host operating system as Minix.
207
+ This macro does not affect the system headers' behavior.
208
+ A future release of Autoconf may stop defining this macro. */
209
+ #ifndef _MINIX
210
+ # undef _MINIX
211
+ #endif
212
+ /* Enable general extensions on NetBSD.
213
+ Enable NetBSD compatibility extensions on Minix. */
214
+ #ifndef _NETBSD_SOURCE
215
+ # undef _NETBSD_SOURCE
216
+ #endif
217
+ /* Enable OpenBSD compatibility extensions on NetBSD.
218
+ Oddly enough, this does nothing on OpenBSD. */
219
+ #ifndef _OPENBSD_SOURCE
220
+ # undef _OPENBSD_SOURCE
221
+ #endif
222
+ /* Define to 1 if needed for POSIX-compatible behavior. */
223
+ #ifndef _POSIX_SOURCE
224
+ # undef _POSIX_SOURCE
225
+ #endif
226
+ /* Define to 2 if needed for POSIX-compatible behavior. */
227
+ #ifndef _POSIX_1_SOURCE
228
+ # undef _POSIX_1_SOURCE
229
+ #endif
230
+ /* Enable POSIX-compatible threading on Solaris. */
231
+ #ifndef _POSIX_PTHREAD_SEMANTICS
232
+ # undef _POSIX_PTHREAD_SEMANTICS
233
+ #endif
234
+ /* Enable extensions specified by ISO/IEC TS 18661-5:2014. */
235
+ #ifndef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
236
+ # undef __STDC_WANT_IEC_60559_ATTRIBS_EXT__
237
+ #endif
238
+ /* Enable extensions specified by ISO/IEC TS 18661-1:2014. */
239
+ #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
240
+ # undef __STDC_WANT_IEC_60559_BFP_EXT__
241
+ #endif
242
+ /* Enable extensions specified by ISO/IEC TS 18661-2:2015. */
243
+ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__
244
+ # undef __STDC_WANT_IEC_60559_DFP_EXT__
245
+ #endif
246
+ /* Enable extensions specified by C23 Annex F. */
247
+ #ifndef __STDC_WANT_IEC_60559_EXT__
248
+ # undef __STDC_WANT_IEC_60559_EXT__
249
+ #endif
250
+ /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
251
+ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
252
+ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__
253
+ #endif
254
+ /* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
255
+ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
256
+ # undef __STDC_WANT_IEC_60559_TYPES_EXT__
257
+ #endif
258
+ /* Enable extensions specified by ISO/IEC TR 24731-2:2010. */
259
+ #ifndef __STDC_WANT_LIB_EXT2__
260
+ # undef __STDC_WANT_LIB_EXT2__
261
+ #endif
262
+ /* Enable extensions specified by ISO/IEC 24747:2009. */
263
+ #ifndef __STDC_WANT_MATH_SPEC_FUNCS__
264
+ # undef __STDC_WANT_MATH_SPEC_FUNCS__
265
+ #endif
266
+ /* Enable extensions on HP NonStop. */
267
+ #ifndef _TANDEM_SOURCE
268
+ # undef _TANDEM_SOURCE
269
+ #endif
270
+ /* Enable X/Open extensions. Define to 500 only if necessary
271
+ to make mbstate_t available. */
272
+ #ifndef _XOPEN_SOURCE
273
+ # undef _XOPEN_SOURCE
274
+ #endif
275
+
276
+
277
+ /* Version number of package */
278
+ #undef VERSION
279
+
280
+ /* Define when compiling with ASan. Only affects tests. */
281
+ #undef XCRYPT_USE_ASAN
282
+
283
+ /* Number of bits in a file offset, on hosts where this is settable. */
284
+ #undef _FILE_OFFSET_BITS
285
+
286
+ /* Define to 1 on platforms where this makes off_t a 64-bit type. */
287
+ #undef _LARGE_FILES
288
+
289
+ /* Number of bits in time_t, on hosts where this is settable. */
290
+ #undef _TIME_BITS
291
+
292
+ /* Define to 1 on platforms where this makes time_t a 64-bit type. */
293
+ #undef __MINGW_USE_VC2005_COMPAT
294
+
295
+ /* Define as a type specifier which sets the alignment of a variable or type
296
+ to N bytes. C11 alignas(TYPE) does not need to be supported. */
297
+ #undef alignas
298
+
299
+ /* Define as an expression which evaluates to the alignment of THING. Must be
300
+ computed at compile time (an "integer constant expression"). */
301
+ #undef alignof
302
+
303
+ #endif /* config.h */