]> git.ipfire.org Git - thirdparty/systemd.git/commit
fs-util,tmpfiles: fix error handling of fchmod_opath()
authorLennart Poettering <lennart@poettering.net>
Wed, 9 Sep 2020 18:35:33 +0000 (20:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 10 Sep 2020 10:47:50 +0000 (12:47 +0200)
commitdee00c1939c6194404c15a80650d0c04bb01b0db
tree7a38d0306edc981e3227e2cc8f2a0a39f273de02
parentbae66f4bdab1c5f4d0e35680ffb43efef5c33784
fs-util,tmpfiles: fix error handling of fchmod_opath()

When 4dfaa528d45 was first commited its callers relied on `errno` instead of the
return value for error reporting. Which worked fine, since internally
under all conditions base were set — even if ugly and not inline with
our coding style. Things then got broken in
f8606626ed3c2582e06543550d58fe9886cdca5f where suddenly additional
syscalls might end up being done in the function, thus corrupting `errno`.
src/basic/fs-util.c
src/tmpfiles/tmpfiles.c