[41087] in bugtraq

home help back first fref pref prev next nref lref last post

Re: [Full-disclosure] Re: readdir_r considered harmful

daemon@ATHENA.MIT.EDU (Ulrich Drepper)
Mon Nov 7 20:17:41 2005

Message-ID: <a36005b50511060734l6ced511u47b6e860134bc60b@mail.gmail.com>
Date: Sun, 6 Nov 2005 07:34:55 -0800
From: Ulrich Drepper <drepper@gmail.com>
To: "Casper.Dik@sun.com" <Casper.Dik@sun.com>
Cc: Ben Hutchings <ben@decadentplace.org.uk>,
        full-disclosure@lists.grok.org.uk, bugtraq@securityfocus.com
In-Reply-To: <200511060900.jA690qDk001066@vaticaan.Holland.Sun.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

On 11/6/05, Casper.Dik@sun.com <Casper.Dik@sun.com> wrote:
> I don't see how that is relevant; the typical use of readdir() is as follows:
>
>         DIR *dirp = opendir(name);
>
>         while ((dent = readdir(dirp)) != NULL) {
>                 ...
>         }
>
>         closedir(dirp);
>
> Nothing other threads do with readdir() on different dirp's will influence
> what "dent" points to.

The issue is multiple threads using the same DIR.

home help back first fref pref prev next nref lref last post