This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix readdir_r with long file names
- From: Florian Weimer <fweimer at redhat dot com>
- To: Rich Felker <dalias at aerifal dot cx>
- Cc: KOSAKI Motohiro <kosaki dot motohiro at gmail dot com>, "Carlos O'Donell" <carlos at redhat dot com>, libc-alpha <libc-alpha at sourceware dot org>
- Date: Fri, 07 Jun 2013 09:55:47 +0200
- Subject: Re: [PATCH] Fix readdir_r with long file names
- References: <20130516110136 dot GB11420 at spoyarek dot pnq dot redhat dot com> <5194CDEE dot 4020708 at redhat dot com> <20130516125029 dot GE11420 at spoyarek dot pnq dot redhat dot com> <5194D697 dot 8040106 at redhat dot com> <20130516130952 dot GA16952 at spoyarek dot pnq dot redhat dot com> <519B58EC dot 6060108 at redhat dot com> <51B0A2F9 dot 5060004 at redhat dot com> <51B0B39F dot 4060202 at redhat dot com> <51B0BD36 dot 3030202 at redhat dot com> <CAHGf_=r9Rz63pho+84ORk0a_oDyJSj-MCnZ56uPrT3L6sVEfeQ at mail dot gmail dot com> <20130607013024 dot GO29800 at brightrain dot aerifal dot cx>
On 06/07/2013 03:30 AM, Rich Felker wrote:
On Thu, Jun 06, 2013 at 03:53:16PM -0400, KOSAKI Motohiro wrote:
I mean, portable applications should use readdir_r correctly and Linux specific
one should use readdir instead.
Side note: the above man page is not a theoretical issue. At least, Solaris
requires it.
Am I missing something?
Yes, the fact that the Austin Group is planning to require readdir to
be thread-safe and to mark readdir_r obsolescent.
This is good news.
> So effort put into
making readdir_r more usable, or worse yet, adding a readdir4, is a
waste of effort. Just make sure readdir_r is _safe_ against buffer
overflows from buggy FUSE modules, and advise application developers
to use readdir, not readdir_r.
Does this mean that you agree with the basic approach of the patch?
--
Florian Weimer / Red Hat Product Security Team