-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This bug was originally reported on the cygwin list.  It looks like a bug
when extracting broken symlinks that point to destinations outside the
tar'd directory:

$ tar --version | head -n1
tar (GNU tar) 1.18
$ mkdir /tmp/tar
$ cd /tmp/tar
$ ln -s ../nowhere broken
$ tar cf bad.tar broken
$ rm broken
$ ls ../nowhere *
ls: cannot access ../nowhere: No such file or directory
bad.tar
$ tar xvpf bad.tar
broken
$ ls ../nowhere *
ls: cannot access ../nowhere: No such file or directory
bad.tar  broken
$ tar xvpf bad.tar
broken
$ ls ../nowhere *
../nowhere  bad.tar  broken
$ ls -lF ../nowhere *
- ---------- 1 eblake None     0 Aug 21 13:47 ../nowhere
- -rw-r--r-- 1 eblake None 10240 Aug 21 13:46 bad.tar
lrwxrwxrwx 1 eblake None    10 Aug 21 13:47 broken -> ../nowhere


In other words, when expanding the tar file where the broken symlink does
not exist, only the broken symlink is created (as expected).  But when
expanding the tar file where the broken symlink already resides, a 0-byte
inaccessible file is mistakenly created at the location pointed to by the
broken symlink.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [EMAIL PROTECTED]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGy0JR84KuGfSFAYARAqNaAJ0bWUncmHMr2UKUGOH0SNKcA9ngYgCfWj8z
9IiOYjHiMhTIUvSJfmDjq40=
=RROp
-----END PGP SIGNATURE-----


Reply via email to