|
From: | Harald van Dijk |
Subject: | [Bug-tar] tar 1.31 aborts when extracting archive containing ./ with -U |
Date: | Mon, 7 Jan 2019 23:24:40 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 |
Hi,After upgrading to GNU tar 1.31, I am seeing bad behaviour trying to extract archives containing ./ entries with the -U option. This is easily reproducible:
$ tar cf - --no-recursion . | tar xUf - AbortedThe abort() in src/extract.c's maybe_recoverable(), marked with a comment as unreachable, is in fact reachable in this case.
Either giving an error on the failure to remove ./ (and continuing extraction of the remaining files in the archive) or silently accepting the ./ entry would work. GNU tar 1.30 silently accepted it.
Background: I'm using a modified version of Slackware's pkgtools to manage the software on my system. Its packages are tar archives containing ./ entries as part of the spec, and it extracts them using -U, ignoring errors, to handle upgrades better, especially in the case where an older version of the package provided a symlink where the newer provides a directory.
Cheers, Harald van Dijk
[Prev in Thread] | Current Thread | [Next in Thread] |