Changeset 448
- Timestamp:
- 07/16/05 13:25:38 (8 years ago)
- Location:
- trunk/pdns
- Files:
-
- 2 modified
-
modules/ldapbackend/ldapbackend.cc (modified) (7 diffs)
-
pdns/docs/pdns.sgml (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/modules/ldapbackend/ldapbackend.cc
r284 r448 126 126 string dn; 127 127 string filter; 128 128 string qesc; 129 130 131 dn = getArg( "basedn" ); 132 qesc = toLower( m_pldap->escape( target ) ); 129 133 130 134 // search for SOARecord of target 131 dn = getArg( "basedn" ); 132 filter = "(associatedDomain=" + target + ")"; 135 filter = strbind( ":target:", "(associatedDomain=" + qesc + ")", getArg( "filter-axfr" ) ); 133 136 m_msgid = m_pldap->search( dn, LDAP_SCOPE_SUBTREE, filter, (const char**) ldap_attrany ); 134 137 m_pldap->getSearchEntry( m_msgid, m_result, true ); … … 141 144 142 145 prepare(); 143 filter = "(associatedDomain=*." + target + ")";146 filter = strbind( ":target:", "(associatedDomain=*." + qesc + ")", getArg( "filter-axfr" ) ); 144 147 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << dn << ", filter: " << filter << endl ); 145 148 m_msgid = m_pldap->search( dn, LDAP_SCOPE_SUBTREE, filter, (const char**) ldap_attrany ); … … 212 215 attributes = attronly; 213 216 } 217 218 filter = strbind( ":target:", filter, getArg( "filter-lookup" ) ); 214 219 215 220 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); … … 256 261 } 257 262 263 filter = strbind( ":target:", filter, getArg( "filter-lookup" ) ); 264 258 265 DLOG( L << Logger::Debug << m_myname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl ); 259 266 m_msgid = m_pldap->search( getArg( "basedn" ), LDAP_SCOPE_SUBTREE, filter, (const char**) attributes ); … … 271 278 272 279 273 qesc = toLower( qname);280 qesc = toLower( m_pldap->escape( qname ) ); 274 281 filter = "(associatedDomain=" + qesc + ")"; 275 282 … … 281 288 attributes = attronly; 282 289 } 290 291 filter = strbind( ":target:", filter, getArg( "filter-lookup" ) ); 283 292 284 293 stringtok( parts, qesc, "." ); … … 489 498 declare( suffix, "secret", "User password for non anonymous binds", "" ); 490 499 declare( suffix, "method", "How to search entries (simple, strict or tree)", "simple" ); 500 declare( suffix, "filter-axfr", "LDAP filter for limiting AXFR results", ":target:" ); 501 declare( suffix, "filter-lookup", "LDAP filter for limiting IP or name lookups", ":target:" ); 491 502 declare( suffix, "disable-ptrrecord", "Depricated, use ldap-method=strict instead", "no" ); 492 503 } -
trunk/pdns/pdns/docs/pdns.sgml
r445 r448 84 84 <sect2 id="changelog-2-9-18"><title>Version 2.9.18</title> 85 85 <para> 86 Released on the 1 4th of July 2005.86 Released on the 16th of July 2005. 87 87 </para> 88 88 <para> … … 92 92 </para> 93 93 <para> 94 This release brings a number of new features ,95 but also has a new build dependency, the <ulink url="http://www.boost.org">Boost library</ulink> .94 This release brings a number of new features (vastly improved recursor, Generic Oracle Support, DNS analysis and replay tools, and more) 95 but also has a new build dependency, the <ulink url="http://www.boost.org">Boost library</ulink> (version 1.31 or higher). 96 96 </para> 97 97 <para> … … 108 108 </para> 109 109 <para> 110 Additionally, the bind2backend is almost ready to replace the stock bind backend. If you run with Bind zones, you are cordially invited 111 to substitute 'launch=bind2' for 'launch=bind'. This will happen automatically in 2.9.19! 112 </para> 113 <para> 110 114 In other news, the entire Wikipedia constellation now runs on PowerDNS using the Geo Backend! Thanks to Mark Bergsma 111 115 for keeping us updated. 112 116 </para> 113 117 <para> 114 General bugs fixed: 118 There are two bugs with security implications, which only apply to installations running with the LDAP backend, or installations providing recursion 119 to a limited range of IP addresses. If any of these apply to you, an upgrade is highly advised: 115 120 <itemizedlist> 116 121 <listitem> 117 122 <para> 118 TCP authoritative server would not relaunch a backend after failure (reported by Norbert Sendetzky) 119 </para> 120 </listitem> 121 <listitem> 122 <para> 123 Fix backend restarting logic (reported, and fix suggested by Norbert Sendetzky) 124 </para> 125 </listitem> 126 <listitem> 127 <para> 128 Launching identical backends multiple times, with different settings, did not work. Reported by Mario Manno. 123 The LDAP backend did not properly escape all queries, allowing it to fail and not answer questions. We have not investigated further risks involved, 124 but we advise LDAP users to update as quickly as possible (Norbert Sendetzky, Jan de Groot) 129 125 </para> 130 126 </listitem> … … 136 132 </para> 137 133 </listitem> 134 </itemizedlist> 135 </para> 136 <para> 137 General bugs fixed: 138 <itemizedlist> 139 <listitem> 140 <para> 141 TCP authoritative server would not relaunch a backend after failure (reported by Norbert Sendetzky) 142 </para> 143 </listitem> 144 <listitem> 145 <para> 146 Fix backend restarting logic (reported, and fix suggested by Norbert Sendetzky) 147 </para> 148 </listitem> 149 <listitem> 150 <para> 151 Launching identical backends multiple times, with different settings, did not work. Reported by Mario Manno. 152 </para> 153 </listitem> 154 138 155 <listitem> 139 156 <para> … … 338 355 </para> 339 356 </listitem> 340 341 357 <listitem> 342 358 <para> … … 4077 4093 <sect1 id="security-policy"><title>Security</title> 4078 4094 <para> 4079 As of the 5th of February 2005, no actual security problems with PowerDNS 2.9.17or later are known about. This page4095 As of the 16th of July 2005, no actual security problems with PowerDNS 2.9.18 or later are known about. This page 4080 4096 will be updated with all bugs which are deemed to be security problems, or could conceivably lead to those. Any such notifications 4081 will also be sent to all PowerDNS mailinglists and BUGTRAQ. 4097 will also be sent to all PowerDNS mailinglists. 4098 </para> 4099 <para> 4100 All versions of PowerDNS before 2.9.18 contain the following two bugs, which only apply to installations running with the LDAP backend, or installations providing recursion 4101 to a limited range of IP addresses. If any of these apply to you, an upgrade is highly advised: 4102 <itemizedlist> 4103 <listitem> 4104 <para> 4105 The LDAP backend did not properly escape all queries, allowing it to fail and not answer questions. We have not investigated further risks involved, 4106 but we advise LDAP users to update as quickly as possible (Norbert Sendetzky, Jan de Groot) 4107 </para> 4108 </listitem> 4109 <listitem> 4110 <para> 4111 Questions from clients denied recursion could blank out answers to clients who are allowed recursion services, temporarily. Reported by Wilco Baan. 4112 This would've made it possible for outsiders to blank out a domain temporarily to your users. Luckily PowerDNS would send out SERVFAIL or Refused, and 4113 not a denial of a domain's existence. 4114 </para> 4115 </listitem> 4116 </itemizedlist> 4082 4117 </para> 4083 4118 <para> … … 5376 5411 POSIX get/set/swapcontext functions. Bug your favorite FreeBSD kernel or libc maintainer for a fix, 5377 5412 or ask him to port MTasker (see below) to your operating system. It may work on recent 4.x systems, 5378 let us know!5413 let us know! 5379 5414 </para></listitem> 5380 5415 <listitem><para> … … 6828 6863 </chapter> 6829 6864 <chapter id="analysis"><title>Tools to analyse DNS traffic</title> 6830 <para>6831 DNS is highly mission critical, it is therefore necessary to be able to study and compare DNS traffic. Since 2.9.18, PowerDNS comes6832 with three tools to aid in analysis:6833 <variablelist>6834 <varlistentry>6835 <term>dnsreplay pcapfile [ipaddress] [port number]</term>6836 <listitem>6837 6865 <para> 6838 This program takes recorded questions and answers and replays them to a specified nameserver and reporting afterwards 6839 which percentage of answers matched, were worse or better. 6840 </para> 6841 </listitem> 6842 </varlistentry> 6843 <varlistentry> 6844 <term>dnswasher pcapfile output</term> 6845 <listitem> 6846 <para> 6847 Anonymises recorded traffic, making sure it only contains DNS, and that the originating IP addresses of queries are stripped, which may 6848 allow you to send traces to our company or mailing list without violating obligations towards your customers or privacy laws. 6849 </para> 6850 </listitem> 6851 </varlistentry> 6852 <varlistentry> 6853 <term>dnsscope pcapfile</term> 6854 <listitem> 6855 <para> 6856 Calculates statistics without replaying traffic 6857 </para> 6858 </listitem> 6859 </varlistentry> 6860 </variablelist> 6866 DNS is highly mission critical, it is therefore necessary to be able to study and compare DNS traffic. Since 2.9.18, PowerDNS comes 6867 with three tools to aid in analysis: 6868 <warning> 6869 <para> 6870 As of 2.9.18 these tools are somewhat rough - they have no help messages for example. They do work though. 6871 </para> 6872 </warning> 6873 <variablelist> 6874 <varlistentry> 6875 <term>dnsreplay pcapfile [ipaddress] [port number]</term> 6876 <listitem> 6877 <para> 6878 This program takes recorded questions and answers and replays them to a specified nameserver and reporting afterwards 6879 which percentage of answers matched, were worse or better. 6880 </para> 6881 </listitem> 6882 </varlistentry> 6883 <varlistentry> 6884 <term>dnswasher pcapfile output</term> 6885 <listitem> 6886 <para> 6887 Anonymises recorded traffic, making sure it only contains DNS, and that the originating IP addresses of queries are stripped, which may 6888 allow you to send traces to our company or mailing list without violating obligations towards your customers or privacy laws. 6889 </para> 6890 </listitem> 6891 </varlistentry> 6892 <varlistentry> 6893 <term>dnsscope pcapfile</term> 6894 <listitem> 6895 <para> 6896 Calculates statistics without replaying traffic 6897 </para> 6898 </listitem> 6899 </varlistentry> 6900 </variablelist> 6861 6901 </para> 6862 6902 </chapter> … … 8823 8863 <sect1 id="ldap"><Title>LDAP backend</title> 8824 8864 <para> 8865 <warning> 8866 <para> 8867 This documentation has moved to <ulink url="http://wiki.linuxnetworks.de/index.php/PowerDNS_ldapbackend">its own page</ulink>. The information in this chapter 8868 may be outdated! 8869 </para> 8870 </warning> 8871 <para> 8825 8872 The main author for this module is Norbert Sendetzky who also has his own <ulink url="http://www.linuxnetworks.de/pdnsldap/index.html">PowerDNS-LDAP page</ulink>. 8873 </para> 8874 <para> 8875 He also maintains the <ulink url="http://wiki.linuxnetworks.de/index.php/PowerDNS_ldapbackend">LDAP backends documentation</ulink> there. The information 8876 below may be outdated! 8826 8877 </para> 8827 8878 <para>