[prev in list] [next in list] [prev in thread] [next in thread]
List: pdns-dev
Subject: [Pdns-dev] ldap patches - again
From: Norbert Sendetzky <norbert () linuxnetworks ! de>
Date: 2003-07-07 18:15:59
Message-ID: 200307072016.00659.norbert () linuxnetworks ! de
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Bert
Please apply the outstanding patches (attached below) to the current
source if you are not planning to release a new version in the next
few days. Especially the "list_target" patch is necessary for the new
LdapBackend AXFR code.
Thanks
Norbert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iEYEARECAAYFAj8JuN8ACgkQxMLs5v5/7eC0VQCgp01zSgeHGmPHDSTt+8zqlS9b
KvgAn2Y+VeTDp4xfcgP3Mavd9BCdbOyC
=eF+X
-----END PGP SIGNATURE-----
["list_target.diff" (text/x-diff)]
diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.cc \
pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc
--- pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Sat Jun 21 14:17:51 2003
+++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.cc Sat Jun 28 16:41:31 2003
@@ -60,8 +60,9 @@
}
-bool LdapBackend::list( int domain_id )
+bool LdapBackend::list( const string &target, int domain_id )
{
+ L << Logger::Warning << backendname << " AXFR request for " << target << endl;
L << Logger::Warning << backendname << " AXFR is not supported" << endl;
return false;
}
diff -ru pdns-2.9.9/modules/ldapbackend/ldapbackend.hh \
pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh
--- pdns-2.9.9/modules/ldapbackend/ldapbackend.hh Sat Jun 21 14:16:38 2003
+++ pdns-2.9.9.list/modules/ldapbackend/ldapbackend.hh Sat Jun 28 16:41:31 2003
@@ -83,7 +83,7 @@
~LdapBackend();
void lookup( const QType &qtype, const string &qdomain, DNSPacket *p=0, int \
zoneid=-1 );
- bool list( int domain_id );
+ bool list( const string &target, int domain_id );
bool get( DNSResourceRecord &rr );
};
diff -ru pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc \
pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc
--- pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.cc Mon Jan 6 17:13:59 2003
+++ pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.cc Sat Jun 28 16:41:31 2003
@@ -103,7 +103,7 @@
d_qtype=qtype;
}
-bool MySQLBackend::list(int domain_id )
+bool MySQLBackend::list(const string &target, int domain_id )
{
DLOG(L<<backendName<<" MySQLBackend constructing handle for list of domain id \
'"<<domain_id<<"'"<<endl);
diff -ru pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.hh \
pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.hh
--- pdns-2.9.9/modules/mysqlbackend/mysqlcbackend.hh Fri Nov 29 14:11:39 2002
+++ pdns-2.9.9.list/modules/mysqlbackend/mysqlcbackend.hh Sat Jun 28 16:41:31 2003
@@ -22,7 +22,7 @@
QType d_qtype;
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
- bool list(int domain_id);
+ bool list(const string &target, int domain_id);
bool get(DNSResourceRecord &r);
private:
diff -ru pdns-2.9.9/modules/oraclebackend/oraclebackend.cc \
pdns-2.9.9.list/modules/oraclebackend/oraclebackend.cc
--- pdns-2.9.9/modules/oraclebackend/oraclebackend.cc Wed Nov 27 16:35:52 2002
+++ pdns-2.9.9.list/modules/oraclebackend/oraclebackend.cc Sat Jun 28 16:41:31 2003
@@ -375,7 +375,7 @@
}
}
-bool OracleBackend::list(int domain_id)
+bool OracleBackend::list(const string &target, int domain_id)
{
mQueryId = domain_id;
diff -ru pdns-2.9.9/modules/oraclebackend/oraclebackend.hh \
pdns-2.9.9.list/modules/oraclebackend/oraclebackend.hh
--- pdns-2.9.9/modules/oraclebackend/oraclebackend.hh Wed Nov 27 16:35:52 2002
+++ pdns-2.9.9.list/modules/oraclebackend/oraclebackend.hh Sat Jun 28 16:41:31 2003
@@ -72,7 +72,7 @@
virtual ~OracleBackend();
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int \
zoneId=-1);
- bool list(int domain_id);
+ bool list(const string &target, int domain_id);
bool get(DNSResourceRecord &r);
Only in pdns-2.9.9.list/modules/oraclebackend: oraclebackend.hh.orig
Only in pdns-2.9.9.list/modules/pdnsbackend: .deps
Only in pdns-2.9.9.list/modules/pdnsbackend: Makefile
diff -ru pdns-2.9.9/modules/pdnsbackend/pdnsbackend.cc \
pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.cc
--- pdns-2.9.9/modules/pdnsbackend/pdnsbackend.cc Thu Mar 13 13:45:30 2003
+++ pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.cc Sat Jun 28 16:41:31 2003
@@ -128,7 +128,7 @@
this->Query(query);
}
-bool PdnsBackend::list(int inZoneId)
+bool PdnsBackend::list(const string &target, int inZoneId)
{
//cout << "PdnsBackend::list" << endl;
diff -ru pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh \
pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh
--- pdns-2.9.9/modules/pdnsbackend/pdnsbackend.hh Thu Mar 13 13:45:30 2003
+++ pdns-2.9.9.list/modules/pdnsbackend/pdnsbackend.hh Sat Jun 28 16:41:31 2003
@@ -18,7 +18,7 @@
~PdnsBackend();
void lookup(const QType &, const string &qdomain, DNSPacket *p = 0, int zoneId \
= -1);
- bool list(int inZoneId);
+ bool list(const string &target, int inZoneId);
bool get(DNSResourceRecord& outRecord);
bool getSOA(const string &name, SOAData &soadata);
Only in pdns-2.9.9.list/modules/pipebackend: .deps
Only in pdns-2.9.9.list/modules/pipebackend: Makefile
diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.cc \
pdns-2.9.9.list/modules/pipebackend/pipebackend.cc
--- pdns-2.9.9/modules/pipebackend/pipebackend.cc Mon Dec 16 14:04:27 2002
+++ pdns-2.9.9.list/modules/pipebackend/pipebackend.cc Sat Jun 28 16:41:31 2003
@@ -118,7 +118,7 @@
d_qname=qname;
}
-bool PipeBackend::list(int inZoneId)
+bool PipeBackend::list(const string &target, int inZoneId)
{
try {
d_disavow=false;
diff -ru pdns-2.9.9/modules/pipebackend/pipebackend.hh \
pdns-2.9.9.list/modules/pipebackend/pipebackend.hh
--- pdns-2.9.9/modules/pipebackend/pipebackend.hh Wed Nov 27 16:31:59 2002
+++ pdns-2.9.9.list/modules/pipebackend/pipebackend.hh Sat Jun 28 16:41:31 2003
@@ -59,7 +59,7 @@
PipeBackend(const string &suffix="");
~PipeBackend();
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
- bool list(int domain_id);
+ bool list(const string &target, int domain_id);
bool get(DNSResourceRecord &r);
static DNSBackend *maker();
diff -ru pdns-2.9.9/modules/xdbbackend/xdbbackend.cc \
pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc
--- pdns-2.9.9/modules/xdbbackend/xdbbackend.cc Mon Dec 16 15:07:04 2002
+++ pdns-2.9.9.list/modules/xdbbackend/xdbbackend.cc Sat Jun 28 16:41:31 2003
@@ -30,7 +30,7 @@
delete d_db;
}
- bool list(int id) {
+ bool list(const string &target, int id) {
return false; // we don't support AXFR (go away)
}
diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.cc \
pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc
--- pdns-2.9.9/pdns/backends/bind/bindbackend.cc Fri Feb 28 12:43:25 2003
+++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.cc Sat Jun 28 16:41:31 2003
@@ -756,7 +756,7 @@
return true;
}
-bool BindBackend::list(int id)
+bool BindBackend::list(const string &target, int id)
{
if(!d_zone_id_map.count(id))
return false;
diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend.hh \
pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh
--- pdns-2.9.9/pdns/backends/bind/bindbackend.hh Mon Feb 3 15:38:24 2003
+++ pdns-2.9.9.list/pdns/backends/bind/bindbackend.hh Sat Jun 28 16:41:31 2003
@@ -177,7 +177,7 @@
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
- bool list(int id);
+ bool list(const string &target, int id);
bool get(DNSResourceRecord &);
static DNSBackend *maker();
Only in pdns-2.9.9.list/pdns/backends/bind: bindbackend.hh.orig
diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend2.cc \
pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc
--- pdns-2.9.9/pdns/backends/bind/bindbackend2.cc Thu Mar 20 14:29:29 2003
+++ pdns-2.9.9.list/pdns/backends/bind/bindbackend2.cc Sat Jun 28 16:41:31 2003
@@ -726,7 +726,7 @@
return true;
}
-bool Bind2Backend::list(int id)
+bool Bind2Backend::list(const string &target, int id)
{
cout<<"List of id "<<id<<" requested"<<endl;
if(!s_id_zone_map.count(id))
diff -ru pdns-2.9.9/pdns/backends/bind/bindbackend2.hh \
pdns-2.9.9.list/pdns/backends/bind/bindbackend2.hh
--- pdns-2.9.9/pdns/backends/bind/bindbackend2.hh Tue Mar 4 20:04:32 2003
+++ pdns-2.9.9.list/pdns/backends/bind/bindbackend2.hh Sat Jun 28 16:41:31 2003
@@ -178,7 +178,7 @@
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
- bool list(int id);
+ bool list(const string &target, int id);
bool get(DNSResourceRecord &);
static DNSBackend *maker();
Only in pdns-2.9.9.list/pdns/backends/bind: bindbackend2.hh.orig
diff -ru pdns-2.9.9/pdns/backends/gsql/gsqlbackend.cc \
pdns-2.9.9.list/pdns/backends/gsql/gsqlbackend.cc
--- pdns-2.9.9/pdns/backends/gsql/gsqlbackend.cc Sat Jun 21 12:04:32 2003
+++ pdns-2.9.9.list/pdns/backends/gsql/gsqlbackend.cc Sat Jun 28 16:41:31 2003
@@ -300,7 +300,7 @@
d_qtype=qtype;
d_count=0;
}
-bool GSQLBackend::list(int domain_id )
+bool GSQLBackend::list(const string &target, int domain_id )
{
DLOG(L<<"GSQLBackend constructing handle for list of domain \
id'"<<domain_id<<"'"<<endl);
diff -ru pdns-2.9.9/pdns/backends/gsql/gsqlbackend.hh \
pdns-2.9.9.list/pdns/backends/gsql/gsqlbackend.hh
--- pdns-2.9.9/pdns/backends/gsql/gsqlbackend.hh Thu Jan 2 16:10:30 2003
+++ pdns-2.9.9.list/pdns/backends/gsql/gsqlbackend.hh Sat Jun 28 16:41:31 2003
@@ -23,7 +23,7 @@
string sqlEscape(const string &name);
void lookup(const QType &, const string &qdomain, DNSPacket *p=0, int zoneId=-1);
- bool list(int domain_id);
+ bool list(const string &target, int domain_id);
bool get(DNSResourceRecord &r);
bool isMaster(const string &domain, const string &ip);
diff -ru pdns-2.9.9/pdns/dnsbackend.cc pdns-2.9.9.list/pdns/dnsbackend.cc
--- pdns-2.9.9/pdns/dnsbackend.cc Sun Jan 12 12:55:27 2003
+++ pdns-2.9.9.list/pdns/dnsbackend.cc Sat Jun 28 16:46:51 2003
@@ -239,7 +239,7 @@
DNSResourceRecord i;
time_t newest=0;
- if(!(this->list(sd.domain_id)))
+ if(!(this->list(domain, sd.domain_id)))
throw AhuException("Backend error trying to determine magic serial number of \
zone '"+domain+"'");
while(this->get(i)) {
diff -ru pdns-2.9.9/pdns/dnsbackend.hh pdns-2.9.9.list/pdns/dnsbackend.hh
--- pdns-2.9.9/pdns/dnsbackend.hh Mon Feb 3 15:38:25 2003
+++ pdns-2.9.9.list/pdns/dnsbackend.hh Sat Jun 28 16:46:07 2003
@@ -80,7 +80,7 @@
if the backend does not consider itself responsible for the id passed.
\param domain_id ID of which a list is requested
*/
- virtual bool list(int domain_id)=0;
+ virtual bool list(const string &target, int domain_id)=0;
virtual ~DNSBackend(){};
diff -ru pdns-2.9.9/pdns/randombackend.cc pdns-2.9.9.list/pdns/randombackend.cc
--- pdns-2.9.9/pdns/randombackend.cc Wed Nov 27 16:18:33 2002
+++ pdns-2.9.9.list/pdns/randombackend.cc Sat Jun 28 17:28:44 2003
@@ -34,7 +34,7 @@
d_ourname=getArg("hostname");
}
- bool list(int id) {
+ bool list(const string &target, int id) {
return false; // we don't support AXFR
}
diff -ru pdns-2.9.9/pdns/tcpreceiver.cc pdns-2.9.9.list/pdns/tcpreceiver.cc
--- pdns-2.9.9/pdns/tcpreceiver.cc Sun Jun 22 13:11:41 2003
+++ pdns-2.9.9.list/pdns/tcpreceiver.cc Sat Jun 28 17:23:25 2003
@@ -246,7 +246,7 @@
static bool canDoAXFR(DNSPacket *q)
{
- if(!arg().mustDo("disable-axfr")
+ if(arg().mustDo("disable-axfr"))
return false;
if(arg()["allow-axfr-ips"].empty())
@@ -330,7 +330,7 @@
DNSBackend *B=sd.db; // get the RIGHT backend
// now list zone
- if(!(B->list(sd.domain_id))) {
+ if(!(B->list(target, sd.domain_id))) {
L<<Logger::Error<<"Backend signals error condition"<<endl;
outpacket->setRcode(2); // 'SERVFAIL'
sendDelPacket(outpacket,outsock);
@@ -451,7 +451,7 @@
L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl;
throw AhuException("Unable to bind to TCP socket");
}
-
+
listen(s,128);
L<<Logger::Error<<"TCP server bound to \
"<<*laddr<<":"<<arg()["local-port"]<<endl; d_sockets.push_back(s);
diff -ru pdns-2.9.9/pdns/ueberbackend.cc pdns-2.9.9.list/pdns/ueberbackend.cc
--- pdns-2.9.9/pdns/ueberbackend.cc Mon Feb 10 12:09:09 2003
+++ pdns-2.9.9.list/pdns/ueberbackend.cc Sat Jun 28 16:41:31 2003
@@ -371,7 +371,7 @@
return true;
}
-bool UeberBackend::list(int domain_id)
+bool UeberBackend::list(const string &target, int domain_id)
{
L<<Logger::Error<<"UeberBackend::list called, should NEVER EVER HAPPEN"<<endl;
exit(1);
diff -ru pdns-2.9.9/pdns/ueberbackend.hh pdns-2.9.9.list/pdns/ueberbackend.hh
--- pdns-2.9.9/pdns/ueberbackend.hh Mon Dec 30 21:26:44 2002
+++ pdns-2.9.9.list/pdns/ueberbackend.hh Sat Jun 28 16:41:31 2003
@@ -115,7 +115,7 @@
void lookup(const QType &, const string &qdomain, DNSPacket *pkt_p=0, int \
zoneId=-1);
bool getSOA(const string &domain, SOAData &sd);
- bool list(int domain_id);
+ bool list(const string &target, int domain_id);
bool get(DNSResourceRecord &r);
static DNSBackend *maker(const map<string,string> &);
["stl_exception.diff" (text/x-diff)]
--- pdns-2.9.8/modules/ldapbackend/ldapbackend.cc Fri Jun 6 14:43:50 2003
+++ pdns-2.9.9/modules/ldapbackend/ldapbackend.cc Mon Jun 23 17:06:54 2003
@@ -148,9 +148,14 @@
L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << \
", filter: " << filter << ", qtype: " << qtype.getName() << endl; m_msgid = \
m_pldap->search( getArg("basedn"), filter, (const char**) attributes ); }
- catch( LDAPException &e )
+ catch( LDAPException &le )
{
- L << Logger::Warning << backendname << " Unable to search LDAP directory: " << \
e.what() << endl; + L << Logger::Warning << backendname << " Unable to search LDAP \
directory: " << le.what() << endl; + return;
+ }
+ catch( exception &e )
+ {
+ L << Logger::Error << backendname << " Caught STL exception: " << e.what() << \
endl; return;
}
catch( ... )
@@ -239,9 +244,13 @@
goto Redo;
}
}
- catch( LDAPException &e )
+ catch( LDAPException &le )
+ {
+ L << Logger::Warning << backendname << " Search failed: " << le.what() << endl;
+ }
+ catch( exception &e )
{
- L << Logger::Warning << backendname << " Search failed: " << e.what() << endl;
+ L << Logger::Error << backendname << " Caught STL exception: " << e.what() << \
endl; }
catch( ... )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic