On Sunday, April 28, 2002, at 04:48 PM, Stas Bekman wrote:
> Ken Williams wrote:
>> On Sunday, April 28, 2002, at 01:47 PM, Stas Bekman wrote:
>>> Ken, CWD.pm, has always suffered from taint problems. This problem 
>>> has been fixed in the bleadperl, try this patch:
>>>
>>> --- /tmp/Cwd.pm    Sun Apr 28 11:44:38 2002
>>> +++ /home/stas/perl.org/perl-5.6.1/lib/Cwd.pm    Fri Sep 14 17:09:10 
>>> 2001
>>> @@ -89,7 +89,6 @@
>>>  # The 'natural and safe form' for UNIX (pwd may be setuid root)
>>>
>>>  sub _backtick_pwd {
>>> +    local @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
>>>      my $cwd = `pwd`;
>>>      # `pwd` may fail e.g. if the disk is full
>>>      chomp($cwd) if defined $cwd;
>> This still fails, because it won't find `pwd` without a path.
>
> it does solve the problem on linux. Ken, can you test the bleadperl? 
> This fix was applied as a solution.

I sent a message earlier today saying that this patch seems to help 
things, but I just noticed something disturbing.  After hand-applying 
this patch to my CWD.pm from 5.6.1, I ran a 'perl Makefile.PL' for a 
different module (Apache::SSI), and it created the Makefile not in the 
current directory, but in my *home* directory!  Weird.  I don't know why 
it happened yet, but obviously this isn't a good thing.

I don't see how this patch can be right - how is it supposed to execute 
`pwd` if there's nothing in $ENV{PATH}?

  -Ken

Reply via email to