www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2025/02/26/09:46:12

DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 51QEkCwS191468
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 51QEkCwS191468
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=WKDxnc7c
X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 77CCD3858C5F
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1740581170;
bh=oSOV14BFpknV5f+L/svfvr9y9kM6k2nmWRVcGX0pW28=;
h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=WKDxnc7cgJLzoNtRJ73Ho6QO/wK3BAh7yYWk4y8Jqd9p7o9kjs+f9ViuHPZIca+A3
LWo6GAmP96UBJHb3ReiqrvfS6k4ShijpKV5/Q8umPbATgU6kAxRqJ8zQjV0NsqBSJG
vYxc7TwF8H6S3QXUkuE735jNb3qg9LINZng6fCv8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4BDA3858D28
Date: Wed, 26 Feb 2025 15:45:45 +0100
To: cygwin AT cygwin DOT com
Subject: Re: Document support for @ character in UNC paths
Message-ID: <Z78pGVoryN-BPKh-@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAPJSo4WrUzuGyTzz=Pp8oPnnbcawLNGZBb5dCE67AazVh8B2bA AT mail DOT gmail DOT com>
<Z7eSVamMjrs5XsBm AT calimero DOT vinschen DOT de>
<CANH4o6NW7NnygLoRgWmMMV7qY4UwK6vKnVKCRX2u=9MCWhdMdg AT mail DOT gmail DOT com>
<Z7hVWK1_pzYrIzBG AT calimero DOT vinschen DOT de>
<CALWcw=E4kcJ+UbsRkqkFpgRx734H33NhJhspuVH2KgDzV4jL3g AT mail DOT gmail DOT com>
<Z7my7gejHoLjf2F1 AT calimero DOT vinschen DOT de>
<CALWcw=EqzTv-J5pm1DVT8Un+J2QWLtV70nF1nU9DO_P3Cg4OOg AT mail DOT gmail DOT com>
<CALWcw=GDQ0kPGXBXMa3-9LdFX3fjsVdUK-VS1TpwdO_XtFvXMA AT mail DOT gmail DOT com>
<CALXu0UcjiJt4=MnuCWb_97FY9NVMM6Ak-5a87H2uR7qO+50Gzg AT mail DOT gmail DOT com>
<d3cc4542-4664-a756-ccd3-f05515cc1d7b AT jdrake DOT com>
MIME-Version: 1.0
In-Reply-To: <d3cc4542-4664-a756-ccd3-f05515cc1d7b@jdrake.com>
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.30
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Corinna Vinschen via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com>

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 DOT zebracluster DOT intra DOT pasteur DOT fr AT 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 DOT zebracluster DOT intra DOT pasteur DOT fr AT 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019