Skip to content

Instantly share code, notes, and snippets.

View Habbie's full-sized avatar

Peter van Dijk Habbie

View GitHub Profile
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:44
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:52
authoritative -> recursing in pdns-recursor.init.d
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 10:54
authoritative -> recursing in pdns-recursor.init.d
diff -rNu pdns-recursor-3.1.4/pdns-recursor.init.d pdns-recursor-3.1.4-widexs/pdns-recursor.init.d
--- pdns-recursor-3.1.4/pdns-recursor.init.d 2006-10-16 16:24:18.000000000 +0200
+++ pdns-recursor-3.1.4-widexs/pdns-recursor.init.d 2006-10-16 19:54:03.000000000 +0200
@@ -63,7 +63,7 @@
;;
force-reload | restart)
- echo -n "Restarting PowerDNS authoritative nameserver: "
+ echo -n "Restarting PowerDNS recursing nameserver: "
echo -n stopping and waiting..
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 11:25
authoritative -> recursing in pdns-recursor.init.d
diff -rNu pdns-recursor-3.1.4/pdns-recursor.init.d pdns-recursor-3.1.4-widexs/pdns-recursor.init.d
--- pdns-recursor-3.1.4/pdns-recursor.init.d 2006-10-16 16:24:18.000000000 +0200
+++ pdns-recursor-3.1.4-widexs/pdns-recursor.init.d 2006-10-16 19:54:03.000000000 +0200
@@ -63,7 +63,7 @@
;;
force-reload | restart)
- echo -n "Restarting PowerDNS authoritative nameserver: "
+ echo -n "Restarting PowerDNS recursing nameserver: "
echo -n stopping and waiting..
@Habbie
Habbie / pdns-recursor-3.1.4-init_d.patch
Created April 22, 2013 11:46
authoritative -> recursing in pdns-recursor.init.d
diff -rNu pdns-recursor-3.1.4/pdns-recursor.init.d pdns-recursor-3.1.4-widexs/pdns-recursor.init.d
--- pdns-recursor-3.1.4/pdns-recursor.init.d 2006-10-16 16:24:18.000000000 +0200
+++ pdns-recursor-3.1.4-widexs/pdns-recursor.init.d 2006-10-16 19:54:03.000000000 +0200
@@ -63,7 +63,7 @@
;;
force-reload | restart)
- echo -n "Restarting PowerDNS authoritative nameserver: "
+ echo -n "Restarting PowerDNS recursing nameserver: "
echo -n stopping and waiting..
@Habbie
Habbie / pdns.bindbackendcomment.patch
Created April 22, 2013 11:46
patch that check comment only for the first character
--- pdns-2.9.20/pdns/backends/bind/zoneparser2.cc.old 2006-03-15 19:29:38.000000000 +0100
+++ pdns-2.9.20/pdns/backends/bind/zoneparser2.cc 2006-11-13 20:23:40.563902162 +0100
@@ -75,7 +75,8 @@ void ZoneParser::parse(const string &fna
while(gzgets(fds.top(), cline,sizeof(cline)-1)) {
line=cline;
chomp(line," \x1a\r\n");
- cutOff(line,";");
+ if (line[0] == ';')
+ cutOff(line,";");
@Habbie
Habbie / axfr-fix.diff
Created April 22, 2013 11:46
fixes the mentioned axfr problems for me
Index: pdns/misc.cc
===================================================================
--- pdns/misc.cc (revision 924)
+++ pdns/misc.cc (working copy)
@@ -202,6 +202,10 @@
while (replen) {
ret = write(outsock, buffer, replen);
+ while(ret == -1 && errno == EAGAIN) {
+ Utility::usleep(1);
@Habbie
Habbie / pdns.diff
Created April 22, 2013 11:46
Corrected patch for pdns
--- 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);
@Habbie
Habbie / recursor.diff
Created April 22, 2013 11:46
Patch for recursor
--- 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);
Index: configure.in
===================================================================
--- configure.in (revision 930)
+++ configure.in (working copy)
@@ -294,62 +294,21 @@
if test "$needpgsql"
then
- AC_ARG_WITH(pgsql,
- [ --with-pgsql=<path> root directory path of PgSQL installation],