This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/9] posix: Allow glob to match dangling symlinks [BZ #866]
On Mon, Sep 11, 2017 at 12:53 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 09/11/2017 07:38 AM, Zack Weinberg wrote:
>>
>> If this is done, the new symbol version should attempt to validate the
>> altdirfuncs structure on entry
>
>
> I don't see how glob could do that reliably and cheaply. How does one
> validate that a pointer to a stat-like function is actually a pointer to a
> stat-like function? All one can do is call the function and pray.
It should be enough to make a dummy call, e.g.
pglob->gl_lstat(".", &statbuf);
zw