File: cpan-without-dot.diff

package info (click to toggle)
perl 5.20.2-3+deb8u11
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 102,964 kB
  • sloc: perl: 555,553; ansic: 214,041; sh: 38,121; pascal: 8,783; cpp: 3,895; makefile: 2,393; xml: 2,325; yacc: 1,741
file content (30 lines) | stat: -rw-r--r-- 926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From e5548dc898b4bdba6c164f70e8c42827e414e7be Mon Sep 17 00:00:00 2001
From: Todd Rinaldo <toddr@cpan.org>
Date: Thu, 31 Mar 2016 17:04:47 -0500
Subject: Set PERL_USE_UNSAFE_INC for cpan usage

This change allows the majority of Perl modules to build/test/install from the
cpan client without having to modify them.

Bug: https://rt.perl.org/Public/Bug/Display.html?id=127810
Patch-Name: debian/CVE-2016-1238/cpan-without-dot.diff
---
 cpan/CPAN/scripts/cpan | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/cpan/CPAN/scripts/cpan b/cpan/CPAN/scripts/cpan
index 664adcb3a4..2dd25dc041 100644
--- a/cpan/CPAN/scripts/cpan
+++ b/cpan/CPAN/scripts/cpan
@@ -4,6 +4,11 @@ BEGIN { pop @INC if $INC[-1] eq '.' }
 use strict;
 use vars qw($VERSION);
 
+BEGIN {
+    # make sure we can install any modules from CPAN without patching them
+    $ENV{PERL_USE_UNSAFE_INC} = 1;
+}
+
 use App::Cpan '1.60_02';
 $VERSION = '1.61';