develooper Front page | perl.perl5.porters | Postings from October 2001

Re: [PATCH] Re: [ID 20011030.064] File::Temp tempdir (CLEANUP => 1)and -T on OpenBSD 2.9

From:
Tim Jenness
Date:
October 30, 2001 15:11
Subject:
Re: [PATCH] Re: [ID 20011030.064] File::Temp tempdir (CLEANUP => 1)and -T on OpenBSD 2.9
Message ID:
Pine.LNX.4.33.0110301309590.3197-100000@lapaki
On Tue, 30 Oct 2001, Rafael Garcia-Suarez wrote:

> > pref:alex {140} ./temp.pl
> > /tmp/oQp5wJKtTU
> > Insecure dependency in unlink while running with -T switch at /usr/libdata/perl5/File/Path.pm
> > line 220.
> > END failed--call queue aborted.
>
> Patch below. Also tests that would not run with -T now do.
> Basically this tells File::Path::rmtree() to untaint the contents of the subdirectories
> of the tree to be removed. Objections?

Thanks

>
> (Note. As this patch uses ${^TAINT}, it will not work with earlier perls)
>

Well, if you didn't mind the extra overhead you could always untaint it
regardless of whether tain mode is on or not. Then the patch would work on
older perls (since I'm assuming the person who filed the bug would like it
fixed on their current version).


-- 
Tim Jenness
JAC software
http://www.jach.hawaii.edu/~timj





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About