From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61015 invoked by alias); 23 Apr 2017 15:21:09 -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 61002 invoked by uid 89); 23 Apr 2017 15:21:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=privilege, w32api, states, hear X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.137) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Apr 2017 15:21:07 +0000 Received: from [192.168.1.100] ([174.0.238.184]) by shaw.ca with SMTP id 2JJydDwG5q6uI2JJzdRtLS; Sun, 23 Apr 2017 09:21:07 -0600 X-Authority-Analysis: v=2.2 cv=eK1jtDh1 c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=wGz7-fTsAAAA:8 a=G3t0qmIugT9W_7a8eWsA:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: Windows 10 Creators Update and Symlinks Reply-To: Brian.Inglis@SystematicSw.ab.ca References: <4b5447f2-a1fe-925e-5e3d-6692347374ad@kit.edu> <60bf66d9-d467-3cac-72f9-7823d1c1c32a@teco.edu> To: cygwin@cygwin.com Message-ID: <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19@SystematicSw.ab.ca> Date: Mon, 24 Apr 2017 04:16:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <60bf66d9-d467-3cac-72f9-7823d1c1c32a@teco.edu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfK7FGFh1OEjXBIOEXDs3KY2qpW0krY332B4KpR1pA7NyA4j6j2afJgWFWU/4xVBDvzAMNXeTjnEE8Tx/poLckJhvig8VKPmD9nHSdX8rLEDLNnzm4F6W aUR4H23lSHHK4zFAeaNj/9winDw8Kvjz+i/sbjYvZUxLUvacwdo6LUFculP54rkHjAxddu31PxSplg== X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00300.txt.bz2 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. > I was really excited to hear this! > I tried to export CYGWIN="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. Artcile states: CreateSymbolicLink To enable the new behavior when using the CreateSymbolicLink API, there is an additional dwFlags option you will need to set: Value Meaning SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE 0x2 Specify this flag to allow creation of symbolic links when the process is not elevated So Cygwin patches are required to winsymlinks:native/strict handling in winsup/w32api/include/winbase.h (which may be owned by mingw): #define SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE 0x2 and in winsup/cygwin/path.cc(symlink_native) like: /* 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))) but may need W10 build 14972 checks, and any privilege checks disabled. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple