This is the mail archive of the cygwin-developers mailing list for the Cygwin 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: native symlink


Hi Jeffrey,

On Apr  3 17:35, Jeffrey Altman wrote:
> I will add testing this to my to-do list.
> It may be a few days.

any chance to test this?


Thanks,
Corinna

> 
> 
> On 4/3/2013 4:46 PM, Corinna Vinschen wrote:
> 
> > I think I know what the problem is here.  Even though Cygwin didn't
> > recognize the reparse point type and even though it lets the OS handle
> > the reparse point in subsequent calls, the PC_KEEP_HANDLE flag is not
> > removed.  The effect is that stat uses the metadata collected in the
> > symlink_info::check call, which is the reparse point metadata.  So, I
> > think the right thing to do here is to remove the PC_KEEP_HANDLE flag so
> > stat reopens the reparse point, but this time without the
> > FILE_OPEN_REPARSE_POINT flag. 
> > 
> > You're set up to build Cygwin yourself, right?  Can you please try the
> > below patch?
> > 
> > 
> > Thanks,
> > Corinna
> > 
> > 
> > Index: path.cc
> > ===================================================================
> > RCS file: /cvs/src/src/winsup/cygwin/path.cc,v
> > retrieving revision 1.672
> > diff -u -p -r1.672 path.cc
> > --- path.cc	3 Apr 2013 11:20:36 -0000	1.672
> > +++ path.cc	3 Apr 2013 20:46:08 -0000
> > @@ -2668,7 +2668,14 @@ restart:
> >  		 to the volumes root dir. */
> >  	      pflags &= ~PC_KEEP_HANDLE;
> >  	    }
> > -	  else if (res)
> > +	  else if (!res)
> > +	    {
> > +	      /* Make sure the open handle is not used in later stat calls.
> > +		 We didn't recognize the reparse point type, so let the
> > +		 OS handle this the default way. */
> > +	      pflags &= ~PC_KEEP_HANDLE;
> > +	    }
> > +	  else
> >  	    {
> >  	      /* A symlink is never a directory. */
> >  	      conv_hdl.fnoi ()->FileAttributes &= ~FILE_ATTRIBUTE_DIRECTORY;
> > 

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat


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