X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=bin%2Fblhc;h=43000271861b6512d66543e6104361a9d9f15736;hb=1b2ee66712a01d7f89d25344fe6134854f98b1e8;hp=beb69519b35cd9bc002b3a252af85a884be1c02d;hpb=c16e86feba1469ae7ccac10e425953b055408a44;p=blhc%2Fblhc.git diff --git a/bin/blhc b/bin/blhc index beb6951..4300027 100755 --- a/bin/blhc +++ b/bin/blhc @@ -2,7 +2,7 @@ # Build log hardening check, checks build logs for missing hardening flags. -# Copyright (C) 2012-2018 Simon Ruderich +# Copyright (C) 2012-2019 Simon Ruderich # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -683,7 +683,7 @@ if ($option_help) { } if ($option_version) { print <<"EOF"; -blhc $VERSION Copyright (C) 2012-2018 Simon Ruderich +blhc $VERSION Copyright (C) 2012-2019 Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -954,6 +954,10 @@ foreach my $file (@ARGV) { # Detect architecture automatically unless overridden. if (not $arch + and index($line, 'dpkg-buildpackage: info: host architecture ') == 0) { + $arch = substr $line, 43, -1; # -1 to ignore '\n' at the end + # Older versions of dpkg-buildpackage + } elsif (not $arch and index($line, 'dpkg-buildpackage: host architecture ') == 0) { $arch = substr $line, 37, -1; # -1 to ignore '\n' at the end @@ -1117,7 +1121,7 @@ foreach my $file (@ARGV) { # Option or auto detected. if ($arch) { - # The following was partially copied from dpkg-dev 1.19.0.5 + # The following was partially copied from dpkg-dev 1.19.7 # (/usr/share/perl5/Dpkg/Vendor/Debian.pm, _add_build_flags()), # copyright Raphaël Hertzog , Guillem Jover # , Kees Cook , Canonical, Ltd. @@ -1134,8 +1138,24 @@ foreach my $file (@ARGV) { } my %builtin_pie_arch = map { $_ => 1 } qw( - amd64 arm64 armel armhf hurd-i386 i386 kfreebsd-amd64 kfreebsd-i386 - mips mipsel mips64el powerpc ppc64 ppc64el s390x sparc sparc64 + amd64 + arm64 + armel + armhf + hurd-i386 + i386 + kfreebsd-amd64 + kfreebsd-i386 + mips + mipsel + mips64el + powerpc + ppc64 + ppc64el + riscv64 + s390x + sparc + sparc64 ); # Disable unsupported hardening options. @@ -1759,7 +1779,7 @@ Ejari.aalto@cante.netE for their valuable input and suggestions. =head1 LICENSE AND COPYRIGHT -Copyright (C) 2012-2018 by Simon Ruderich +Copyright (C) 2012-2019 by Simon Ruderich This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by