delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/09/18:00:20

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 9 Apr 2005 18:00:07 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: bug in .. handling
Message-ID: <20050409220007.GE27966@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <42584A5D DOT 7070405 AT byu DOT net>
Mime-Version: 1.0
In-Reply-To: <42584A5D.7070405@byu.net>
User-Agent: Mutt/1.5.8i

On Sat, Apr 09, 2005 at 03:34:21PM -0600, Eric Blake wrote:
>Cygwin is taking too much liberty when resolving paths with .. in them. 
>I've tested this with both 1.5.14 and the 20050408 snapshot.  POSIX 
>requires that the pathname before the .. exist, and if it is a symlink, 
>that it is resolved, before going to the parent directory.  For example:
>
>$ cd /tmp/example
>$ ls
>$ mkdir -p a/b
>$ ln -s a/b b
>$ touch a/c a/b/d
>$ ls b
>d
>$ ls b/..       # bug - should list contents of a, not .
>a  b
>$ ls a
>b  c
>$ ls none/..    # bug - should fail with ENOENT
>a  b
>$ ln -s e e
>$ readlink -v e/none
>readlink: e/foo: Too many levels of symbolic links
>$ ls e/..       # bug - should fail with ELOOP
>a  b  e
>
>Basically, cygwin is blindly collapsing dir/.. into nothing, without first 
>verifying dir, in violation of POSIX.

I think that's going to have to be a "that's too bad" since I'm not really
keen on slowing down cygwin just to blindly match POSIX behavior.

cgf

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019