]> git.ipfire.org Git - thirdparty/shadow.git/commit
lib/copydir:copy_entry(): use temporary stat buffer
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>
Mon, 18 Mar 2024 11:14:21 +0000 (12:14 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 21 Mar 2024 01:44:12 +0000 (02:44 +0100)
commit000619344ddb01aa2e9aa746583f7c5a52ce56fe
tree2b776188790d669e53452f4dff6c242a337fc798
parent51a0d94a08920a2d3edc52919692cdbd25f07d6d
lib/copydir:copy_entry(): use temporary stat buffer

There are no guarantees that fstatat() does not clobber the stat
buffer on errors.

Use a temporary buffer so that the following code sees correct
attributes of the source entry.

Issue #973

Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
lib/copydir.c