diff options
author | Guillem Jover <guillem@debian.org> | 2018-12-03 08:57:14 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2019-02-23 16:24:22 +0100 |
commit | 769e87e0b9943bae4c62f1a5c85581be653d74b8 (patch) | |
tree | a21c49ccbc15c65e444328a2876d61ee5a333f57 /scripts | |
parent | dd406dc36649bacf646c51735214b9b21a82b5ae (diff) | |
download | dpkg-769e87e0b9943bae4c62f1a5c85581be653d74b8.tar.gz |
Dpkg::Vendor::Debian: Add support for usr-local-has-* tainted tags
These will detect problematic files under /usr/local which can taint
the current build.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Dpkg/Vendor/Debian.pm | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/Dpkg/Vendor/Debian.pm b/scripts/Dpkg/Vendor/Debian.pm index 6948bdc16..a352bbdde 100644 --- a/scripts/Dpkg/Vendor/Debian.pm +++ b/scripts/Dpkg/Vendor/Debian.pm @@ -455,6 +455,20 @@ sub _build_tainted_by { } } + require File::Find; + my %usr_local_types = ( + configs => [ qw(etc) ], + includes => [ qw(include) ], + programs => [ qw(bin sbin) ], + libraries => [ qw(lib) ], + ); + foreach my $type (keys %usr_local_types) { + File::Find::find({ + wanted => sub { $tainted{"usr-local-has-$type"} = 1 if -f }, + no_chdir => 1, + }, map { "/usr/local/$_" } @{$usr_local_types{$type}}); + } + my @tainted = sort keys %tainted; return @tainted; } |