]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[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)
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


Trivial merge