From: Kees Monshouwer Date: Tue, 7 Jan 2014 15:15:12 +0000 (+0100) Subject: set group and supplementary groups before chroot X-Git-Tag: rec-3.6.0-rc1~258^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1198%2Fhead;p=thirdparty%2Fpdns.git set group and supplementary groups before chroot --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 80d1c7fe89..82d1bbf6c7 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -347,16 +347,19 @@ void mainthread() if(!::arg()["chroot"].empty()) { if(::arg().mustDo("master") || ::arg().mustDo("slave")) gethostbyname("a.root-servers.net"); // this forces all lookup libraries to be loaded + Utility::dropGroupPrivs(newuid, newgid); if(chroot(::arg()["chroot"].c_str())<0 || chdir("/")<0) { L<