public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-patches@cygwin.com
Subject: Re: [PATCH v2] Cygwin: respect PC_SYM_FOLLOW and PC_SYM_NOFOLLOW_REP with inner links
Date: Mon, 31 May 2021 10:02:40 +0200	[thread overview]
Message-ID: <YLSYIC/yYFz2IdMS@calimero.vinschen.de> (raw)
In-Reply-To: <alpine.BSO.2.21.2105301213380.30039@resin.csoft.net>

On May 30 12:58, Jeremy Drake via Cygwin-patches wrote:
> First, revert the handling of virtual drives as non-symlinks.  This is no
> longer necessary.

I'm all for it, because I like the idea that Cygwin can see virtual
drives as symlinks, but...

> The new GetFinalPathNameW handling for native symlinks in inner path
> components is disabled if caller doesn't want to follow symlinks, or
> doesn't want to follow reparse points.  Set flag to not follow reparse
> points in chdir, allowing native processes to see their cwd potentially
> including native symlinks, rather than dereferencing them.

So you're trying to keep the path length of the native CWD below
MAX_PATH?  I understand what you're trying to accomplish, but are
you sure this doesn't break Cygwin processes?  The idea of what
the native path of a directory is differs depending on calling
chdir and stuff like mkdir.

> For v2, I realized the PC_SYM_NOFOLLOW_REP flag was supposed to do this,
> and that lack of PC_SYM_FOLLOW was not being respected either.  With this,
> and patching `pwd -P` to `pwd` in makepkg, the long-named package builds
> successfully.  I did not re-indent the code for the addition of the if due
> to having learned from my patch to rebase, but it looks kind of ugly.

Formatting should try to stick to 80 chars max line length, if possible.
Kind of like this, just with TABs:

-	  for (unsigned pc_flags = opt & (PC_NO_ACCESS_CHECK | PC_KEEP_HANDLE);
+	  for (unsigned pc_flags = opt & (PC_NO_ACCESS_CHECK | PC_KEEP_HANDLE
					  | PC_SYM_FOLLOW | PC_SYM_NOFOLLOW_REP);


Thanks,
Corinna

  reply	other threads:[~2021-05-31  8:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-29 20:34 [PATCH] Cygwin: tweak handling of native symlinks from chdir Jeremy Drake
2021-05-29 23:15 ` Jeremy Drake
2021-05-30  6:05   ` Jeremy Drake
2021-05-30 19:58     ` [PATCH v2] Cygwin: respect PC_SYM_FOLLOW and PC_SYM_NOFOLLOW_REP with inner links Jeremy Drake
2021-05-31  8:02       ` Corinna Vinschen [this message]
2021-05-31  8:17         ` Corinna Vinschen
2021-05-31 17:55           ` Jeremy Drake
2021-07-03 21:01           ` Jeremy Drake
2021-07-07 18:52           ` Jeremy Drake
2021-07-08 14:48             ` Corinna Vinschen
2021-06-03 20:29         ` [PATCH v3] " Jeremy Drake
2021-06-03 20:57           ` Jeremy Drake
2021-07-06 14:57             ` Corinna Vinschen
2021-07-06 17:38               ` Jeremy Drake
2021-07-06 17:40               ` [PATCH v4] " Jeremy Drake
2021-07-07  8:47                 ` Corinna Vinschen
2021-07-07  6:50               ` [PATCH v3] " Jeremy Drake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YLSYIC/yYFz2IdMS@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin-patches@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).