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).

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.

-- 
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

Reply via email to