Compare commits

...

No commits in common. 'c9' and 'i8c-stream-5.26' have entirely different histories.

2
.gitignore vendored

@ -1 +1 @@
SOURCES/Test-Taint-1.08.tar.gz
SOURCES/Test-Taint-1.06.tar.gz

@ -1 +1 @@
109ff4158818a3b2e87dd1a67071bcb452936f9b SOURCES/Test-Taint-1.08.tar.gz
e128816a8a7eb0676e55ae82cc170ca3db50a601 SOURCES/Test-Taint-1.06.tar.gz

@ -0,0 +1,68 @@
From cab25a93c2e8383cff35f55271a60f51645c98ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 18 Jan 2017 11:02:39 +0100
Subject: [PATCH] Test taintedness on $^X instead of environment variables
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Test::Simple adds TEST_ACTIVE and TEST2_ACTIVE members into %Env.
These are not tainted. t/tainted_ok.t and t/tainted.t tests can fail
if they pick up one of them.
This patch changes the tests to use $^X, interpreter path, instead as
discussed and implemented in simalar Scalar-List-Utils' bug
<https://rt.cpan.org/Public/Bug/Display.html?id=119169>.
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
t/tainted.t | 7 ++-----
t/tainted_ok.t | 5 +----
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/t/tainted.t b/t/tainted.t
index bf1e629..f5fb6d1 100644
--- a/t/tainted.t
+++ b/t/tainted.t
@@ -7,11 +7,8 @@ use Test::More tests => 6;
use Test::Taint;
-my @keys = keys %ENV;
-my $key = shift @keys;
-
taint_checking_ok();
-ok( tainted($ENV{$key}), "\$ENV{$key} is tainted" );
+ok( tainted($^X), "\$^X is tainted" );
my $foo = 43;
ok( !tainted($foo), '43 is not tainted' );
@@ -21,7 +18,7 @@ RESET_SIG_DIE: {
local $SIG{__DIE__} = sub { $counter++ };
- ok( tainted($ENV{$key}), "\$ENV{$key} is tainted" );
+ ok( tainted($^X), "\$^X is tainted" );
is($counter, 0, 'counter was not incremented (our die did not fire)');
eval { die 'validly' };
diff --git a/t/tainted_ok.t b/t/tainted_ok.t
index 2dcc9db..ce87343 100644
--- a/t/tainted_ok.t
+++ b/t/tainted_ok.t
@@ -5,11 +5,8 @@ use strict;
use Test::Taint tests=>3;
-my @keys = keys %ENV;
-my $key = shift @keys;
-
taint_checking_ok();
-tainted_ok( $ENV{$key}, "\$ENV{$key} is tainted" );
+tainted_ok( $^X, "\$^X is tainted" );
my $foo = 43;
untainted_ok( $foo );
--
2.7.4

@ -1,13 +1,14 @@
Summary: Tools to test taintedness
Name: perl-Test-Taint
Version: 1.08
Release: 8%{?dist}
Version: 1.06
Release: 19%{?dist}
License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-Taint
Source0: https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/Test-Taint-%{version}.tar.gz
URL: http://search.cpan.org/dist/Test-Taint/
Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/Test-Taint-%{version}.tar.gz
# RHBZ#1413022, CPAN#119897
Patch0: Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: %{__perl}
BuildRequires: %{__make}
@ -43,6 +44,7 @@ Test::More style.
%prep
%setup -q -n Test-Taint-%{version}
%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="${RPM_OPT_FLAGS}" NO_PACKLIST=1
@ -62,43 +64,8 @@ chmod -R u+w $RPM_BUILD_ROOT/*
%{_mandir}/man3/*
%changelog
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.08-8
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.08-7
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.08-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.08-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 1.08-4
- Perl 5.32 rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.08-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.08-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Jun 20 2019 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.08-1
- Update to 1.08.
- Drop Test-Taint-1.06-Test-taintedness-on-X-instead-of-environment-variabl.patch.
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.06-23
- Perl 5.30 rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.06-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.06-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.06-20
- Perl 5.28 rebuild
* Thu Apr 25 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 1.06-19
- Rebuilt for MSVSphere 8.9
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.06-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

Loading…
Cancel
Save