X-Git-Url: https://ruderich.org/simon/gitweb/?p=blhc%2Fblhc.git;a=blobdiff_plain;f=bin%2Fblhc;h=a28f36f1126e4a404b5cfce9b8c9c9f1127b6f82;hp=d804ecdea41338865a799061ad4c5fad01359639;hb=c53acd8e582d6065004d0d7a95e9eb829c17f1d6;hpb=981d562930dc0f7eb76323571ccad3332029371a diff --git a/bin/blhc b/bin/blhc index d804ecd..a28f36f 100755 --- a/bin/blhc +++ b/bin/blhc @@ -180,6 +180,12 @@ sub error_non_verbose_build { error_color(':', 'yellow'), $line; } +sub error_hardening_wrapper { + printf "%s%s %s\n", + error_color('HARDENING WRAPPER', 'red'), + error_color(':', 'yellow'), + 'no checks possible, aborting'; +} sub error_color { my ($message, $color) = @_; @@ -366,6 +372,14 @@ while (my $line = <>) { } } + # If hardening wrapper is used (wraps calls to gcc and adds hardening + # flags automatically) we can't perform any checks, abort. + if (not $start and $line =~ /^Build-Depends: .*\bhardening-wrapper\b/) { + error_hardening_wrapper(); + $exit |= 1 << 4; + exit $exit; + } + # We skip over unimportant lines at the beginning of the log to prevent # false positives. $start = 1 if $line =~ /^dpkg-buildpackage:/; @@ -695,6 +709,10 @@ Non verbose build. Missing hardening flags. +=item B<16> + +Hardening wrapper detected, no tests performed. + =back =head1 AUTHOR