bugfindutils - Bugs: bug #11175, find does unwanted permission...

 
 

bug #11175: find does unwanted permission check on pruned directory

Submitter:  Geoff Clare <geoffclare>
Submitted:  Tue 30 Nov 2004 11:56:58 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.2.8 Fixed Release:  4.2.9
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 05 Dec 2004 05:20:36 PM UTC, comment #4: 

You can download a release of findutils in which this problem is
fixed from ftp://alpha.gnu.org/gnu/findutils.

The releases on alpha.gnu.org are for testing purposes, so please
take the time to download the release and verify that your
problem has been solved.  Once the release has been sufficiently
tested, it can be uploaded to ftp.gnu.org for everybody to use it.

James Youngman <jay>
Group administrator
Sun 05 Dec 2004 04:53:07 PM UTC, comment #3: 

The duplicate error message is now fixed in the CVS code.  As you pointed out, it names the wrong directory anyway.   Oops.   Thanks for catching that.

James Youngman <jay>
Group administrator
Sun 05 Dec 2004 04:19:06 PM UTC, comment #2: 

Okay, I have played a bit with the CVS version.  The only problem I found was some strangeness in error messages.  For example:

$ mkdir -p /var/tmp/findtest/noxdir
$ chmod a-x /var/tmp/findtest/noxdir
$ gfind-cvs /var/tmp/findtest
/var/tmp/findtest
/var/tmp/findtest/noxdir
gfind-cvs: /var/tmp/findtest: Permission denied
gfind-cvs: /var/tmp/findtest/noxdir: Permission denied
$ gfind-4.2.8 /var/tmp/findtest
/var/tmp/findtest
/var/tmp/findtest/noxdir
gfind-4.2.8: /var/tmp/findtest/noxdir: Permission denied

There is a spurious extra message about permissions for /var/tmp/findtest with the CVS version.  It only happens when x permission is denied and r permission is allowed.  (With r permission denied only the normal message is written.)


Geoff Clare <geoffclare>
Sat 04 Dec 2004 01:19:08 PM UTC, comment #1: 

I have now fixed this in CVS.   The code change is small but has a profound effect on the treatment of the files specified on the find command line (they are now treated exactly like any other directory we discover during a search, except for what we do when we leave a subdirectory immediately below them).   Would you be in a position to exercise the CVS version of find a bit before I make a proper release with this bugfix in it?

James Youngman <jay>
Group administrator
Tue 30 Nov 2004 11:56:58 AM UTC, original submission:  

Find reports an error in the following situation:

$ mkdir noxdir
$ chmod a-x noxdir
$ find * -prune -type d -print
find: noxdir: Permission denied
$ echo $?
1

Since the directory will be pruned, find should not be checking its permissions.  It should write "noxdir" to stdout (and its exit status should be 0).

Geoff Clare <geoffclare>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-05 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.9
2004-12-04 jay StatusNone Fixed
    Assigned toNone jay

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code