]> git.ipfire.org Git - thirdparty/systemd.git/commit
copy: tighten destination checks when copying files
authorLennart Poettering <lennart@poettering.net>
Mon, 1 Feb 2021 16:45:25 +0000 (17:45 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Aug 2021 15:23:58 +0000 (17:23 +0200)
commit2f782044986a30bf73f1fe00209dbd204b3efe33
treec0735c56c7da2738cb6e298c1ea048983670eb90
parent5c9d961e79adaa0f4dc2e3b1e5deac0f29633723
copy: tighten destination checks when copying files

let's make sure we only operate on regular files when copying files.

Also, make sure to copy file attributes only over if target is a regular
file (so that copying a file to /dev/null won't alter the access
mode/ownership of that device node...)
src/shared/copy.c