This is the mail archive of the libc-alpha@sourceware.org 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: [PATCH 2/1][BZ #866] glob() should match dangling symlinks.


On Thu, Jan 02, 2014 at 09:23:46PM -0500, Mike Frysinger wrote:
> 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.
>
A testcase is here:

https://www.sourceware.org/ml/libc-alpha/2013-12/msg00165.html
 
> $ 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
That should not be matched, I tried to dig into history for exact
reason, check was added in 66b38fc99ecc3835502fae6851908b0d11d6b175
but I did not find a mail thread for that commit.


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