Ticket #110: pdns.diff
| File pdns.diff, 0.6 kB (added by anon, 2 years ago) |
|---|
-
pdns-2.9.19/pdns/common_startup.cc
old new 273 273 if(!arg()["chroot"].empty()) { 274 274 if(arg().mustDo("master") || arg().mustDo("slave")) 275 275 gethostbyname("a.root-servers.net"); // this forces all lookup libraries to be loaded 276 if(chroot(arg()["chroot"].c_str())<0 ) {276 if(chroot(arg()["chroot"].c_str())<0 || chdir("/")<0) { 277 277 L<<Logger::Error<<"Unable to chroot to '"+arg()["chroot"]+"': "<<strerror(errno)<<", exiting"<<endl; 278 278 exit(1); 279 279 }