]> git.ipfire.org Git - thirdparty/bind9.git/commit
[9.18] fix: dev: Check the result of dirfd() before calling unlinkat()
authorOndřej Surý <ondrej@isc.org>
Mon, 19 Aug 2024 11:23:13 +0000 (11:23 +0000)
committerOndřej Surý <ondrej@isc.org>
Mon, 19 Aug 2024 11:23:13 +0000 (11:23 +0000)
commitb9f0df60972db8c331c338cb1add5e5354812885
tree4c5a8639da6e955fade1a1c168d5b9a6c7722824
parent887a61a408237277bf385eb5e70e70279f18669e
parente08d3a7932528cf62c9a4335a639e7e638639a1e
[9.18] fix: dev: Check the result of dirfd() before calling unlinkat()

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

Backport of MR !9316

Merge branch 'backport-4853-check-result-of-dirfd-in-isc_log-9.18' into 'bind-9.18'

See merge request isc-projects/bind9!9344