From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.24]) by sourceware.org (Postfix) with ESMTPS id 624983858038 for ; Thu, 29 Jul 2021 10:23:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 624983858038 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MuUvU-1mzELL3aLq-00rWAo for ; Thu, 29 Jul 2021 12:23:21 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 561A4A80DDF; Thu, 29 Jul 2021 12:23:21 +0200 (CEST) Date: Thu, 29 Jul 2021 12:23:21 +0200 From: Corinna Vinschen To: cygwin-patches@cygwin.com Subject: Re: [PATCH 0/3] Add more winsymlinks values Message-ID: Reply-To: cygwin-patches@cygwin.com Mail-Followup-To: cygwin-patches@cygwin.com References: <20210719163134.9230-1-jon.turney@dronecode.org.uk> <0b2f3506-b5f8-5e73-b92f-62583dbd4fdb@dronecode.org.uk> <8c228092-1699-35aa-7558-106f49fde87f@dronecode.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <8c228092-1699-35aa-7558-106f49fde87f@dronecode.org.uk> X-Provags-ID: V03:K1:eyiwhDoXvuApkAATDX8Mhut/bC6Ab2cjVXE1WSn8KR8FztG14du re5D4TE3qGy3q7ltw2Uer7+vQcMd1hWDCR4X7AIpXbpg1g03O8nFfecWJhkuCzWMZei+YyJ qcJ1gcbCSJnY1dBqfSLCEbrvEI325KLv8qfpuPw+6NsoBJOdOvIIKbkrVtBHszlC6Nfovx3 8k1i/N5tGEHaEP8ZunzmA== X-UI-Out-Filterresults: notjunk:1;V03:K0:RhNPCXi+nZw=:AFPZ3K3LOQgXban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n=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin-patches@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component patch submission and discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2021 10:23:25 -0000 On Jul 28 20:55, Jon Turney wrote: > On 22/07/2021 15:21, Corinna Vinschen wrote: > > On Jul 22 14:53, Jon Turney wrote: > > > [1] https://cygwin.com/pipermail/cygwin/2020-August/245994.html > > > > Did nobody ask the Docker guys why they fail to support perfectly > > valid reparse points? > > It seems so e.g. [1]. The answer isn't much beyond "yes, that doesn't work", > though. > > [1] https://github.com/moby/moby/issues/41058#issuecomment-692968944 D'oh! > > > I haven't yet looked at adding 'native' symlink support to setup itself, but > > > it's probably going to be a bit of a pain. > > > > That may be not a bad idea after all. Setup typically runs as elevated > > process, so it has the required permissions to create native symlinks. > > Scripts could then run with CYGWIN=winsymlinks:native by default. > > > > As long as nobody has the hare-brained idea to move a Cygwin distro > > manually, native symlinks should be just as well as Cygwin symlinks. > > I'm pretty reluctant to add this to setup in any form which isn't initially > "keep doing what we currently do, unless you explicitly ask for symlinks to > be made a different way". (especially since when we changed what we were > doing in Cygwin 3.1.5, it opened this whole can of worms) > > So I don't think that gets us any further forward if setup doesn't have > useful control over the kinds of symlinks made by post-install scripts. Ok, then, by all means, lets' add a few options to the CYGWIN=winsymlinks setting. Just s/WSYM_magic/WSYM_sysfile/. > >> > > > If we can come up with a fixed policy that works everywhere, there is no > > > advantage. But that seems unlikely :) > > > > > > I could buy an argument that 'native' should be the default (although maybe > > > all that does is slow things down in the majority of installs?). > > > > It may slow down installations a tiny little bit because the target > > paths have to be converted to POSIX, but I doubt this is more than just > > a marginal slowdown. > > My assumption was that "the majority of installs" are running where native > symlink creation isn't permitted, so the slowdown I meant was that adds "try > to create a native symlink, fail and fallback" for every symlink creation. Uh, ok. That's avoidable, though. The Cygwin code is lacking a check for SeCreateSymbolicLinkPrivilege being present and enabled in the current user token. This could be done once and then stored in a static var for later consumption. Corinna