]> git.ipfire.org Git - thirdparty/systemd.git/commit
rm-rf: fix up chmod in the _cleanup_ rm_rf() destructors
authorLennart Poettering <lennart@poettering.net>
Thu, 4 Mar 2021 15:03:07 +0000 (16:03 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 4 Mar 2021 20:50:07 +0000 (20:50 +0000)
commit4d930e87ee30e74a585c840b4642157dd6321707
tree322b49c8f89d3a4870622c832382e37f6331e9f8
parent44a8ad7a24fb6cfb797b7d911b8800b1cd9d27a1
rm-rf: fix up chmod in the _cleanup_ rm_rf() destructors

REMOVE_CHMOD is necessary to remove files/dirs that are owned by us but
have an access mode that would not allow us to remove them. In generic
destructor calls for use with `_cleanup_` that are "fire-and-forget"
style we should make use of that, to maximize the chance we can actually
remove the files/dirs.

(Also, add in REMOVE_MISSING_OK. Just because prettier, we ignore the
return codes anyway, but it' a bit nicer to ignore a bit fewer errors.)
src/basic/rm-rf.h