bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Again, do not change the mode of all directories below $HOME


From: Jim Meyering
Subject: Re: [PATCH] Again, do not change the mode of all directories below $HOME.
Date: Tue, 22 Jul 2008 12:08:53 +0200

Philip Rowlands <address@hidden> wrote:
> On Tue, 22 Jul 2008, Ralf Wildenhues wrote:
>
>> * tests/CuTmpdir.pm (chmod_tree): Do not run chmod on undefined
>> argument, can happen when the build path contains spaces.
>
> That sounds wrong - there's no magic to unusual characters in
> filenames other than avoiding passing them unquoted through an
> IFS-splitting shell.

Hi Phil,

Ralf's change is correct.
Since the script with taint checking enabled, and mkdir requires that
its argument not be tainted, I opted to skip the test when the absolute
temporary directory name contains any unusual characters.

>> sub chmod_tree
>> {
>> -  if (chdir $dir)
>> +  if (defined $dir && chdir $dir)
>>     {
>
> Surely skipping the test is going to give a misleading impression to
> the tester? Tracing back up, why is $dir not defined?

Because the script exits (via the skip/die) before $dir is defined,
and the on-exit (END) handler calls chmod_tree which then uses $dir.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]