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: Error accessing mapped drive >2TB?


On Oct 22 12:34, Warren Young wrote:
> On Oct 22, 2015, at 2:34 AM, Corinna Vinschen wrote:
> > 
> > On Oct 21 11:26, Warren Young wrote:
> >> On Oct 21, 2015, at 10:22 AM, Corinna Vinschen wrote:
> >>> 
> >>> On Oct 21 09:52, Warren Young wrote:
> >>>> 
> >>>> I mean, I know how to snag a stream of SMB packets with Wireshark, but
> >>>> I donât know what Iâd be looking for in the dump.
> >>> 
> >>> Me neither, the Samba guys might be able to help there, perhaps.
> >> 
> >> Apple hasnât shipped Samba as part of OS X since 10.6, quite a few
> >> years ago now.  In 10.7, they switched to an internally-developed SMB
> >> server.
> > 
> > Yes, but the SMB guys can recite the wire format of SMB asleep, probably.
> 
> Why would the Samba projectâs wizards be motivated to help debug a
> closed-source piece of software they didnât write?

No idea, it was just a suggestion.

> If anything, Iâd expect them to give Apple the finger for booting
> Samba out of OS X in the first place.
> 
> > There's also
> > https://msdn.microsoft.com/en-us/library/windows/desktop/aa365233%28v=vs.85%29.aspx
> 
> Now weâre talking about *my* motivation, which has only been to test
> the original report and the fix.

Well, it was *you* asking "How could we prove that the problem is the
Apple SMB server?"  I was just trying to help.  If that's not desired,
I don't have to.

> >>> HANDLE handle = CreateFile ("P:\\", ...);
> >> 
> >> I guess Iâm not seeing what values to pass to CreateFile()
> > 
> > Opening a directory requires to use the FILE_FLAG_BACKUP_SEMANTICS
> > flag.
> 
> Yes, silly me for not guessing that Windows requires that I tell it I
> am about to do a backup before I attempt to open a directory for
> reading.  What was so wrong about the design of opendir() that MS had
> to reinvent it this way?

Think DOS/early Windows.  CreateFile was not meant to open directories
to perform a directory search and you couldn't do that on Windows 9x
anyway.  On NT the functions to do that were hidden in the NT API
originally.  Directory searches were meant to be performed using
FindFirstFile, etc., just as on 9x.

> I also had to fix an error in your original code: GetFileAttributes()
> takes a path string, not a HANDLE.

Oh, sorry, that should have been GetFileInformationByHandle.  It does
not help to call GetFileAttributes with a path since that obviously
won't use the previously opened handle.

> > Oh and, you have to use the FILE_FLAG_OPEN_REPARSE_POINT flag, of
> > course.
> 
> Adding that doesnât affect the error I get from the program, so I left
> it out in the Pastebin version.

Without this flag the testcase won't do what Cygwin does.


Corinna

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

Attachment: pgpgFgNrykkcX.pgp
Description: PGP signature


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