]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
added DNAME support to DLZ LDAP schema, and fixed a DLZ compile error
authorEvan Hunt <each@isc.org>
Sun, 10 Feb 2019 19:49:01 +0000 (11:49 -0800)
committerEvan Hunt <each@isc.org>
Sun, 10 Feb 2019 22:09:29 +0000 (14:09 -0800)
Thanks to Roland Gruber for the schema contribution.

(cherry picked from commit 2e3b5db195baf6edfd2fb83094c2a603a28cec70)

CHANGES
contrib/dlz/modules/common/dlz_dbi.c
contrib/dlz/modules/ldap/testing/dlz.schema
contrib/dlz/modules/ldap/testing/example.ldif

diff --git a/CHANGES b/CHANGES
index 549ecac3f262b5d915d801013b320b3cca47ce50..9a8def0adbd1336b3fdb59442d5af34a72309dac 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+5160.  [contrib]       Added DNAME support to the DLZ LDAP schema. Also
+                       fixed a compilation bug affecting several DLZ
+                       modules. [GL #872]
+
 5159.  [bug]           dnssec-coverage was incorrectly ignoring
                        names specified on the command line without
                        trailing dots. [GL !1478]
index 0c742b59c382d7ce91bfa8933e7f7a308cbbd248..9e7a1c0db3b0c590e0668f2a9c28a41b84e691d9 100644 (file)
@@ -100,6 +100,7 @@ build_querylist(const char *query_str, char **zone, char **record,
        bool foundclient = false;
        char *temp_str = NULL;
        char *right_str = NULL;
+       char *token = NULL;
        query_list_t *tql;
        query_segment_t *tseg = NULL;
 
index 2580f1a5450ef6ded7ac1667bcdd89e8539afc3c..d0f00861d50c8f52975be357eb39a59756e12eed 100644 (file)
 # 1.3.6.1.4.1.18420.1.1.X is reserved for attribute types declared by the DLZ project.
 # 1.3.6.1.4.1.18420.1.2.X is reserved for object classes declared by the DLZ project.
 # 1.3.6.1.4.1.18420.1.3.X is reserved for PRIVATE extensions to the DLZ attribute
-#                     types and object classes that may be needed by end users
-#                     to add security, etc.  Attributes and object classes using
-#                     this OID MUST NOT be published outside of an organization
-#                     except to offer them for consideration to become part of the
-#                     standard attributes and object classes published by the DLZ project.
+# types and object classes that may be needed by end users
+# to add security, etc.  Attributes and object classes using
+# this OID MUST NOT be published outside of an organization
+# except to offer them for consideration to become part of the
+# standard attributes and object classes published by the DLZ project.
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.10
-        NAME 'dlzZoneName'
-        DESC 'DNS zone name - domain name not including host name'
-        SUP name 
-        SINGLE-VALUE )
-        
+       NAME 'dlzZoneName'
+       DESC 'DNS zone name - domain name not including host name'
+       SUP name
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.20
        NAME 'dlzHostName'
-        DESC 'Host portion of a domain name'
+       DESC 'Host portion of a domain name'
        SUP name
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.30
-        NAME 'dlzData'
-        DESC 'Data for the resource record'
-        SUP name
-        SINGLE-VALUE )       
-        
+       NAME 'dlzData'
+       DESC 'Data for the resource record'
+       SUP name
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.40
        NAME 'dlzType'
-        DESC 'DNS record type - A, SOA, NS, MX, etc...'
-        SUP name
-        SINGLE-VALUE )
+       DESC 'DNS record type - A, SOA, NS, MX, etc...'
+       SUP name
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.50
        NAME 'dlzSerial'
-        DESC 'SOA record serial number'
-        EQUALITY integerMatch
-        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
+       DESC 'SOA record serial number'
+       EQUALITY integerMatch
+       SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.60
        NAME 'dlzRefresh'
-        DESC 'SOA record refresh time in seconds'
-        EQUALITY integerMatch        
+       DESC 'SOA record refresh time in seconds'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.70
        NAME 'dlzRetry'
-        DESC 'SOA retry time in seconds'
-        EQUALITY integerMatch        
+       DESC 'SOA retry time in seconds'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.80
        NAME 'dlzExpire'
-        DESC 'SOA expire time in seconds'
-        EQUALITY integerMatch        
+       DESC 'SOA expire time in seconds'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.90
        NAME 'dlzMinimum'
