tar: fix race condition
commit79a442d7b0e92622794bfa41dee18a28e450a0dc
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 10 Jun 2022 05:09:34 +0000 (9 22:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 11 Jun 2022 01:26:37 +0000 (10 18:26 -0700)
tree8ea515f759e0ce70c66243d0e41f14b7801af704
parent7a37621e5bfee4c966d8fca0c509480c96aa9f1b
tar: fix race condition

Problem reported by James Abbatiello in:
https://lists.gnu.org/r/bug-tar/2022-03/msg00000.html
* src/extract.c (make_directories): Do not assume that when
mkdirat fails with errno == EEXIST that there is an existing file
that can be statted.  It could be a dangling symlink.  Instead,
wait until the end and stat it.
NEWS
src/extract.c