delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/27/09:02:32

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A58ED385E035
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1585314100;
bh=tl01/M2Q7/vuiJtJ2WEq4iXUxEH0sQC7uLSPev4ot9M=;
h=Date:From:To:Subject:References:In-Reply-To:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
Reply-To:From;
b=qFi6p5D/GIRLiyiydpKJyoMeSdQ1ewk9HUAiDa9/1/S2wTIiu8jwRVMYmOUfsFVd7
D8WXUD5diwiYVaswWtNvnfeq2nAQhpmOY95V2c5O/H/jOvQrJe89xpNMSSS4tNZAwB
xAL5sZG2LD7TsqhzPdBH/3ZLKyq4EAwWkIFFvOiU=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9B833385E01B
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cygwin.com
Authentication-Results: sourceware.org;
spf=fail smtp.mailfrom=corinna-cygwin AT cygwin DOT com
Date: Fri, 27 Mar 2020 14:01:33 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: WSL symbolic links
Message-ID: <20200327130133.GM3261@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <294944bd-757e-4bb8-6bcc-ceb8d9190ef9 AT towo DOT net>
<20200326110059 DOT GG3261 AT calimero DOT vinschen DOT de>
<901e1c08-46cb-555b-c0d0-5bf9c726b3ca AT SystematicSw DOT ab DOT ca>
<20200326195615 DOT GJ3261 AT calimero DOT vinschen DOT de>
<8e330046-97bb-ba3e-15dc-25aedf915d90 AT towo DOT net>
<20200327112115 DOT GL3261 AT calimero DOT vinschen DOT de>
<ba4000a3-74d2-2a3c-f6ea-6bf4fa934b8b AT towo DOT net>
MIME-Version: 1.0
In-Reply-To: <ba4000a3-74d2-2a3c-f6ea-6bf4fa934b8b@towo.net>
X-Provags-ID: V03:K1:pB9caK3iN5CbvQqjT6p11K138PtLjTarpHGmjkvhkLIT0hTDW8W
GS4hLQcRSfW7Jo6HxTD4smyOpEXKApfGzs8natIw9Mt57Qi1Uu+FSfM9QtM/ftfV1vMrbLZ
olnJu2UACRfuXLsO8OeM90Qwz8UsBx1RCVsHgVXKhJkjSi84S2DvBY5I7+OqqC+R6l+LVxR
8r906oCrKFRlIg61og47w==
X-UI-Out-Filterresults: notjunk:1;V03:K0:TAc0D3LeVnA=:l2X+pGYLhm85SouQOdUDTn
nyE5LWV7c/sldQK2kjehsZPg3YcUDfLx7XKuQhl/UEqWtKoeIbqLN60wBfu+HDqFiGWukyGD9
kNs5QBhF/pqeVlMDBHdITY0sGF0y4YtmyYvp41kgmyNGPARKWOv9tk2cCy1/1mRY5LQvAEgqd
UURvT1S9WVGIBO1i/9ELezlB0SzxIKzlyuVjuFOXpV87xAxRdniTBUb8IjK//fVTehCIt/ur0
bUNip9r87BfDrHZshqHSC2EjCOn+ozUY6HUThKcF7XFCs1ra/Y9KQFzjZo6ZSj152Z4IG5Osg
d5snaoqi2jLd3CkpREHb5KjpJT7OwBYWsbojOL6PzwIQw4uX6V2Onvnxz2qzyWSib9fXT2tQM
013s8oBAj1mqnudX3UaPuTFzEgebPJareVsL+mM/zEVlhmom8Rrl6O5jWeJdGySlmB41pGl5E
/utFx501vyx1ycWSHVdeiHlXDAPVIcHg3ltP5WjH0i/5pLIqnc0wZM98JBzzH5Nr2CaX+gy6O
N2qOuz3WUpuz1eFxa7HRkXQtPW7dNSe9/0Uv2osojBXw0JwIeSK0uivXIYDYrAk5REezDu+M+
AmDwSSAF27OqfKwLu+irfNYW23BR4bb8rFEA7VvBiWiiUZbay1EOD1EznfypMLCGxRR/gvEUX
5Lqylkjhe48t0gYSb9LWH/E+KXdprF7uPneGVKrJRMcyFnnjNvrDUSla2mJ3byhl8TqJ9CvV0
PamvBQ2MTT7A66rGMxLBb1a5uHTutzomPpN+7LICL87D39muh1tAPNymORWLj2xIwwIjP9xUf
l9A975P00c+mKQpiwAlkHXdWwwCuRjWd9Roms37n+gQObAnPc72VFPc5PIhfdFT3dl+CgdK
X-Spam-Status: No, score=-83.4 required=5.0 tests=BAYES_00, BODY_8BITS,
GARBLED_BODY, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS,
RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NEUTRAL,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <http://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: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

--===============0382624874249941823==
Content-Type: multipart/signed; micalg=pgp-sha256;
	protocol="application/pgp-signature"; boundary="cy9Nn4fUvYST66Pl"
Content-Disposition: inline


--cy9Nn4fUvYST66Pl
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mar 27 13:24, Thomas Wolff wrote:
> Am 27.03.2020 um 12:21 schrieb Corinna Vinschen:
> > On Mar 27 00:52, Thomas Wolff wrote:
> > > [...]
> > > > rd-reparse '\??\C:\tmp\link' ; echo
> > > ReparseTag:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 0xa000001d
> > > ReparseDataLength:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 8
> > > Reserved:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
> > > 02 00 00 00 66 69 6c 65
> > > > rd-reparse '\??\C:\tmp\link-abs' ; echo
> > > ReparseTag:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 0xa000001d
> > > ReparseDataLength:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 19
> > > Reserved:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
> > > 02 00 00 00 2f 6d 6e 74 2f 63 2f 74 6d 70 2f 66
> > > 69 6c 65
> > > > rd-reparse '\??\C:\tmp\link-foo' ; echo
> > > ReparseTag:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 0xa000001d
> > > ReparseDataLength:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 9
> > > Reserved:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
> > > 02 00 00 00 66 c3 b6 c3 b6
> > > > rd-reparse '\??\C:\tmp\link-foo-abs' ; echo
> > > ReparseTag:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 0xa000001d
> > > ReparseDataLength:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 20
> > > Reserved:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 0
> > > 02 00 00 00 2f 6d 6e 74 2f 63 2f 74 6d 70 2f 66
> > > c3 b6 c3 b6
> > [...]
> > I debugged this now and I found that practically all problems, including
> > the inability to delete the symlink, are a result of not being able to
> > open the reparse point correctly as reparse point within Cygwin.  So as
> > not to destroy something important, Cygwin only opens reparse points as
> > reparse points if it recognizes the reparse point type.
> >=20
> > Consequentially, all immediate problems go away, as soon as Cygwin
> > recognizes and handles the symlink :)
> >=20
> > So I created a patch and pushed it.  The latest developer snapshot from
> > https://cygwin.com/snapshots/ contains this patch.
> Works, great, thank you!

Thanks for testing!

> > Funny sidenote: Assuming you create symlinks pointing to files with
> > non-UTF-8 chars, e. g., umlauts in ISO-8859-1, then the symlink converts
> > *all* these chars to the Unicode REPLACEMENT CHARACTER 0xfffd.  I assume
> > this will also happen if you try to create the file with these chars in
> > the first place, so it's not much of a problem.
> As Windows filenames are character strings as opposed to Linux filenames
> which are byte strings, some strange behaviour is unavoidable. I see:
> $ wsl ls -l link_LW
> lrwxrwxrwx=C2=A0=C2=A0=C2=A0 1 towo=C2=A0=C2=A0=C2=A0=C2=A0 towo=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 19 Mar 27 12:11 l=
ink_LW ->
> file_L_=EF=83=A4=EF=83=B6=EF=83=BC=EF=83=9F
> $ ls -l link_LW
> lrwxrwxrwx 1 towo Kein 11 27. Mrz 13:11 link_LW -> file_L_=EF=BF=BD=EF=BF=
=BD=EF=BF=BD=EF=BF=BD
> which looks OK for me.

Not sure I expressed myself correctly there.  What I was trying to say
is, the symlink created by WSL already contains the 0xfffd replacement
char, in UTF-8 \xef \xbf \xbd.  So the info is already lost inside the
symlink.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--cy9Nn4fUvYST66Pl
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl59+S0ACgkQ9TYGna5E
T6DoXA//cU7OWVoQ/b2PVe0TC1tsFU9uo7Jh9+8uQvh3TVTZ882UUAP2VyS1oF7b
U6wT6nMb+/MT0vunMj3/urA+bxoYvP+SYGsRiJcblXXlpFO3I4KnHcz4sfGI5IqY
NWUsjcjvNAinqSCdAjFf+0BAYy695tx7x/2ovLKMfd9mjD7EmAXXoFc7eC1kMuS1
g0bxnaGbw4xgR/Rw+I1uo1KYiTtfvjtvvOBBt1wx1nAKohLc1Px5dIdamGD9/V2+
hmRefrA+Y+AwPxfAzzqdVO7jnEKv4xUr0MxKPn5PGARX955JgzblxwID2Ey2e3Cv
2uoYKrH7CaVXywtXrNa7x0tMk+IzWoUax3XTRDVNIHtqH+EsnKkw6RlV1Bh52iO3
EhuhxGduMZ3Y/wwfbVeWkJgRwnDKRSax9L9cIvfz9coOO7TJR9cdqSBVUuYzq3i4
8psJ5yyrIxncOXzs4pT3mc6soj0jtU+C44uttRrpmfJTY+rocplZ7piBZvHCO8mv
TmzTrvRjvIYME2h/8nAjwbq+eEb0T3bZYqDOBqPrkGC/RuJBlc7QUsoBA0MGVWlS
b84KZgtt6gd3z6lxt+Nh8WFjGehllC31OsoAUtK4Mgs/dz4H+04YDOkbVKEOxMtN
X7aH/r+qC1vJiE6KwyCBVFcpI9mfEZiOxa/azT3dmj5h1WRwqwM=
=xTt2
-----END PGP SIGNATURE-----

--cy9Nn4fUvYST66Pl--

--===============0382624874249941823==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0382624874249941823==--

- Raw text -


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