On Sun, Oct 15, 2006 at 12:11:14PM +0000, James Youngman wrote:
> 
> Update of bug #17782 (project findutils):
> 
>                 Severity:              3 - Normal => 4 - Important          
>              Assigned to:                    None => jay                    
> 
>     _______________________________________________________
> 
> Follow-up Comment #1:
> 
> Prefixing the expansion of {} with ./ is a security feature.  I'm not
> planning to remove it.
> 
> However, as Andreas points out the actual bug here is that arguments
> containing {} are prefixed with ./ at the start of the argument, even if the
> {} is not at the start of the argument.   Example:
> 
> 
> $ find baz -execdir echo 'foo {}' \;
> ./foo baz
Here we need a little more consideration. Thinking about this situation:

Under current directory exists some file whose name looks like `bashrc',
and I want to rename it to `.bashrc', so I would probably run:

$ find . -name "[^.]*rc" -execdir mv {} .{} \;

According to patch file sv-bug-17782.patch, this will result in a command
like `mv ./bashrc ../bashrc', which is definitely not expected.

As a compromise, I suggest to provide an option, say `-suppress_prefix',
to disable this feature for those who really don't need it with -execdir,
while enable it by default for the general purpose invokation.
> 
> 
>     _______________________________________________________
> 
> Reply to this item at:
> 
>   <http://savannah.gnu.org/bugs/?17782>
> 
> _______________________________________________
>   Message sent via/by Savannah
>   http://savannah.gnu.org/
> 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to