summaryrefslogtreecommitdiff
path: root/lib/Temp/File-Temp-0.12/t/security.t
diff options
context:
space:
mode:
authorAndreas Mair <amair.sob@googlemail.com>2005-04-12 12:32:06 +0200
committerAndreas Mair <amair.sob@googlemail.com>2005-04-12 12:32:06 +0200
commit022c4f162d7b83cb287b7d16749899d9e7c4242a (patch)
treeecc7dcf65b3e43713d9ecd36a7982dade2197f8a /lib/Temp/File-Temp-0.12/t/security.t
parent0d6ba991052f971564296c537887e030d13ee730 (diff)
downloadvdradmin-am-0.97-am3.1.tar.gz
vdradmin-am-0.97-am3.1.tar.bz2
2005-04-12: 0.97-am3.1v0.97-am3.1
- Updated Spanish i18n (Thanks to Ruediger Jung). - Added VDR Admin man-page (Thanks to Thomas Schmidt). - Improved detection of another running vdradmind.pl at startup (if vdradmind.pid is found but pid is not a vdradmind.pl vdradmin will start anyway). - Added IMDb lookup button in prog_detail (Suggested by Marcus). - Use configured Streamdev port for live streaming. - Added warning when using EPG_DIRECT. - Updated INSTALL file. - Renamed i18n Español to Spanish (Requested by Ruediger Jung). - Fixed ":" & "|" handling in timer's title and summary (Thanks to Der_Pit for pointing me to that). - Added "Select all" to timer/autotimer/recordings list. - Exchanged priority and lifetime textfields in config.html to match order used at other places (Requested by Ruediger Jung). - Added vdradmin-0.95-0.9pre5-email.diff (Author: blafasel) patch: send email on timers added by AutoTimer (needs sendEmail available here: http://caspian.dotconf.net/menu/Software/SendEmail/). - Fixed timer add/edit where date got set wrong in case it has been entered as "yyyy-mm-dd". - Fixed problems when using MOD_GZIP (Thanks Ville Skyttä). - Fixed Makefile once again (Thanks Zzam for pointing me to this). - Added patches submitted by stefan.h (Thanks!): -> New config option EPG_PRUNE. You can set a channel number up to which VDRAdmin will read EPG. Might reduce memory usage and read-in time. Set to "0" to read all channels. -> Optimizations and bug fixes. - Added install files for Debian (Thanks to Steffen Oberle for requesting and troubleshooting).
Diffstat (limited to 'lib/Temp/File-Temp-0.12/t/security.t')
-rwxr-xr-xlib/Temp/File-Temp-0.12/t/security.t136
1 files changed, 0 insertions, 136 deletions
diff --git a/lib/Temp/File-Temp-0.12/t/security.t b/lib/Temp/File-Temp-0.12/t/security.t
deleted file mode 100755
index f08f6db..0000000
--- a/lib/Temp/File-Temp-0.12/t/security.t
+++ /dev/null
@@ -1,136 +0,0 @@
-#!/usr/bin/perl -w
-# Test for File::Temp - Security levels
-
-# Some of the security checking will not work on all platforms
-# Test a simple open in the cwd and tmpdir foreach of the
-# security levels
-
-use Test;
-BEGIN { plan tests => 13 }
-
-use strict;
-use File::Spec;
-
-# Set up END block - this needs to happen before we load
-# File::Temp since this END block must be evaluated after the
-# END block configured by File::Temp
-my @files; # list of files to remove
-END { foreach (@files) { ok( !(-e $_) )} }
-
-use File::Temp qw/ tempfile unlink0 /;
-ok(1);
-
-# The high security tests must currently be skipped on some platforms
-my $skipplat = ( (
- # No sticky bits.
- $^O eq 'MSWin32' || $^O eq 'os2' || $^O eq 'dos'
- ) ? 1 : 0 );
-
-# Can not run high security tests in perls before 5.6.0
-my $skipperl = ($] < 5.006 ? 1 : 0 );
-
-# Determine whether we need to skip things and why
-my $skip = 0;
-if ($skipplat) {
- $skip = "Skip Not supported on this platform";
-} elsif ($skipperl) {
- $skip = "Skip Perl version must be v5.6.0 for these tests";
-
-}
-
-print "# We will be skipping some tests : $skip\n" if $skip;
-
-# start off with basic checking
-
-File::Temp->safe_level( File::Temp::STANDARD );
-
-print "# Testing with STANDARD security...\n";
-
-&test_security(0);
-
-# Try medium
-
-File::Temp->safe_level( File::Temp::MEDIUM )
- unless $skip;
-
-print "# Testing with MEDIUM security...\n";
-
-# Now we need to start skipping tests
-&test_security($skip);
-
-# Try HIGH
-
-File::Temp->safe_level( File::Temp::HIGH )
- unless $skip;
-
-print "# Testing with HIGH security...\n";
-
-&test_security($skip);
-
-exit;
-
-# Subroutine to open two temporary files.
-# one is opened in the current dir and the other in the temp dir
-
-sub test_security {
-
- # Read in the skip flag
- my $skip = shift;
-
- # If we are skipping we need to simply fake the correct number
- # of tests -- we dont use skip since the tempfile() commands will
- # fail with MEDIUM/HIGH security before the skip() command would be run
- if ($skip) {
-
- skip($skip,1);
- skip($skip,1);
-
- # plus we need an end block so the tests come out in the right order
- eval q{ END { skip($skip,1); skip($skip,1) } 1; } || die;
-
- return;
- }
-
- # Create the tempfile
- my $template = "tmpXXXXX";
- my ($fh1, $fname1) = eval { tempfile ( $template,
- DIR => File::Spec->tmpdir,
- UNLINK => 1,
- );
- };
-
- if (defined $fname1) {
- print "# fname1 = $fname1\n";
- ok( (-e $fname1) );
- push(@files, $fname1); # store for end block
- } elsif (File::Temp->safe_level() != File::Temp::STANDARD) {
- my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'";
- skip($skip2, 1);
- # plus we need an end block so the tests come out in the right order
- eval q{ END { skip($skip2,1); } 1; } || die;
- } else {
- ok(0);
- }
-
- # Explicitly
- if ( $< < File::Temp->top_system_uid() ){
- skip("Skip Test inappropriate for root", 1);
- eval q{ END { skip($skip,1); } 1; } || die;
- return;
- }
- my ($fh2, $fname2) = eval { tempfile ($template, UNLINK => 1 ); };
- if (defined $fname2) {
- print "# fname2 = $fname2\n";
- ok( (-e $fname2) );
- push(@files, $fname2); # store for end block
- close($fh2);
- } elsif (File::Temp->safe_level() != File::Temp::STANDARD) {
- my $skip2 = "Skip system possibly insecure, see INSTALL, section 'make test'";
- skip($skip2, 1);
- # plus we need an end block so the tests come out in the right order
- eval q{ END { skip($skip2,1); } 1; } || die;
- } else {
- ok(0);
- }
-
-}