Commit c550e75a authored by Mark Andrews's avatar Mark Andrews
Browse files

4567. [port] Call getprotobyname and getservbyname prior to calling

                        chroot so that shared libraries get loaded. [RT #44537]
parent 4a85cab5
4567. [port] Call getprotobyname and getservbyname prior to calling
chroot so that shared libraries get loaded. [RT #44537]
4566. [func] Query logging now includes the ECS option if one
was included in the query. [RT #44476]
......
......@@ -22,6 +22,7 @@
#include <isc/dir.h>
#include <isc/magic.h>
#include <isc/netdb.h>
#include <isc/string.h>
#include <isc/util.h>
......@@ -163,6 +164,14 @@ isc_dir_chroot(const char *dirname) {
REQUIRE(dirname != NULL);
#ifdef HAVE_CHROOT
/*
* Try to use getservbyname and getprotobyname before chroot.
* If WKS records are used in a zone under chroot, Name Service Switch
* may fail to load library in chroot.
* Do not report errors if it fails, we do not need any result now.
*/
getprotobyname("udp") && getservbyname("domain", "udp");
if (chroot(dirname) < 0 || chdir("/") < 0)
return (isc__errno2result(errno));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment