On Feb 25 16:59, Jeremy Drake via Cygwin wrote: > On Tue, 25 Feb 2025, Cedric Blancher via Cygwin wrote: > > > WebDAV and BeeGFS are not alone, the Windows ms-nfs41-client and > > ms-nfs42-client ALWAYS (even with default NFSv4.1 port TCP/2049) use > > UNC paths with "@" character, like > > \\stripe02.zebracluster.intra.pasteur.fr@2049\nfs4\disk02\ > > OpenText NFSv4.0 client also supports that, but only if you not use > > the default NFSv4.0 TCP port. > > Hmm, that's interesting (in a breaks-things kind of way). Current code > assumes that server name containing "@" is webdav, and skips trying to > enumerate shares because that wasn't working for webdav. Also, current > code does not try to enumerate nfs shares unless it can connect to server > on tcp port 2049. It seems neither of these assumptions hold, and in fact > you cannot tell by name if > "\\stripe02.zebracluster.intra.pasteur.fr@2049\nfs4\disk02\" is a webdav > server on port 2049 or an nfs server on port 2049 (or potentially some > other kind of server).
I also added an extra check skipping MS NFS if an @ is in the name, see commit 7124d1c23dd1. This should still be ok, given NFSv4 servers return WNNC_NET_RDR2SAMPLE as network type. > BTW, this was not in an email so I don't have a message to reply to, but > in reply to 01bcd7d > > So far there's no known way to enumerate connected WebDAV resources. > > WNetGetResourceInformationW/WNetOpenEnumW both return ERROR_BAD_NET_NAME. > > > > However, `net use' enumerates the connected cloud shares, so > > there must be a way to do this. > > Have you tried WNetOpenEnumW with RESOURCE_CONNECTED and/or > RESOURCE_REMEMBERED scopes? Unfortunately, it looks like lpNetResource > must be NULL if the scope is not RESOURCE_GLOBALNET, so you just get a > list of all connected or remembered resources respectively, not only the > ones for a given server name and provider. I guess you are expected to > filter them yourself. D'uh. My reading skills are detoriating. I tried RESOURCE_CONNECTED and RESOURCE_REMEMBERED, but always with lpNetResource set up for a certain server... *facepalm* I reworked the netdrive code now, so it works a little bit more generically. The problem is still that some servers never show up if you try to enumerate servers with WSD or WNet functions. SMB servers are not enumerated with WNet at all, and WSD shows some servers but not all servers in the neighbourhood. So when trying to enumerate shares, we still need some kind of heuristic. See the latest commit 323729f654ae. I added more comments and two FIXMEs in terms of WNNC_NET_DAV. Changing the loop (or better, adding another loop) which handles remembered or connected resources sounds like a good idea, but still needs implementing. I'm open to patches here. For NFS servers, I still check if they are available on port 2049. This only affects WNNC_NET_MS_NFS servers, and without this check, the WNetOpenEnumW call can take 2 minutes and longer. The way if and how to handle WNNC_NET_RDR2SAMPLE isn't still quite clear, too. If multiple drivers actually use the same network type, doesn't that mean you can only ever install one of them? Or is there no kind of collision and they co-exist? Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple