Created
April 26, 2013 11:38
-
-
Save Habbie/5466601 to your computer and use it in GitHub Desktop.
Patch for recursor
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/pdns_recursor.cc.old Wed Nov 22 17:26:30 2006 | |
+++ pdns-2.9.19/pdns/pdns_recursor.cc Wed Nov 22 17:26:05 2006 | |
@@ -684,7 +684,7 @@ | |
if (!arg()["chroot"].empty()) { | |
- 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