This is the mail archive of the cygwin 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: 1.5.21-1: CIFS symlinks on network share break Cygwin


On Oct 22 22:56, Jonathan Lanier wrote:
> Brief summary, before I get into details:  Cygwin 1.5.21-1 on WinXP SP2
> was working perfectly, until a new CIFS server was installed on our LAN.
> [...]
>   The common factor to
> all failures: they are all symbolic links on the CIFS server.  Typical
> failure modes were as follows:
> [...]
> Y:\test>vcfiletest y:\dirsymlink
> Checking file "y:\dirsymlink"...
> GetFileAttributesEx(): attr=0x00000010, size=0
> stat(): mode=0x41ff, size=0
> 
> Y:\test>vcfiletest y:\filesymlink.exe
> Checking file "y:\filesymlink.exe"...
> GetFileAttributesEx(): attr=0x00000020, size=290816
> stat(): mode=0x81ff, size=290816
> 
> Y:\test>mingwfiletest y:\dirsymlink
> Checking file "y:\dirsymlink"...
> GetFileAttributesEx(): attr=0x00000010, size=0
> stat(): mode=0x41ff, size=0
> 
> Y:\test>mingwfiletest y:\filesymlink.exe
> Checking file "y:\filesymlink.exe"...
> GetFileAttributesEx(): attr=0x00000020, size=290816
> stat(): mode=0x81ff, size=290816
> 
> Y:\test>cygfiletest y:\dirsymlink
> Checking file "y:\dirsymlink"...
> GetFileAttributesEx(): attr=0x00000080, size=25
> stat(): mode=0x41ed, size=0
> 
> Y:\test>cygfiletest y:\filesymlink.exe
> Checking file "y:\filesymlink.exe"...
> GetFileAttributesEx(): attr=0x00000080, size=43
> stat(): mode=0x81ed, size=43
> 
> Interesting points to note: If the executable symlink is renamed to
> remove its extension, the file size reported returns to the orignal
> expected size.  [...]

I can't help to think this is a bug in the CIFS server, rather than a
bug in Cygwin.  Cygwin uses the GetFileAttributes function as every
other Win32 application and if the CIFS server returns 0x80 instead of
0x10 for a symlink to a directory, there's nothing Cygwin can do about
that.  Same goes for the weird file behaviour.  Cygwin uses normal Win32
and native NT system calls, nothing unusual.  Somehow the server doesn't
seem to recognize the machine as a Windows client when an access from
Cygwin occurs.

I tested this with a Samba server and these effects simply don't occur.
A symlink is resolved to the symlink target before the information is
returned to the Windows machine.  Cygwin sees a directory or a file when
accessing the symlink, and the file size is correct, too, regardless of
the suffix.


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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