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

Re: Report /pro/3gl/CPAN/perl-current@11794

Thread Previous
From:
Nicholas Clark
Date:
September 3, 2001 07:59
Subject:
Re: Report /pro/3gl/CPAN/perl-current@11794
Message ID:
20010903155950.I25120@plum.flirble.org
On Mon, Sep 03, 2001 at 03:37:57PM +0100, Nicholas Clark wrote:
> so it looks like your cwd doesn't taint on 10.20. Next question: Why?


Or better question - does your HP UX 10.20 box have pwd in $PATH:

unless(defined &cwd) {
    # The pwd command is not available in some chroot(2)'ed environments
    if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {
	*cwd = \&_backtick_pwd;
    }
    else {
	*cwd = \&getcwd;
    }
}

which makes me wonder what does:

perl -le 'print map {"$_/pwd"} grep { -x "$_/pwd" } split(":", $ENV{PATH})'

say? ["which pwd" at the shell prompt is probably just as good]

I find that cwd taints, getcwd doesn't. [which seems reasonable, as cwd is
`pwd` here, while it appears that getcwd is XS code]

Nicholas Clark

Thread Previous


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