]> granicus.if.org Git - pdns/commitdiff
auth: add support for MB and MG RR types
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 22 Mar 2018 01:29:34 +0000 (02:29 +0100)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Mon, 26 Mar 2018 09:58:32 +0000 (11:58 +0200)
16 files changed:
docs/upgrading.rst
modules/ldapbackend/dnsdomain2.schema
modules/ldapbackend/ldapbackend.hh
pdns/dnsrecords.cc
pdns/dnsrecords.hh
pdns/qtype.hh
regression-tests/tests/basic-mb-resolution/command [new file with mode: 0755]
regression-tests/tests/basic-mb-resolution/description [new file with mode: 0644]
regression-tests/tests/basic-mb-resolution/expected_result [new file with mode: 0644]
regression-tests/tests/basic-mg-resolution/command [new file with mode: 0755]
regression-tests/tests/basic-mg-resolution/description [new file with mode: 0644]
regression-tests/tests/basic-mg-resolution/expected_result [new file with mode: 0644]
regression-tests/tests/basic-mr-resolution/command [new file with mode: 0755]
regression-tests/tests/basic-mr-resolution/description [new file with mode: 0644]
regression-tests/tests/basic-mr-resolution/expected_result [new file with mode: 0644]
regression-tests/zones/example.com

index a9ae0de6cf789079baae3de53d423e5799f7a884..fe332108dfbde299b8eea4ca1dd43bee4c484836 100644 (file)
@@ -8,6 +8,17 @@ Please upgrade to the PowerDNS Authoritative Server 4.0.0 from 3.4.2+.
 See the `3.X <https://doc.powerdns.com/3/authoritative/upgrading/>`__
 upgrade notes if your version is older than 3.4.2.
 
+4.1.X to 4.2.0
+--------------
+
+- *Your LDAP schema might need to be updated*, because new record types
+  have been added (see below).
+- The :doc:`LDAP Backend <backends/ldap>` now supports additional Record types
+
+  - MB
+  - MG
+  - MR
+
 4.1.0 to 4.1.1
 --------------
 
