bugfindutils - Bugs: bug #29949, find -execdir does not change...

 
 

bug #29949: find -execdir does not change working directory

Submitted by:  Andreas Metzler <ametzler>
Submitted on:  Sun 23 May 2010 04:01:09 PM UTC  
Votes:  13  
 
Category: findSeverity: 6 - Security
Item Group: Wrong resultStatus: Fixed
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Raja R HarinathOpen/Closed: Closed
Release: 4.5.9Fixed Release: 4.5.10

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 02 Apr 2011 09:36:08 PM UTC, comment #1:

Kamil's patch fixes the problem. I have applied it.

James Youngman <jay>
Project AdministratorIn charge of this item.
Sun 23 May 2010 04:01:09 PM UTC, original submission:

Hello,

this is http://bugs.debian.org/582717 reported by Raja R Harinath
--------------------------------
Running the following fragment

d=$(mktemp -d); mkdir -p $d/{foo,bar,baz}/bug; find $d -type d -name bug -print -execdir pwd \;

at a command prompt gives me:

/tmp/tmp.UqsljYxydZ/bar/bug
/tmp/tmp.UqsljYxydZ/bar
/tmp/tmp.UqsljYxydZ/baz/bug
/tmp/tmp.UqsljYxydZ/bar
/tmp/tmp.UqsljYxydZ/foo/bug
/tmp/tmp.UqsljYxydZ/bar

The expected output, which is correctly obtained with version 4.4.2-1 from testing is something like:

/tmp/tmp.5nfIU7cjDH/bar/bug
/tmp/tmp.5nfIU7cjDH/bar
/tmp/tmp.5nfIU7cjDH/baz/bug
/tmp/tmp.5nfIU7cjDH/baz
/tmp/tmp.5nfIU7cjDH/foo/bug
/tmp/tmp.5nfIU7cjDH/foo
--------------------------------

Note how pwd continues to stay at /tmp/.../bar.

I have confirmed the behavior, it also affects oldfind. This is a new bug, 4.5.8 behaves correctly.

cu andreas

Andreas Metzler <ametzler>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jay (Updated the item)
  • -unavailable- added by skroob (Voted in favor of this item)
  • -unavailable- added by kdudka (Updated the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 13 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 11 May 2011 09:41:32 AM UTCjayOpen/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.5.10
    Sat 02 Apr 2011 09:37:14 PM UTCjayStatusNone=>Fixed
    Sat 02 Apr 2011 09:36:08 PM UTCjaySeverity5 - Blocker=>6 - Security
    Sat 02 Apr 2011 08:39:23 PM UTCjayAssigned toNone=>jay
    Sat 02 Apr 2011 08:38:50 PM UTCjaySeverity3 - Normal=>5 - Blocker
    Thu 07 Oct 2010 09:54:44 AM UTCjaySummaryfind -execdr does not change working directory=>find -execdir does not change working directory
    Sun 18 Jul 2010 11:48:08 PM UTCskroobCarbon-Copy-=>Added skroob
    Mon 24 May 2010 03:18:58 PM UTCkdudkaAttached File-=>Added 0001-Fix-Savannah-bug-29949-execdir-does-not-change-worki.patch, #20607
    Sun 23 May 2010 04:01:30 PM UTCametzlerCarbon-CopyRemoved 20807=>-

    Back to the top


    Powered by Savane 3.1-cleanup