mirror of
https://git.savannah.gnu.org/git/tar.git
synced 2026-09-19 22:54:15 +00:00
tar: -x -C symlink fix
* src/misc.c (chdir_do): Don't use O_NOFOLLOW when opening the argument to -C. This is for consistency with "tar -c -C FOO", and matches the new documentation. * tests/extrac14.at: New file. * tests/Makefile.am (TESTSUITE_AT): Add it. * tests/testsuite.at: Include it.
This commit is contained in:
+2
-1
@@ -736,7 +736,8 @@ chdir_do (int i)
|
||||
{
|
||||
if (! IS_ABSOLUTE_FILE_NAME (curr->name))
|
||||
chdir_do (i - 1);
|
||||
fd = openat (chdir_fd, curr->name, open_searchdir_flags);
|
||||
fd = openat (chdir_fd, curr->name,
|
||||
open_searchdir_flags & ~ O_NOFOLLOW);
|
||||
if (fd < 0)
|
||||
open_fatal (curr->name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user