]> git.ipfire.org Git - thirdparty/bind9.git/commit
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)
commit661981be7b086c55b99d03f1d534b593fdfcf4e7
treec053838bc71ba39852f82fb3264ab6ace6bb4b1b
parent8071384324bfd5c0ba4530f522df314143218c1c
parent59f4fdebc07441a5c7419488990f4b82c6a22eeb
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

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

Closes #4853

See merge request isc-projects/bind9!9316