]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix: dev: Check the result of dirfd() before calling unlinkat()
authorOndřej Surý <ondrej@isc.org>
Mon, 19 Aug 2024 09:57:48 +0000 (09:57 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 19 Aug 2024 09:57:48 +0000 (09:57 +0000)
Instead of directly using the result of dirfd() in the unlinkat() call,
check whether the returned file descriptor is actually valid.  That
doesn't really change the logic as the unlinkat() would fail with
invalid descriptor anyway, but this is cleaner and will report the right
error returned directly by dirfd() instead of EBADF from unlinkat().

Closes #4853

Merge branch '4853-check-result-of-dirfd-in-isc_log' into 'main'

Closes #4853

See merge request isc-projects/bind9!9316


Trivial merge