# Build log hardening check, checks build logs for missing hardening flags.
-# Copyright (C) 2012-2014 Simon Ruderich
+# Copyright (C) 2012-2015 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
use Getopt::Long ();
use Text::ParseWords ();
-our $VERSION = '0.04';
+our $VERSION = '0.05';
# CONSTANTS/VARIABLES
}
if ($option_version) {
print <<"EOF";
-blhc $VERSION Copyright (C) 2012-2014 Simon Ruderich
+blhc $VERSION Copyright (C) 2012-2015 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
my $harden_pie = $option_pie; # defaults to 0
# Does this build log use ada? Ada also uses gcc as compiler but uses
- # different CFLAGS. But only perform ada checks if an ada compiler used
+ # different CFLAGS. But only perform ada checks if an ada compiler is used
# for performance reasons.
my $ada = 0;
# Option or auto detected.
if ($arch) {
- # The following was partially copied from dpkg-dev 1.17.11
+ # The following was partially copied from dpkg-dev 1.18.2
# (/usr/share/perl5/Dpkg/Vendor/Debian.pm, add_hardening_flags()),
# copyright Raphaƫl Hertzog <hertzog@debian.org>, Kees Cook
# <kees@debian.org>, Canonical, Ltd. licensed under GPL version 2 or
my ($abi, $os, $cpu) = Dpkg::Arch::debarch_to_debtriplet($arch);
# Disable unsupported hardening options.
- if ($os !~ /^(?:linux|knetbsd|hurd)$/ or
- $cpu =~ /^(?:hppa|mips|mipsel|avr32)$/) {
+ if ($os !~ /^(?:linux|knetbsd|hurd)$/ or $cpu =~ /^(?:hppa|avr32)$/) {
$harden_pie = 0;
}
- if ($cpu =~ /^(?:ia64|alpha|mips|mipsel|hppa)$/ or $arch eq 'arm') {
+ if ($cpu =~ /^(?:ia64|alpha|hppa)$/ or $arch eq 'arm') {
$harden_stack = 0;
$harden_stack_strong = 0;
}
=head1 LICENSE AND COPYRIGHT
-Copyright (C) 2012-2014 by Simon Ruderich
+Copyright (C) 2012-2015 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