-        DESC 'SOA minimum time in seconds'
-        EQUALITY integerMatch        
+       DESC 'SOA minimum time in seconds'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.100
-        NAME 'dlzAdminEmail'
-        DESC 'E-mail address of person responsible for this zone - @ should be replaced with . (period)'
+       NAME 'dlzAdminEmail'
+       DESC 'E-mail address of person responsible for this zone - @ should be replaced with . (period)'
        SUP name
-        SINGLE-VALUE )
+       SINGLE-VALUE )
 
 attributetype ( 1.3.6.1.4.1.18420.1.1.110
        NAME 'dlzPrimaryNS'
-        DESC 'Primary name server for this zone - should be host name not IP address'
+       DESC 'Primary name server for this zone - should be host name not IP address'
        SUP name
-        SINGLE-VALUE )
-        
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.120
        NAME 'dlzIPAddr'
-        DESC 'IP address - IPV4 should be in dot notation xxx.xxx.xxx.xxx IPV6 should be in colon notation xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
-       EQUALITY caseExactIA5Match 
+       DESC 'IP address - IPV4 should be in dot notation xxx.xxx.xxx.xxx IPV6 should be in colon notation xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx'
+       EQUALITY caseExactIA5Match
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{40}
        SINGLE-VALUE )
-        
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.130
        NAME 'dlzCName'
-        DESC 'DNS cname'
+       DESC 'DNS cname'
        SUP name
-        SINGLE-VALUE )
-        
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.140
        NAME 'dlzPreference'
-        DESC 'DNS MX record preference.  Lower numbers have higher preference'
-        EQUALITY integerMatch        
+       DESC 'DNS MX record preference.  Lower numbers have higher preference'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
-        
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.150
        NAME 'dlzTTL'
-        DESC 'DNS time to live - how long this record can be cached by caching DNS servers'
-        EQUALITY integerMatch        
+       DESC 'DNS time to live - how long this record can be cached by caching DNS servers'
+       EQUALITY integerMatch
        SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
-        SINGLE-VALUE )
-        
+       SINGLE-VALUE )
+
 attributetype ( 1.3.6.1.4.1.18420.1.1.160
        NAME 'dlzRecordID'
        DESC 'Unique ID for each DLZ resource record'
@@ -118,70 +118,75 @@ attributetype ( 1.3.6.1.4.1.18420.1.1.160
 #------------------------------------------------------------------------------
 
 objectclass ( 1.3.6.1.4.1.18420.1.2.10
-       NAME 'dlzZone'         
-        DESC 'Zone name portion of a domain name'
-        SUP top STRUCTURAL
+       NAME 'dlzZone'
+       DESC 'Zone name portion of a domain name'
+       SUP top STRUCTURAL
        MUST ( objectclass $ dlzZoneName ) )
-        
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.20
-       NAME 'dlzHost' 
-        DESC 'Host name portion of a domain name'
-        SUP top STRUCTURAL
+       NAME 'dlzHost'
+       DESC 'Host name portion of a domain name'
+       SUP top STRUCTURAL
        MUST ( objectclass $ dlzHostName ) MAY ( description ) )
-        
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.30
-       NAME 'dlzAbstractRecord' 
-        DESC 'Data common to all DNS record types'
-        SUP top ABSTRACT
+       NAME 'dlzAbstractRecord'
+       DESC 'Data common to all DNS record types'
+       SUP top ABSTRACT
        MUST ( objectclass $ dlzRecordID $ dlzHostName $ dlzType $ dlzTTL ) MAY ( description ) )
-        
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.40
-       NAME 'dlzGenericRecord' 
-        DESC 'Generic DNS record - useful when a specific object class has not been defined for a DNS record'
-        SUP dlzAbstractRecord STRUCTURAL
+       NAME 'dlzGenericRecord'
+       DESC 'Generic DNS record - useful when a specific object class has not been defined for a DNS record'
+       SUP dlzAbstractRecord STRUCTURAL
        MUST ( dlzData ) )
-        
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.50
-        NAME 'dlzARecord'
-        DESC 'DNS A record'
-        SUP dlzAbstractrecord STRUCTURAL
-        MUST ( dlzIPAddr ) )
-        
+       NAME 'dlzARecord'
+       DESC 'DNS A record'
+       SUP dlzAbstractrecord STRUCTURAL
+       MUST ( dlzIPAddr ) )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.60
-        NAME 'dlzNSRecord'
-        DESC 'DNS NS record'
-        SUP dlzGenericRecord STRUCTURAL )
+       NAME 'dlzNSRecord'
+       DESC 'DNS NS record'
+       SUP dlzGenericRecord STRUCTURAL )
 
 objectclass ( 1.3.6.1.4.1.18420.1.2.70
-        NAME 'dlzMXRecord'
-        DESC 'DNS MX record'
-        SUP dlzGenericRecord STRUCTURAL
-        MUST ( dlzPreference ) )
-                
+       NAME 'dlzMXRecord'
+       DESC 'DNS MX record'
+       SUP dlzGenericRecord STRUCTURAL
+       MUST ( dlzPreference ) )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.80
-        NAME 'dlzSOARecord'
-        DESC 'DNS SOA record'
-        SUP dlzAbstractRecord STRUCTURAL       
-        MUST ( dlzSerial $ dlzRefresh $ dlzRetry
-               $ dlzExpire $ dlzMinimum $ dlzAdminEmail $ dlzPrimaryNS ) )
-               
+       NAME 'dlzSOARecord'
+       DESC 'DNS SOA record'
+       SUP dlzAbstractRecord STRUCTURAL
+       MUST ( dlzSerial $ dlzRefresh $ dlzRetry
+              $ dlzExpire $ dlzMinimum $ dlzAdminEmail $ dlzPrimaryNS ) )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.90
-       NAME 'dlzTextRecord' 
-        DESC 'Text data with spaces should be wrapped in double quotes'
-        SUP dlzGenericRecord STRUCTURAL )
-        
+       NAME 'dlzTextRecord'
+       DESC 'Text data with spaces should be wrapped in double quotes'
+       SUP dlzGenericRecord STRUCTURAL )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.100
-        NAME 'dlzPTRRecord'
-        DESC 'DNS PTR record'
-        SUP dlzGenericRecord STRUCTURAL )
-        
+       NAME 'dlzPTRRecord'
+       DESC 'DNS PTR record'
+       SUP dlzGenericRecord STRUCTURAL )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.110
-        NAME 'dlzCNameRecord'
-        DESC 'DNS CName record'
-        SUP dlzGenericRecord STRUCTURAL )
-        
+       NAME 'dlzCNameRecord'
+       DESC 'DNS CName record'
+       SUP dlzGenericRecord STRUCTURAL )
+
 objectclass ( 1.3.6.1.4.1.18420.1.2.120
-        NAME 'dlzXFR'
-        DESC 'Host allowed to perform zone transfer'
-        SUP top STRUCTURAL
-        MUST ( objectclass $ dlzRecordID $ dlzIPAddr ) )
+       NAME 'dlzXFR'
+       DESC 'Host allowed to perform zone transfer'
+       SUP top STRUCTURAL
+       MUST ( objectclass $ dlzRecordID $ dlzIPAddr ) )
+
+objectclass ( 1.3.6.1.4.1.18420.1.2.130
+       NAME 'dlzDNameRecord'
+       DESC 'DNS DName record'
+       SUP dlzGenericRecord STRUCTURAL )
index 8362b1e4725482528f3d9b857ab8cef03d6ac981..fff179348d0a123ed4fd23d91f637c321262fa40 100644 (file)
@@ -40,6 +40,14 @@ dn: dlzHostName=~,dlzZoneName=example.com,ou=dns,o=bind-dlz
 objectclass: dlzHost
 dlzHostName: ~
 
+dn: dlzHostName=cname,dlzZoneName=example.com,ou=dns,o=bind-dlz
+objectclass: dlzHost
+dlzHostName: cname
+
+dn: dlzHostName=dname,dlzZoneName=example.com,ou=dns,o=bind-dlz
+objectclass: dlzHost
+dlzHostName: dname
+
 dn: dlzRecordID=1,dlzHostName=@,dlzZoneName=example.com,ou=dns,o=bind-dlz
 objectclass: dlzGenericRecord
 dlzRecordID: 1
@@ -166,3 +174,19 @@ dn: dlzRecordID=15,dlzZoneName=example.com,ou=dns,o=bind-dlz
 objectclass: dlzXFR
 dlzRecordID: 15
 dlzIPAddr: 127.0.0.1
+
+dn: dlzRecordID=16,dlzHostName=cname,dlzZoneName=example.com,ou=dns,o=bind-dlz
+objectclass: dlzCNameRecord
+dlzRecordID: 16
+dlzHostName: cname
+dlzType: cname
+dlzData: www
+dlzTTL: 10
+
+dn: dlzRecordID=17,dlzHostName=dname,dlzZoneName=example.com,ou=dns,o=bind-dlz
+objectclass: dlzDNameRecord
+dlzRecordID: 17
+dlzHostName: dname
+dlzType: dname
+dlzData: example.net.
+dlzTTL: 10