public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Linda Walsh <cygwin@tlinx.org>
To: cygwin@cygwin.com
Subject: Re: Symlink targets dereferenced when winsymlinks:native
Date: Wed, 25 Nov 2015 03:20:00 -0000	[thread overview]
Message-ID: <56551D13.10907@tlinx.org> (raw)
In-Reply-To: <20151118175503.GT6402@calimero.vinschen.de>

Corinna Vinschen wrote:
>> If it matters, the use case is `ln -sf /proc/self/fd /dev/fd`.
> 
> It matters.  This is a bug in Cygwin, a missing test in fact.  It should
> never allow to create native symlinks to targets which only exist inside
> of Cygwin.
----
	Please don't.  Why?   It would be a built-in behavior
difference between unix/linux symlinks and cygwin.
symlink create on unix/linux doesn't look at the 'source'
and create different types of links or different behaviors
based on some ill-considered 'pathname filtering'.

>  Consider that /proc/self/fd has no meaning to non-Cygwin
> processes at all.
---
  Unless you have a file-system driver, or a ".desktop.ini" in a
windows created 'C:\Proc\.desktop.ini that redirects handlers
for \proc to something similar.  On my system, when I 
look at /proc/self/fd in cygwin+windows:
cyg:
/>  ll /proc/self/fd
total 0
lrwxrwxrwx 1 0 Nov 24 17:58 0 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 1 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 2 -> /dev/pty3
lrwxrwxrwx 1 0 Nov 24 17:58 3 -> /proc/21920/fd/
win:
/> cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\>dir \proc\self\fd /w
dir \proc\self\fd /w
 Volume in drive C is System Disk
 Volume Serial Number is E889-68E4
 Directory of C:\proc\self\fd
[.]  [..] 
               0 File(s)              0 bytes
               2 Dir(s)  401,855,094,784 bytes free
----
i.e. it shows a directory that is empty, and
according to windows, was created over a year ago:
C:\>dir |grep -i proc
dir |grep -i proc
01/23/2014  05:13 PM    <DIR>          proc


As soon as you start prohibiting normal 'native' link
creation based on some assumption about "who owns the
path", I can't see how that won't end up biting you later.




--
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

  parent reply	other threads:[~2015-11-25  2:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-17 22:28 David Macek
2015-11-18 17:55 ` Corinna Vinschen
2015-11-18 18:13   ` David Macek
2015-11-18 19:48     ` Corinna Vinschen
2015-11-18 20:01       ` Warren Young
2015-11-18 20:07         ` Corinna Vinschen
2015-11-19 18:53       ` David Macek
2015-11-19 19:36         ` Nellis, Kenneth
2015-11-19 21:17           ` David Macek
2015-11-20  9:26             ` Corinna Vinschen
2015-11-24 21:48               ` David Macek
2015-11-26 12:02                 ` Corinna Vinschen
2015-11-29 14:10                   ` David Macek
2015-11-29 17:10                     ` Corinna Vinschen
2015-11-20  9:29         ` Corinna Vinschen
2015-11-24 19:51           ` David Macek
2015-11-25  3:20   ` Linda Walsh [this message]
2015-11-25 14:59     ` David Macek
2015-11-26 11:53       ` Another reason to not corrupt winnative symlinks: :currenly, they are linux-CIFS compat. Cygwin's are not Linda Walsh

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=56551D13.10907@tlinx.org \
    --to=cygwin@tlinx.org \
    --cc=cygwin@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).