From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10117 invoked by alias); 24 Apr 2017 09:09:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 10068 invoked by uid 89); 24 Apr 2017 09:09:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=assistant, Enterprise, Assistant, offline X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Apr 2017 09:09:33 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id B0B89721E281A for ; Mon, 24 Apr 2017 11:09:31 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id D4E825E01C3 for ; Mon, 24 Apr 2017 11:09:30 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id B94F5A80578; Mon, 24 Apr 2017 11:09:30 +0200 (CEST) Date: Mon, 24 Apr 2017 16:09:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Windows 10 Creators Update and Symlinks Message-ID: <20170424090930.GA8532@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4b5447f2-a1fe-925e-5e3d-6692347374ad@kit.edu> <60bf66d9-d467-3cac-72f9-7823d1c1c32a@teco.edu> <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19@SystematicSw.ab.ca> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tKW2IUtsqtDRztdT" Content-Disposition: inline In-Reply-To: <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19@SystematicSw.ab.ca> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-04/txt/msg00311.txt.bz2 --tKW2IUtsqtDRztdT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2535 On Apr 23 09:21, Brian Inglis wrote: > On 2017-04-23 03:26, Till Riedel wrote: > > Am 13.04.2017 um 0:29 schrieb Jeffrey Altman: > >> When Developer mode is enabled the elevation requirement for > >> symlink creation is disabled: > >> https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/= #DXz6icKZOkEozgYR.97 > >> This was necessary for symlink creation within WSL to work. >=20 > > I was really excited to hear this! > > I tried to export CYGWIN=3D"winsymlinks:nativestrict" and create > > symlink without elevation and failed on cygwin 2.8.0 (checked that > > "cmd /C mklink" works as expected in Windows 10 Creators Update > > Developer Mode). > > Any ideas if there are any extra checks that lead to "Operation not > > permitted"? > > Windows seemingly even allows symlinks to nonexistent files (I > > somehow think there was a problem with that in the past). For me > > personally this would a strong reason to switch to real symlinks. >=20 > Artcile states: > CreateSymbolicLink > To enable the new behavior when using the CreateSymbolicLink API,=20 > there is an additional dwFlags option you will need to set: >=20 > Value Meaning > SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE > 0x2 Specify this flag to allow creation of symbolic links when the=20 > process is not elevated >=20 > So Cygwin patches are required to winsymlinks:native/strict handling=20 > in winsup/w32api/include/winbase.h (which may be owned by mingw): >=20 > #define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE 0x2 >=20 > and in winsup/cygwin/path.cc(symlink_native) like: >=20 > /* Try to create native symlink. */ > if (!CreateSymbolicLinkW (final_newpath->Buffer, final_oldpath->Buffer, > #ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE > SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE | > #endif > (win32_oldpath.isdir () > ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) >=20 > but may need W10 build 14972 checks, and any privilege checks disabled. Unfortunately the flag can't be used blindly because older versions of Windows will return ERROR_INVALID_PARAMETER when adding this flag, so we definitely need a version check. I'm also running an Enterprise edition of W10 which didn't get the Creator's update yet and the "Update Assistant" doesn't support the Enterprise edition either. I'm also going offline for all of May, so this might take a bit. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY/cDKAAoJEPU2Bp2uRE+gPaAQAJ/2n5IulqH8EzuyaEcCnG9l dXltHHJGMrmGuNS3SrO65M9WUQ/aj61nW14bFWf3NXWZYOIDFSJs0yPV9Pfp6qgf 26OUQpqVev2cx2bKDnWAbCiwcz6X5hVaF6yE/+kupk+cFqczKRUBQ2ev+toU7+6t WUQJb0pT8fUAsgzhMRNZNAD4iu/RYSAuqmoXlPxGa4Jos9dmc3DERzKJH1qbyQEJ 8gainff8O9mAXpId6JM2IeHWCfLayLPfrPorAwH5JuTxtPDDqZk+tE0escFtkISc sTz43tocxO17oe8KVdEjNzoCDOKZ0YlqRK6MVl0MM2w2WtMN9LGCT8N2fi/89BD5 LhffWT+fUh+09EFAcZ/20kSTjUrYtrvlDtaEcebxsYN4bLRHeRbRlJFO+7gdO7b0 rWu3jbB10y0PlgiAIPYJFougdjxAVVtmTzDskv9qxL7zxnpvUct2kzO8C0xo8Zao yua9kYKkczjOuEsk9CgwWFsU9aoaCh8wFcqKs3TkNiZOV2exVLIHWENoDZkYOy7D oLPsOOYW4nenbTJl453Eo1a+adZKmO51jKqX4KNftWk0Qd7RDb21/zT+qtock89Q +IPeQrq1gAPAswpzb1lPLgTOQXERXFk2xt/CWwTORIjeNZWTUPfhPVXRRnlLF2um l1fQd5rkpwmwpesyJtZr =SUnr -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--