This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: native symlink
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-developers at cygwin dot com
- Date: Thu, 11 Apr 2013 18:03:45 +0200
- Subject: Re: native symlink
- References: <20130402000633 dot GA3977 at ednor dot casa dot cgf dot cx> <9362C76C-DB6B-4DA8-B61E-7980CFDF7A8A at mac dot com> <20130403014056 dot GA3383 at ednor dot casa dot cgf dot cx> <2EC5409B-C507-4B41-862C-D42D69CE3741 at mac dot com> <515BB10C dot 9080101 at openafs dot org> <20130403152907 dot GD2468 at calimero dot vinschen dot de> <515C5E4F dot 3050406 at openafs dot org> <20130403172929 dot GI2468 at calimero dot vinschen dot de> <20130403204641 dot GB25170 at calimero dot vinschen dot de> <515CA0AA dot 2010205 at openafs dot org>
- Reply-to: cygwin-developers at cygwin dot com
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