From c2e972e8f487ef1224edff429c820ed499c33ab6 Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Tue, 16 Feb 2016 12:27:10 +0100 Subject: [PATCH] pdnsutil: support chroot Closes #964 --- pdns/pdnsutil.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index 9e59fd4ec3..2116c3ff40 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -118,11 +118,21 @@ void loadMainConfig(const std::string& configdir) ::arg().set("soa-retry-default","Default SOA retry")="3600"; ::arg().set("soa-expire-default","Default SOA expire")="604800"; ::arg().set("soa-minimum-ttl","Default SOA minimum ttl")="3600"; + ::arg().set("chroot","Switch to this chroot jail")=""; // Keep this line below all ::arg().set() statements if (! ::arg().laxFile(configname.c_str())) cerr<<"Warning: unable to read configuration file '"<()); -seedRandom(::arg()["entropy-source"]); - #ifdef HAVE_LIBSODIUM if (sodium_init() == -1) { cerr<<"Unable to initialize sodium crypto library"<