DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51Q1125Q4058094
Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com
Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com
DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 51Q1125Q4058094
Authentication-Results: delorie.com;
	dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=ILlK977X
X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 23F903858D33
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1740531660;
	bh=eZZhClXi69Ay/97RBWhOZfEd4eSGiJOU+JU3xscbc8o=;
	h=Date:To:cc:Subject:In-Reply-To:References:List-Id:
	 List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
	 From:Reply-To:From;
	b=ILlK977XPobODseYg+Kn7cnNGV6UBweMzU+0pGj5rdR1kAiL4t4g3fiMu+q6j2Bxr
	 /UmgPhGhFLc2M6FC1A1XpfxBwc8oMNyQQ7teTOl+Avt7TJXNCd6ODcIVmVBZbv1ygU
	 nnKjmCqts7o23LzpH34ErNSenXczfPAokoa3tVDs=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6C6143858D26
ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6C6143858D26
ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1740531594; cv=none;
 b=Dff37Ya+CSabDj5PNytQKzc4JCLWFWOKaLlhbx4cFbBHpZ/jD05+qPP3gRBUW/8ysMsOhVvbdVuLV1syLkoqKMH3wfQSo2KMKxkFmgsq0UBc90JbIB+1t1IT4rWpraFpSQ/wv2xvjz4lnXlx5/1KKLdbvIFAbHxx/lUgqqZl6S4=
ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key;
 t=1740531594; c=relaxed/simple;
 bh=lO27Y5GE7xvH2IdbEdpA5S5WN6nTpU2qkRYb39sYpGo=;
 h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;
 b=qzbEI4XxSj/LXfIMldac8e44FC10laqh87NpGU++d2ws0T1Ld2re6dQTMCP8pYHAQ99Qxwnmlln0vn5g65Vzq4eVz3HNLqs7bYfYlRXeSBo1pNMLR8J9C2JQ7KQmUCbKFUxB9vc5y8IMRV1zTLnLcIDXa4nLz7mmDeDSNiUUF2U=
ARC-Authentication-Results: i=1; server2.sourceware.org
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6C6143858D26
Date: Tue, 25 Feb 2025 16:59:53 -0800 (PST)
X-X-Sender: jeremyd@resin.csoft.net
To: Cedric Blancher <cedric.blancher@gmail.com>
cc: cygwin@cygwin.com
Subject: Re: Document support for @ character in UNC paths
In-Reply-To: <CALXu0UcjiJt4=MnuCWb_97FY9NVMM6Ak-5a87H2uR7qO+50Gzg@mail.gmail.com>
Message-ID: <d3cc4542-4664-a756-ccd3-f05515cc1d7b@jdrake.com>
References: <CALXu0UdHbasuyBiVZveyvJ1+K168QKBu0wn_cEVG8z+zfqQQeg@mail.gmail.com>
 <CAPJSo4XR+vG=RLrOwdo=TsVhLj+qRhDdu0CFrnDZn4Z0oSoqhQ@mail.gmail.com>
 <Z7dgP35hc_jd_dK7@calimero.vinschen.de>
 <CAPJSo4WrUzuGyTzz=Pp8oPnnbcawLNGZBb5dCE67AazVh8B2bA@mail.gmail.com>
 <Z7eSVamMjrs5XsBm@calimero.vinschen.de>
 <CANH4o6NW7NnygLoRgWmMMV7qY4UwK6vKnVKCRX2u=9MCWhdMdg@mail.gmail.com>
 <Z7hVWK1_pzYrIzBG@calimero.vinschen.de>
 <CALWcw=E4kcJ+UbsRkqkFpgRx734H33NhJhspuVH2KgDzV4jL3g@mail.gmail.com>
 <Z7my7gejHoLjf2F1@calimero.vinschen.de>
 <CALWcw=EqzTv-J5pm1DVT8Un+J2QWLtV70nF1nU9DO_P3Cg4OOg@mail.gmail.com>
 <CALWcw=GDQ0kPGXBXMa3-9LdFX3fjsVdUK-VS1TpwdO_XtFvXMA@mail.gmail.com>
 <CALXu0UcjiJt4=MnuCWb_97FY9NVMM6Ak-5a87H2uR7qO+50Gzg@mail.gmail.com>
MIME-Version: 1.0
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.30
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Jeremy Drake via Cygwin <cygwin@cygwin.com>
Reply-To: Jeremy Drake <cygwin@jdrake.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cygwin-bounces~archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie.com@cygwin.com>

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
