Created
April 26, 2013 11:38
-
-
Save Habbie/5466600 to your computer and use it in GitHub Desktop.
Corrected patch for pdns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pdns-2.9.19/pdns/common_startup.cc.old Sun Oct 16 15:26:00 2005 | |
+++ pdns-2.9.19/pdns/common_startup.cc Wed Nov 22 17:16:15 2006 | |
@@ -273,7 +273,7 @@ | |
if(!arg()["chroot"].empty()) { | |
if(arg().mustDo("master") || arg().mustDo("slave")) | |
gethostbyname("a.root-servers.net"); // this forces all lookup libraries to be loaded | |
- if(chroot(arg()["chroot"].c_str())<0) { | |
+ if(chroot(arg()["chroot"].c_str())<0 || chdir("/")<0) { | |
L<<Logger::Error<<"Unable to chroot to '"+arg()["chroot"]+"': "<<strerror(errno)<<", exiting"<<endl; | |
exit(1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment