bin/67943: find(1) fails when current directory is not readable by user

Arkadi Shishlov arkadi at hosting.lv
Tue Jun 15 00:00:59 GMT 2004


The following reply was made to PR bin/67943; it has been noted by GNATS.

From: Arkadi Shishlov <arkadi at hosting.lv>
To: FreeBSD-gnats-submit at FreeBSD.org
Cc:  
Subject: bin/67943: find(1) fails when current directory is not readable by
	user
Date: Mon, 14 Jun 2004 21:35:56 +0300

 >Number:         67943
 >Category:       bin
 >Synopsis:       find(1) fails when current directory is not readable by user
 >Confidential:   no
 >Severity:       non-critical
 >Priority:       medium
 >Responsible:    freebsd-bugs
 >State:          open
 >Quarter:        
 >Keywords:       
 >Date-Required:
 >Class:          sw-bug
 >Submitter-Id:   current-users
 >Arrival-Date:   Mon Jun 14 18:40:22 GMT 2004
 >Closed-Date:
 >Last-Modified:
 >Originator:     Arkadi Shishlov
 >Release:        FreeBSD 4.9-RELEASE-p3 i386
 >Organization:
 >Environment:
 System: FreeBSD idea.hosting.lv 4.9-RELEASE-p3 FreeBSD 4.9-RELEASE-p3 #0: Wed Mar 3 21:51:26 EET 2004 root at idea.hosting.lv:/usr/obj/usr/src/sys/idea i386
 
 >Description:
 find(1) utility opens current directory dotfd = open(".", O_RDONLY, 0)
 and use obtained dotfd handle later in fchdir(). 
 If current directory is not readable by user then find fails.
 
 >How-To-Repeat:
 mkdir dir
 chmod -r dir
 cd dir
 find /tmp
 find: .: Permission denied
 
 >Fix:
 dotfd handle is only used when -exec predicate is requested.
 find(1) from GNU findutils combat this situation by using getcwd()
 call in case cwd is not readable.
 >Release-Note:
 >Audit-Trail:
 >Unformatted:
 _______________________________________________
 freebsd-bugs at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
 To unsubscribe, send any mail to "freebsd-bugs-unsubscribe at freebsd.org"


More information about the freebsd-bugs mailing list