~vcs-imports/tar/trunk

Viewing all changes in revision 2783.

  • Committer: Paul Eggert
  • Date: 2015-07-13 16:53:56 UTC
  • Revision ID: git-v1:fe3b106cb3b0bc4d50230ed263bf5ccbc8bf1ea7
tar: fix symlink race and symlink transform bug

Problem reported by Tobias Stoeckmann in:
http://lists.gnu.org/archive/html/bug-tar/2015-07/msg00004.html
* gnulib.modules: Add areadlinkat-with-size.
* src/create.c: Include areadlink.h.
(dump_file0): Use areadlinkat_with_size, rather than trying to do
it by hand, incorrectly.  This also avoids assumption that
the symlink contents fit on the stack.  Also, use the transformed
link name, not the original link name, when deciding whether the
name is long enough to require writing a long link.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: