summaryrefslogtreecommitdiff
path: root/t/pragma/warn/taint
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>1999-06-27 00:19:52 +0100
committerGurusamy Sarathy <gsar@cpan.org>1999-07-07 09:45:43 +0000
commit0453d815b8a74697ff1e5451c27aba2fe537b8e0 (patch)
treeb6275867deb61ba13fb0e665d516f115dd9f1d69 /t/pragma/warn/taint
parent69e210baba6414aba2758bc791a6dc3e9e167d9d (diff)
downloadperl-0453d815b8a74697ff1e5451c27aba2fe537b8e0.tar.gz
lexical warnings update (warning.t fails one test
due to leaked scalar, investigation pending) Message-ID: <5104D4DBC598D211B5FE0000F8FE7EB29C6C8E@mbtlipnt02.btlabs.bt.co.uk> Subject: [PATCH 5.005_57] Lexical Warnings - mandatory warning are now default warnings p4raw-id: //depot/perl@3640
Diffstat (limited to 't/pragma/warn/taint')
-rw-r--r--t/pragma/warn/taint56
1 files changed, 40 insertions, 16 deletions
diff --git a/t/pragma/warn/taint b/t/pragma/warn/taint
index 40fadd0913..17ab0423c6 100644
--- a/t/pragma/warn/taint
+++ b/t/pragma/warn/taint
@@ -1,25 +1,49 @@
- taint.c TODO
+ taint.c AOK
- Insecure %s%s while running setuid
- Insecure %s%s while running setgid
Insecure %s%s while running with -T switch
-
- Insecure directory in %s%s while running setuid
- Insecure directory in %s%s while running setgid
- Insecure directory in %s%s while running with -T switch
-
-
-
__END__
+-T
+--FILE-- abc
+def
+--FILE--
# taint.c
-use warning 'misc' ;
-
+open(FH, "<abc") ;
+$a = <FH> ;
+close FH ;
+chdir $a ;
+print "xxx\n" ;
EXPECT
-
+Insecure dependency in chdir while running with -T switch at - line 5.
########
+-TU
+--FILE-- abc
+def
+--FILE--
# taint.c
-use warning 'misc' ;
-
+open(FH, "<abc") ;
+$a = <FH> ;
+close FH ;
+chdir $a ;
+print "xxx\n" ;
EXPECT
-
+xxx
+########
+-TU
+--FILE-- abc
+def
+--FILE--
+# taint.c
+open(FH, "<abc") ;
+$a = <FH> ;
+close FH ;
+use warning 'taint' ;
+chdir $a ;
+print "xxx\n" ;
+no warning 'taint' ;
+chdir $a ;
+print "yyy\n" ;
+EXPECT
+Insecure dependency in chdir while running with -T switch at - line 6.
+xxx
+yyy