X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-50.9 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE
X-Spam-Check-By: sourceware.org
Subject: Re: tar: symlinks unpacked to empty files (tar security problem?)
From: "Yaakov (Cygwin/X)" <yselkowitz@users.sourceforge.net>
To: cygwin <cygwin@cygwin.com>
In-Reply-To: <20100704171709.GA12616@ednor.casa.cgf.cx>
References: <1278237042.6012.15.camel@YAAKOV04>	 <20100704171709.GA12616@ednor.casa.cgf.cx>
Content-Type: text/plain; charset="UTF-8"
Date: Sun, 04 Jul 2010 14:46:32 -0500
Message-ID: <1278272792.4436.2.camel@YAAKOV04>
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Sun, 2010-07-04 at 13:17 -0400, Christopher Faylor wrote:
> That's because of the way that tar handles symlinks.  If you have a
> reference to an absolute path, tar makes a zero-length regular file
> placeholder.  Then when it is done extracting, tar is supposed to remove
> this file and create the real symlink.  However, the test to make sure
> that it is ok to do this was broken by a recent DLL change.  The inode
> returned the first time that the file was created was != the inode when
> the file is checked later.  So tar thought that the zero-length file was
> modified and silently decided not to create the symlink.
> 
> I've fixed the cygwin problem - it should be in the next snapshot.

It appears to be working with 20100704 snapshot.  Thanks for the quick
response.


Yaakov



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

