diff options
Diffstat (limited to 't/pragma/warn/taint')
-rw-r--r-- | t/pragma/warn/taint | 56 |
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 |