summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Install
diff options
context:
space:
mode:
authorDavid Lawrence <dkl@mozilla.com>2015-01-27 05:27:50 +0100
committerByron Jones <glob@mozilla.com>2015-01-27 05:27:50 +0100
commit90244813fe8110fc91f3746ebd93880e1c911cf1 (patch)
tree34ff732e860855956f043d0a41db8b2f30ef0095 /Bugzilla/Install
parenta748745d3eb9110b0c6bcd803d8d86db8951ad43 (diff)
downloadbugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.gz
bugzilla-90244813fe8110fc91f3746ebd93880e1c911cf1.tar.xz
Bug 1124432: Backport upstream bug 1079065 to bmo/4.2 to fix improper use of open() calls
Diffstat (limited to 'Bugzilla/Install')
-rw-r--r--Bugzilla/Install/CPAN.pm4
-rw-r--r--Bugzilla/Install/Filesystem.pm2
2 files changed, 3 insertions, 3 deletions
diff --git a/Bugzilla/Install/CPAN.pm b/Bugzilla/Install/CPAN.pm
index 31bd7f88f..e6afa1f3b 100644
--- a/Bugzilla/Install/CPAN.pm
+++ b/Bugzilla/Install/CPAN.pm
@@ -222,8 +222,8 @@ sub set_cpan_config {
# Calling a senseless autoload that does nothing makes us
# automatically load any existing configuration.
# We want to avoid the "invalid command" message.
- open(my $saveout, ">&STDOUT");
- open(STDOUT, '>/dev/null');
+ open(my $saveout, ">&", "STDOUT");
+ open(STDOUT, '>', '/dev/null');
eval { CPAN->ignore_this_error_message_from_bugzilla; };
undef $@;
close(STDOUT);
diff --git a/Bugzilla/Install/Filesystem.pm b/Bugzilla/Install/Filesystem.pm
index 2b7e3781c..5d4d84f88 100644
--- a/Bugzilla/Install/Filesystem.pm
+++ b/Bugzilla/Install/Filesystem.pm
@@ -644,7 +644,7 @@ sub _update_old_charts {
($in_file =~ /\.orig$/i));
rename("$in_file", "$in_file.orig") or next;
- open(IN, "$in_file.orig") or next;
+ open(IN, "<", "$in_file.orig") or next;
open(OUT, '>', $in_file) or next;
# Fields in the header