From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sequoia-grove.ad.secure-endpoints.com (sequoia-grove.ad.secure-endpoints.com [IPv6:2001:470:1f07:f77:70f5:c082:a96a:5685]) by sourceware.org (Postfix) with ESMTPS id 42A50385840F for ; Mon, 8 Jan 2024 19:17:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 42A50385840F Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=secure-endpoints.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=secure-endpoints.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 42A50385840F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:1f07:f77:70f5:c082:a96a:5685 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704741435; cv=none; b=fNViMG5trzIRsV02XMjGzq340c/BvPkA+FKZaW0fjDnJ2gDsOY8Qv+Iq/W644thjPm/Fztmhrfpn9cxTSjsikHa0XTQpxz4iPBT0TMI/cjSnBnaMxAYIzLgGEcPVVHzo+b73Ce/+sMJMRgj/lWvLVkFNQ1CUsFsPdWvEaJxQPvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704741435; c=relaxed/simple; bh=L9oOoil7e8iAI6NwdK7moIjOxNbQCIUw3K+/82PcDPU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WnSrOEDc6IYandEHWNzFNLH7xDH1t5P/Ura6hqJdfwe+I9uxr4b36agJd8UzDXPse9hc+e+gy+F0FUFnvovLmICEafUzXvOu3uQcVGVLKHjqC27onVz7GrNI0VClR1rg2G+ruyfo89lEtczkRJCo1wK9rt60+XV1Qvb1+dgoWzc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/relaxed; d=secure-endpoints.com; s=MDaemon; r=y; t=1704741432; x=1705346232; i=jaltman@secure-endpoints.com; q=dns/txt; h=Message-ID: Date:MIME-Version:User-Agent:Subject:Content-Language:To:Cc: References:From:Autocrypt:Organization:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=t9ee9dR5qKjkLzg2qeTYyhdVkvaO7oopPO TWqaqIJOY=; b=iy8SL6kMe2+f4bNEbaQpau4fRTszWB/TBIax4KCje908oR8+sH AbfDU2p0uffcf55dGS9ZsKaBa2WvAwkWdMi2InOqUIySItmI23wXveGPvkkW815n V7p9LpAo3ZJci5vITvdxq7ZeIBAIytYvbwTJL4SL0GJBEDeTBoVJlvv0A= X-MDAV-Result: clean X-MDAV-Processed: sequoia-grove.ad.secure-endpoints.com, Mon, 08 Jan 2024 14:17:12 -0500 Received: from [IPV6:2603:7000:73c:c800:199f:1b35:3bd5:843e] by secure-endpoints.com (IPv6:2001:470:1f07:f77:28d9:68fb:855d:c2a5) (MDaemon PRO v23.5.2a) with ESMTPSA id md5001003772607.msg; Mon, 08 Jan 2024 14:17:12 -0500 X-Spam-Processed: sequoia-grove.ad.secure-endpoints.com, Mon, 08 Jan 2024 14:17:12 -0500 (not processed: message from trusted or authenticated source) X-MDRemoteIP: 2603:7000:73c:c800:199f:1b35:3bd5:843e X-MDHelo: [IPV6:2603:7000:73c:c800:199f:1b35:3bd5:843e] X-MDArrival-Date: Mon, 08 Jan 2024 14:17:12 -0500 X-MDOrigin-Country: US, NA X-Authenticated-Sender: acct-jaltman@secure-endpoints.com X-Return-Path: prvs=1737591ae9=jaltman@secure-endpoints.com X-Envelope-From: jaltman@secure-endpoints.com X-MDaemon-Deliver-To: cygwin@cygwin.com Message-ID: <2f4c9914-1285-42f0-b841-69335687713a@secure-endpoints.com> Date: Mon, 8 Jan 2024 14:17:08 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Cygwin generates syscalls for *.lnk files on filesystems with native symlink support? Content-Language: en-US To: matthew patton , "cygwin@cygwin.com" Cc: Corinna Vinschen References: <266017637.5531727.1704733902023@mail.yahoo.com> <487617694.5562874.1704739459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BSwcNKIqyea9IpTwsVfkF4/iui 7xD9+LtzqeUkBAe7q5jEJmJMZhAfh7usZGT8TGxXegCaF4Jwz2nxS4Fv7VRza/yUAOJlc0da R11TPeiUNCQWY7PpL1AXO9vaSyjFuOzTnU8vzXvI9fGoxIxKGRQpKMU8PROIFw0AEQEAAcLB XwQYAQIACQUCTAuU7QIbDAAKCRD3enNVkraaBIxXD/4xlaBwW2TLFfMvlcY/2XDSm6NO4JaJ G2Nzp35xaaBVwMVzWvI+GgTgKNSFot9f4jiLBNQdnq3UKoEThR2ORKVL0ZJS1QYR7yyrOo0M teDSy8ofU1FJ6xu4ND3ekOjP20BTrihDpqUdahir2uaRfMkwM+0imOlcutGMhJNF/LAjrhoD p9SeDMYBXZ1wfrbrEo/EEu0PbkGyzqPyEPqwN1iSJkcAnjuIA0rTf1jQtJAaDov7yHsSRwUM +qTGsjOGQAN3wtYwjPpw7hI01sE+x0uq0pVeo4qeWTZ2TE4Vtp8FKXFAkqnP878q+kNk9Ve+ DRs8UlRfa9Lgf5ETjXOTVGaT/UGxi9B4oo8k0lzvM/A1txexL/lLw8AULhUeGtyS6D2X9vFi 6azna+o918R9BV86uXPiDOf1nMwqKchNCxmgH9vd0aQm8TKCrWAW4kU1Ig6aMNuZiWloVZfK rmWizbgeGKE9rhNPNqxkqBaA4lrJ8L6bdKbhAOe3NQjO2vUAXB53JphlF74GwEsh+85i9/yI bvwJVcsFYhdZz7fCAUOcnFkGnyrwIgkizQ3xXShPW8mqkgUk4kYMnucC4kG/E7pI/4lke5X5 X9vroXRHB7tkpAgT46SqSM/XTwCaseXG9orDgz3duRTUp6K0++S/qsqTakGVmjD5917A1HqW fMmiKA== Organization: Secure Endpoints, Inc. In-Reply-To: <487617694.5562874.1704739459687@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MDCFSigsAdded: secure-endpoints.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 1/8/2024 1:44 PM, matthew patton via Cygwin wrote: >> Cygwin does not create symlinks as junctions.  No idea where you got that idea. > $ echo $CYGWINwinsymlinks:nativestrict > $ /usr/bin/ln -s default.GGG6q test1 > 01/08/2024  01:24 PM         test1 [...]Type=File > $ (unset CYGWIN; /usr/bin/ln -s default.GGG6q test2.nocygwin) > 01/08/2024  01:25 PM         test2.nocygwin [...]Type=File JUNCTIONS are a type of reparse point tag. Many tools report things as JUNCTIONS when they don't know what else to call it because JUNCTIONS were the only type of reparse tag commonly used. This is the output of JP Software's Take Command for an AFS volume root directory [\\afs\yfs]dir Directory of \\afs\yfs\* 5/26/2021 11:49 . 11/26/2019 14:25 amd64_linux26 [your-file-system.com#amd64_linux26] 11/24/2019 20:29 backups 10/20/2022 10:43 project 12/05/2011 10:14 public [#root.public] 9/06/2020 9:27 service 7/26/2010 20:44 support [#root.support] 6/15/2011 11:40 test [#test.test] 2/15/2012 8:49 u 3/28/2023 12:50 user 11/28/2011 17:01 usr [user] 12/10/2009 0:34 www [#root.www] 12/13/2016 1:29 30 autorun.inf 6/07/2015 21:54 104 Desktop.ini 11/26/2019 14:42 local [@sys\usr\local] 148 bytes in 3 files and 12 dirs 0 bytes free The JUNCTIONS are AFS volume mount points using the Microsoft designated reparse point for OpenAFS. The SYMLINKD is a symlink reparse point to a directory using the NTFS symlink reparse point. The SYMLINK is a symlink reparse point to an object of unknown type (which Windows expects to be a file not a directory) using the NTFS symlink reparse point. Here is the cygwin ls -l output [\\afs\yfs]c:\tools\cygwin\bin\ls -l . total 38 -rw-r--r-- 1 jaltm mkpasswd 104 Jun 7 2015 Desktop.ini drwxr-xr-x 1 jaltm mkpasswd 0 Nov 26 2019 amd64_linux26 -rw-r--r-- 1 jaltm mkpasswd 30 Dec 13 2016 autorun.inf drwxr-xr-x 1 jaltm mkpasswd 0 Nov 24 2019 backups lrwxrwxrwx 1 jaltm mkpasswd 14 Nov 26 2019 local -> @sys/usr/local drwxr-xr-x 1 jaltm mkpasswd 0 Oct 20 2022 project drwxr-xr-x 1 jaltm mkpasswd 0 May 21 2023 public drwxr-xr-x 1 jaltm mkpasswd 0 Sep 6 2020 service drwxr-xr-x 1 jaltm mkpasswd 0 Nov 17 2015 support drwxr-xr-x 1 jaltm mkpasswd 0 May 26 2019 test drwxr-xr-x 1 jaltm mkpasswd 0 Feb 15 2012 u drwxr-xr-x 1 jaltm mkpasswd 0 Mar 28 2023 user lrwxrwxrwx 1 jaltm mkpasswd 4 Nov 28 2011 usr -> user drwxr-xr-x 1 jaltm mkpasswd 0 Jul 10 2017 www As part of this reply I will note that the NTFS symlinks differ from POSIX symlinks in significant ways 1. A pre-existing file system object is required in order to attach a reparse tag 2. The type of the target must be known when the reparse tag is applied to a pre-existing file system object 3. The reparse tag may be removed and replaced any number of times without deleting the pre-existing object to which it is attached.   Whereas a POSIX symlink inode target cannot be altered once created.  The inode must be deleted and replaced. 4. The Windows file APIs do not behave as many applications expect them to when a symlink reparse tag is present.  For example, opening a file handle will traverse the reparse tag and open the target but the file info api when given the same path will return the information belonging to the object on which the reparse tag was applied.   This breaks many applications such as the java runtime among others. Jeffrey Altman