index 2c88c341bb8ad8b273f1c570014670fdf57daaf6..2a2812ea3fa39acf612e5aff37b71b41a0a13fb5 100644 (file)
@@ -14,6 +14,24 @@ attributetype ( 1.3.6.1.4.1.2428.20.0.1 NAME 'dNSClass'
        EQUALITY caseIgnoreIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
 
+attributetype ( 1.3.6.1.4.1.2428.20.1.7 NAME 'mBRecord'
+       DESC 'Location of a given domain e-mail address, RFC 1035'
+       EQUALITY caseIgnoreIA5Match
+       SUBSTR caseIgnoreIA5SubstringsMatch
+       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.8 NAME 'mGRecord'
+       DESC 'Defines mailbox names that are part of a mail group, RFC 1035'
+       EQUALITY caseIgnoreIA5Match
+       SUBSTR caseIgnoreIA5SubstringsMatch
+       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
+attributetype ( 1.3.6.1.4.1.2428.20.1.9 NAME 'mRRecord'
+       DESC 'Defines aliased mailbox, RFC 1035'
+       EQUALITY caseIgnoreIA5Match
+       SUBSTR caseIgnoreIA5SubstringsMatch
+       SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
+
 attributetype ( 1.3.6.1.4.1.2428.20.1.11 NAME 'wKSRecord'
        DESC 'a well known service description, RFC 1035'
        EQUALITY caseIgnoreIA5Match
@@ -279,5 +297,5 @@ objectclass ( 1.3.6.1.4.1.2428.20.2 NAME 'dNSDomain2'
                TLSARecord $ CDSRecord $ CDNSKEYRecord $ OPENPGPKEYRecord $
                SPFRecord $ EUI48Record $ EUI64Record $ TKEYRecord $
                URIRecord $ CAARecord $ DLVRecord $ TYPE65226Record $
-               TYPE65534Record
+               TYPE65534Record $ MBRecord $ MGRecord $ MRRecord
        ) )
index d836ce8a9c13cea02b38a83309dd8bf10e7b433d..0eed3b8d0db4350e294d8acefc52c5e518d208bb 100644 (file)
@@ -59,6 +59,10 @@ static const char* ldap_attrany[] = {
   "nSRecord",
   "cNAMERecord",
   "sOARecord",
+  "mBRecord",
+  "mGRecord",
+  "mRRecord",
+  "mInfoRecord",
   "pTRRecord",
   "hInfoRecord",
   "mXRecord",
index 39e662a56f36fdd92580d128c7d884e2d0179ecc..6ee780f21a38fea2c2de3fc4ccb73c0eecd4ff66 100644 (file)
@@ -139,6 +139,8 @@ boilerplate_conv(PTR, QType::PTR, conv.xfrName(d_content, true));
 boilerplate_conv(CNAME, QType::CNAME, conv.xfrName(d_content, true));
 boilerplate_conv(ALIAS, QType::ALIAS, conv.xfrName(d_content, false));
 boilerplate_conv(DNAME, QType::DNAME, conv.xfrName(d_content));
+boilerplate_conv(MB, QType::MB, conv.xfrName(d_madname, true));
+boilerplate_conv(MG, QType::MG, conv.xfrName(d_mgmname, true));
 boilerplate_conv(MR, QType::MR, conv.xfrName(d_alias, true));
 boilerplate_conv(MINFO, QType::MINFO, conv.xfrName(d_rmailbx, true); conv.xfrName(d_emailbx, true));
 boilerplate_conv(TXT, QType::TXT, conv.xfrText(d_text, true));
@@ -589,6 +591,9 @@ void reportBasicTypes()
 
 void reportOtherTypes()
 {
+   MBRecordContent::report();
+   MGRecordContent::report();
+   MRRecordContent::report();
    AFSDBRecordContent::report();
    DNAMERecordContent::report();
    ALIASRecordContent::report();
index 42204280bb687e0bf87be3ac97e61b2824bb946b..d402227f3c17a469bd364fdcf5dddb2a33076cc8 100644 (file)
@@ -256,6 +256,24 @@ public:
 };
 
 
+class MBRecordContent : public DNSRecordContent
+{
+public:
+  includeboilerplate(MB)
+
+private:
+  DNSName d_madname;
+};
+
+class MGRecordContent : public DNSRecordContent
+{
+public:
+  includeboilerplate(MG)
+
+private:
+  DNSName d_mgmname;
+};
+
 class MRRecordContent : public DNSRecordContent
 {
 public:
index 5d3577fcfda5ebe33771ce83f61c2f1740c8a0f5..8c5b162c3506011153bab01f64aa83f819cb79e3 100644 (file)
@@ -76,6 +76,8 @@ public:
     NS=2,
     CNAME=5,
     SOA=6,
+    MB=7,
+    MG=8,
     MR=9,
     WKS=11,
     PTR=12,
@@ -169,6 +171,8 @@ private:
       qtype_insert("NS", 2);
       qtype_insert("CNAME", 5);
       qtype_insert("SOA", 6);
+      qtype_insert("MB", 7);
+      qtype_insert("MG", 8);
       qtype_insert("MR", 9);
       qtype_insert("PTR", 12);
       qtype_insert("HINFO", 13);
diff --git a/regression-tests/tests/basic-mb-resolution/command b/regression-tests/tests/basic-mb-resolution/command
new file mode 100755 (executable)
index 0000000..80e122b
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig phil.mb.example.com MB
diff --git a/regression-tests/tests/basic-mb-resolution/description b/regression-tests/tests/basic-mb-resolution/description
new file mode 100644 (file)
index 0000000..8c8f1f4
--- /dev/null
@@ -0,0 +1,2 @@
+This test tries to resolve a straight MB record that is directly available in
+the database.
diff --git a/regression-tests/tests/basic-mb-resolution/expected_result b/regression-tests/tests/basic-mb-resolution/expected_result
new file mode 100644 (file)
index 0000000..35f6733
--- /dev/null
@@ -0,0 +1,3 @@
+0      phil.mb.example.com.    IN      MB      120     pc.mb.example.com.
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='phil.mb.example.com.', qtype=MB
diff --git a/regression-tests/tests/basic-mg-resolution/command b/regression-tests/tests/basic-mg-resolution/command
new file mode 100755 (executable)
index 0000000..768b442
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig hostmaster.mb.example.com MG
diff --git a/regression-tests/tests/basic-mg-resolution/description b/regression-tests/tests/basic-mg-resolution/description
new file mode 100644 (file)
index 0000000..48e7904
--- /dev/null
@@ -0,0 +1,2 @@
+This test tries to resolve a straight MG record that is directly available in
+the database.
diff --git a/regression-tests/tests/basic-mg-resolution/expected_result b/regression-tests/tests/basic-mg-resolution/expected_result
new file mode 100644 (file)
index 0000000..0fc0b59
--- /dev/null
@@ -0,0 +1,4 @@
+0      hostmaster.mb.example.com.      IN      MG      120     phil.mb.example.com.
+0      hostmaster.mb.example.com.      IN      MG      120     sheila.mb.example.com.
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='hostmaster.mb.example.com.', qtype=MG
diff --git a/regression-tests/tests/basic-mr-resolution/command b/regression-tests/tests/basic-mr-resolution/command
new file mode 100755 (executable)
index 0000000..8b31474
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+cleandig philip.mb.example.com MR
diff --git a/regression-tests/tests/basic-mr-resolution/description b/regression-tests/tests/basic-mr-resolution/description
new file mode 100644 (file)
index 0000000..b546dcb
--- /dev/null
@@ -0,0 +1,2 @@
+This test tries to resolve a straight MR record that is directly available in
+the database.
diff --git a/regression-tests/tests/basic-mr-resolution/expected_result b/regression-tests/tests/basic-mr-resolution/expected_result
new file mode 100644 (file)
index 0000000..b0b3b9c
--- /dev/null
@@ -0,0 +1,3 @@
+0      philip.mb.example.com.  IN      MR      120     phil.mb.example.com.
+Rcode: 0 (No Error), RD: 0, QR: 1, TC: 0, AA: 1, opcode: 0
+Reply to question for qname='philip.mb.example.com.', qtype=MR
index c73d392e6c903d0f3b1b9b9f5fa01a72f3df86fc..a7667c9ad2be372ffba79dbaa9d0df8340f4b4c1 100644 (file)
@@ -20193,3 +20193,9 @@ rhs-at-expansion        IN   CNAME      @
 google-alias           IN      ALIAS   google-public-dns-a.google.com.
 ;
 host-for-auto-ptr      IN      A 192.0.2.1
+;
+phil.mb            IN      MB      pc.mb.example.com.
+sheila.mb          IN      MB      bill.mb.example.com.
+hostmaster.mb      IN      MG      phil.mb.example.com.
+                   IN      MG      sheila.mb.example.com.
+philip.mb          IN      MR      phil.mb.example.com.