]> git.ipfire.org Git - thirdparty/coreutils.git/commit
shred: avoid rename race
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jul 2017 00:11:24 +0000 (17:11 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 31 Jul 2017 00:18:31 +0000 (17:18 -0700)
commit2ae1460dad89a791ebf770f74217596b6642cead
treeaa096e74891cd390d35d7e26fba2da26ce490908
parentac6956bbce04bc92ff5d2c5a8a2e1cf0428b3bc0
shred: avoid rename race

Use renameat2 to avoid a rename race condition, on recent-enough
GNU/Linux.
* bootstrap.conf (gnulib_modules): Add renameat2.
* src/shred.c: Include renameat2.h.
(wipename): Use renameat2 instead of rename.
bootstrap.conf
src/shred.c