[PATCH 2/1][BZ #866] glob() should match dangling symlinks.

Mike Frysinger vapier@gentoo.org
Fri Jan 3 02:23:00 GMT 2014


On Thursday 02 January 2014 18:39:48 Ondřej Bílka wrote:
> On Thu, Jan 02, 2014 at 05:04:29PM -0500, Mike Frysinger wrote:
> > On Saturday 12 October 2013 04:25:29 Ondřej Bílka wrote:
> > >  	  status = glob_in_dir (filename, dirs.gl_pathv[i],
> > >  				((flags | GLOB_APPEND)
> > >  				 & ~(GLOB_NOCHECK | GLOB_NOMAGIC)),
> > > -				errfunc, pglob, alloca_used);
> > > +				errfunc, pglob, alloca_used, 1);
> > 
> > what is this scenario where we're still checking the links ?
> 
> Rationale was not match dangling symlinks when matching directories like
> glob ("*/", ...)
> 
> I do not remember exact logic now, glob code takes quite bit of effort
> to track what happens there.

we need testcases that enforce either behavior.  i'm not quite seeing what 
you're hinting at.

$ mkdir d
$ cd d
$ ln -s a/ b

so you want a glob of */ to not match a/ ?

or b/ exists and inside of that there are dangling symlinks ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140103/b7b624de/attachment.sig>


More information about the Libc-alpha mailing list