bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] Tar is destroying existing symbolic links - or maybe I'm i


From: Paul Eggert
Subject: Re: [Bug-tar] Tar is destroying existing symbolic links - or maybe I'm ignorant with the gnu-tar
Date: Sat, 31 Mar 2007 07:23:04 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

address@hidden (Joerg Schilling) writes:

> "KAEFFERBITZ, Thomas" <address@hidden> wrote:
>> the symbolic link was replaced by the directory from the tar-archive; there 
>> is enough work-araound, but a little inconvenient in a frequently changing 
>> environment. 
>> The option '-h' didn't work, as expected.
>

> Isn't this a result from the way gnu tar tries to prevent attacks
> with symlinks?

It's hard to tell, since he doesn't give a recipe for reproducing
the problem.  I can't reproduce it on my host (tar 1.16.1, Debian stable).
Possibly all he needs to do is to upgrade to the latest 'tar' version.

Here's how I tried (and failed) to reproduce the problem.

$ mkdir bin
$ touch bin/file
$ tar cf tar bin
$ rm -fr bin
$ mkdir d
$ ln -s d bin
$ ls -l bin
lrwxrwxrwx 1 eggert eggert 1 Mar 31 07:16 bin -> d
$ tar xf tar
$ ls -l bin
lrwxrwxrwx 1 eggert eggert 1 Mar 31 07:16 bin -> d
$ ls -l d
total 0
-rw-r--r-- 1 eggert eggert 0 Mar 31 07:15 file
$ tar --version
tar (GNU tar) 1.16.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]