Ticket #110: pdns.diff

File pdns.diff, 0.6 kB (added by anon, 2 years ago)

Corrected patch for pdns

  • pdns-2.9.19/pdns/common_startup.cc

    old new  
    273273   if(!arg()["chroot"].empty()) {   
    274274     if(arg().mustDo("master") || arg().mustDo("slave")) 
    275275        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) { 
    277277       L<<Logger::Error<<"Unable to chroot to '"+arg()["chroot"]+"': "<<strerror(errno)<<", exiting"<<endl;  
    278278       exit(1); 
    279279     }