/[smeserver]/rpms/e-smith-lib/sme9/e-smith-lib-2.4.0-PerlCritic-getLicenseFile.patch
ViewVC logotype

Contents of /rpms/e-smith-lib/sme9/e-smith-lib-2.4.0-PerlCritic-getLicenseFile.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sat Apr 5 16:51:17 2014 UTC (10 years, 6 months ago) by wellsi
Branch: MAIN
CVS Tags: e-smith-lib-2_4_0-18_el6_sme, e-smith-lib-2_4_0-17_el6_sme, e-smith-lib-2_4_0-15_el6_sme, e-smith-lib-2_4_0-16_el6_sme, e-smith-lib-2_4_0-14_el6_sme, HEAD
* Sat Apr 5 2014 Ian Wells <esmith@wellsi.com> 2.4.0-14.sme
- Untaint the license filename [SME: 8305]
- Non-functional perl::Critic changes.

1 diff -ruN e-smith-lib-2.4.0.mod/root/usr/share/perl5/vendor_perl/esmith/util.pm e-smith-lib-2.4.0/root/usr/share/perl5/vendor_perl/esmith/util.pm
2 --- e-smith-lib-2.4.0.mod/root/usr/share/perl5/vendor_perl/esmith/util.pm 2014-04-05 09:03:06.000000000 -0700
3 +++ e-smith-lib-2.4.0/root/usr/share/perl5/vendor_perl/esmith/util.pm 2014-04-05 09:11:04.000000000 -0700
4 @@ -1187,7 +1187,7 @@
5
6 if ($locale)
7 {
8 - $locale =~ s/-(\S\S)/_\U$1/;
9 + $locale =~ s/-(\S\S)/_\U$1/s;
10 }
11 else
12 {
13 @@ -1195,21 +1195,21 @@
14
15 my ( $lang, @rest ) = $db->getLocale();
16
17 - $lang = $lang || "en_US";
18 + $lang = $lang || 'en_US';
19
20 $locale = $lang;
21 }
22
23 - my $base_dir = $ENV{ESMITH_LICENSE_DIR} || "/etc/e-smith/licenses";
24 + my $base_dir = $ENV{ESMITH_LICENSE_DIR} || '/etc/e-smith/licenses';
25
26 - $locale = "en_US" unless ( -d "${base_dir}/${locale}" );
27 + $locale = 'en_US' unless ( -d "${base_dir}/${locale}" );
28
29 my $dir = "${base_dir}/${locale}";
30
31 opendir( DIR, $dir ) || die "Couldn't open licenses directory\n";
32
33 my @licenses;
34 - foreach my $license ( readdir(DIR) )
35 + foreach my $license ( readdir DIR )
36 {
37 untaint ($license);
38 my $file = "${dir}/${license}";

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed