delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/04/19/08:58:19

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BF8E33969007
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1618837096;
bh=+KQrq/eEgLzvphy/w32Rr5nCN3iZo/si5mAaujNgj+M=;
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=HgpcP28AI8WYy5q/DMBAd/QUJKlGstsrBfYSoWw/P8UAfyI4By8TuUHfp4WdbbWUM
Mu8aNNzcMhMExbcOMqr+/VmND7F4Y0AYQL+9OVjazlK7JZuN0vjIyXKT5uG+EaSgZt
bQgg/GTv4nOHcIBPEDFbs+Z5fH59nXsRKdD9Xm/8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E3D613969007
Date: Mon, 19 Apr 2021 14:58:08 +0200
To: cygwin AT cygwin DOT com
Subject: Re: realpath issue with native[strict] symlinks
Message-ID: <YH1+YEMx8A/8Mpfg@calimero.vinschen.de>
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAGHpTBK781REMJ3n276sy25JniKtzXKJan7xYyMh3jh=rgXdgg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAGHpTBK781REMJ3n276sy25JniKtzXKJan7xYyMh3jh=rgXdgg@mail.gmail.com>
X-Provags-ID: V03:K1:JBhj0fuoi1BF5jE2oB5eXzXhn3Z3iicywrhrZEQ1wXeQU4ykTJx
5G6/uKcCIwrRiYA9PcMUXwYqAf4Sw2GnqdPGlGdTgewqdDn03gS3tb3aPTP/oQBI19kyTF0
PtkQ2WUFzFYP5cpezEw4dIsv5QPoXxgJFxTldwUKjdn3Os7W8EHVYzPDeXsjG7sm6Ont2ks
OyWRcI5a57hAmWFd7SLLA==
X-UI-Out-Filterresults: notjunk:1;V03:K0:We7qmnj5s+8=:5rZpwoFlsjFXA9jrnr/Ce2
HXjdLTIU0RV0Z5vI00SC1se5EtZL/1MuXdhh4N+hu9aUXzZ0IK9BHJcCSKs/FeUPPaRO+p1ql
wuv5RrCicrt25tsktKwFaKvVL9MAt46bKqFfbBJv3fRbcxV9/TG2mJ2PcTa9wnYPYWb+kRDT5
ZgWopq1dLZ6cHWedI51qt8rUg5Cz9QzAwqIJU4F21wyIs65jHJdFMuu3RcmT2Bl155TjEYIBu
VMd5G3qLMcFeJ3rAl4d+mz55n+gnbuZinLIp98YkCwYrxpSMG+Hm8VUCtT8wa9dmnR0rmGf3b
iJ8yYbqdpVwbWSz3gtsqdo26480+XlHD30Jc2UqgmNVXJLmJoqcaX1JTW7c0qby1MQ0qGQUHy
8kgT2y0oPJ9fHeljKZnlIMRG1Uc9KxVQ4H5Hq44EupOcOgRKHHKGJzwL2K10ZgPJdUEGolMMb
i4MO+0cyFtgyUSr7E56LCSYwaAjP0PV4qKlvoLEP12qxygBT1gJv+Agkm3NOtJkMxWP6J9ckK
FOUp80fqtT3i8BmFDdJXdg=
X-Spam-Status: No, score=-100.5 required=5.0 tests=BAYES_00,
GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE,
RCVD_IN_MSPIKE_H2, 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: <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 AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Apr 18 10:59, Orgad Shaneh via Cygwin wrote:
> Hi,
> 
> When winsymlinks:native/nativestrict is used, realpath doesn't resolve
> the full path correctly, when a symlink to the same directory is used.
> 
> Example follows. The output is:
> /home/user/recurse/test/d1
> /home/user/recurse/test2/d1
> 
> While it should be /home/user/recurse/d1 for both.

I was going to write:

  Nothing we can do about without re-implementing Cygwin's path handling
  from scratch.  For historical reasons, POSIX paths are evaluated in a
  non-POSIXy manner from right to left.  If the resulting path is an
  existing path, the assumption is that no inner path component is a
  symlink.  That's true as long as Windows didn't support
  symlinks/junctions and Cygwin didn't support them.

But now I'm writing this:

  Probably I have a workaround for this problem.  I added a certain test
  to the function checking the outer path component, so the checks for
  path validity don't stop at the outer path component, just because
  it's a valid Windows path.

I pushed the patch and uploaded new developer snapshots to
https://cygwin.com/snapshots/

Please give them a try.


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