diff options
author | Aaron Crane <arc@cpan.org> | 2017-03-19 09:57:37 +0000 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-03-19 10:11:37 +0000 |
commit | e42bf9ad925e88cba25f703da37689d11bdf6cad (patch) | |
tree | 3582806756971f64857d7ca0d22d9fea45d62a58 /Porting/sync-with-cpan | |
parent | b27c755c1786357fcd8f586663c4d84c918af50e (diff) | |
download | perl-e42bf9ad925e88cba25f703da37689d11bdf6cad.tar.gz |
Porting/sync-with-cpan: honour exec-bit whitelist
Reported by kid51++
Diffstat (limited to 'Porting/sync-with-cpan')
-rwxr-xr-x | Porting/sync-with-cpan | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Porting/sync-with-cpan b/Porting/sync-with-cpan index 510ff0a109..e6cfd8f36e 100755 --- a/Porting/sync-with-cpan +++ b/Porting/sync-with-cpan @@ -482,6 +482,15 @@ if (@de_exec && @delete) { @de_exec = grep {!$delete {$_}} @de_exec; } +# +# Mustn't change the +x bit on files that are whitelisted +# +if (@de_exec) { + my %permitted = map +(tr/\n//dr => 1), grep !/^#/, + do { local @ARGV = '../Porting/exec-bit.txt'; <> }; + @de_exec = grep !$permitted{"cpan/$pkg_dir/$_"}, @de_exec; +} + say "unlink $pkg_dir/$_" for @delete; say "git add $pkg_dir/$_" for @commit; say "git rm -f $pkg_dir/$_" for @gone; |