This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ftw() and AustinDraft


On Tue, Dec 11, Thorsten Kukuk wrote:

> On Mon, Dec 10, Ulrich Drepper wrote:
> 
> > Thorsten Kukuk <kukuk@suse.de> writes:
> > 
> > > I have a small patch for this which works with all of my test cases
> > > (LSB.os test suite). But I'm not sure if it is really correct, there
> > > are to much other cases which I could break.
> > 
> > The patch looks OK except that __access must be used.  I've applied
> > the patch and added a test case.  Thanks,
> 
> No, it was not ok :-(
> Found another test case where it now breaks. Looks like I have to 
> check at first if the argument is a directory or something else
> and that I cannot use access on a direcotry. I will look at it
> today again.

Ok, I got the clarification, which of the tests is wrong and which
is correct.
Looks like we have to check:

ftw(dir,...);

"dir" must be searchable (x bit is set).
"dirname(dir)" must be readable.

I don't like the "dirname" call here very much, but I don't know if 
searching the parent dir and the handling of the special cases is
really faster. Here is an updated patch which passes now all tests
except one with symlink handling (I will look at that the next days).

  Thorsten

-- 
Thorsten Kukuk       http://www.suse.de/~kukuk/        kukuk@suse.de
SuSE GmbH            Deutschherrenstr. 15-19       D-90429 Nuernberg
--------------------------------------------------------------------    
Key fingerprint = A368 676B 5E1B 3E46 CFCE  2D97 F8FD 4E23 56C6 FB4B

Attachment: ftw.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]