]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move ldap_attrany[] definition from a header file to its only user. 15513/head
authorMiod Vallat <miod.vallat@powerdns.com>
Wed, 30 Apr 2025 13:17:34 +0000 (15:17 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Wed, 30 Apr 2025 14:22:21 +0000 (16:22 +0200)
modules/ldapbackend/ldapbackend.hh
modules/ldapbackend/native.cc

index a64a673fbbb2a2809c17e8eb6e4ce29d6b8d776c..970d4019b6e1ae783bbd4e663a25f2146d04dbdc 100644 (file)
@@ -46,66 +46,6 @@ using std::vector;
 
 class LdapAuthenticator;
 
-/*
- *  Known DNS RR types
- *  Types which aren't active are currently not supported by PDNS
- */
-
-__attribute__((unused)) static const char* ldap_attrany[] = {
-  "associatedDomain",
-  "dNSTTL",
-  "ALIASRecord",
-  "aRecord",
-  "nSRecord",
-  "cNAMERecord",
-  "sOARecord",
-  "pTRRecord",
-  "hInfoRecord",
-  "mXRecord",
-  "tXTRecord",
-  "rPRecord",
-  "aFSDBRecord",
-  //  "SigRecord",
-  "KeyRecord",
-  //  "gPosRecord",
-  "aAAARecord",
-  "lOCRecord",
-  "sRVRecord",
-  "nAPTRRecord",
-  "kXRecord",
-  "certRecord",
-  //  "a6Record",
-  "dNameRecord",
-  //  "aPLRecord",
-  "dSRecord",
-  "sSHFPRecord",
-  "iPSecKeyRecord",
-  "rRSIGRecord",
-  "nSECRecord",
-  "dNSKeyRecord",
-  "dHCIDRecord",
-  "nSEC3Record",
-  "nSEC3PARAMRecord",
-  "tLSARecord",
-  "cDSRecord",
-  "cDNSKeyRecord",
-  "openPGPKeyRecord",
-  "SVCBRecord",
-  "HTTPSRecord",
-  "sPFRecord",
-  "EUI48Record",
-  "EUI64Record",
-  "tKeyRecord",
-  "uRIRecord",
-  "cAARecord",
-  "TYPE65226Record",
-  "TYPE65534Record",
-  "modifyTimestamp",
-  "PdnsRecordTTL",
-  "PdnsRecordAuth",
-  "PdnsRecordOrdername",
-  NULL};
-
 class LdapBackend : public DNSBackend
 {
   string d_myname;
index de0e91d7d5ec6a57d2192cdc7175843ae463172f..427083105bb40d00195f634b6f4307cfd65db3a5 100644 (file)
 #include "ldapbackend.hh"
 #include <cstdlib>
 
+/*
+ *  Known DNS RR types
+ *  Types which aren't active are currently not supported by PDNS
+ */
+
+static const char* ldap_attrany[] = { // NOLINT(cppcoreguidelines-avoid-c-arrays,modernize-avoid-c-arrays)
+  "associatedDomain", // needs to be first, code below depends on this
+  "dNSTTL",
+  "ALIASRecord",
+  "aRecord",
+  "nSRecord",
+  "cNAMERecord",
+  "sOARecord",
+  "pTRRecord",
+  "hInfoRecord",
+  "mXRecord",
+  "tXTRecord",
+  "rPRecord",
+  "aFSDBRecord",
+  //  "SigRecord",
+  "KeyRecord",
+  //  "gPosRecord",
+  "aAAARecord",
+  "lOCRecord",
+  "sRVRecord",
+  "nAPTRRecord",
+  "kXRecord",
+  "certRecord",
+  //  "a6Record",
+  "dNameRecord",
+  //  "aPLRecord",
+  "dSRecord",
+  "sSHFPRecord",
+  "iPSecKeyRecord",
+  "rRSIGRecord",
+  "nSECRecord",
+  "dNSKeyRecord",
+  "dHCIDRecord",
+  "nSEC3Record",
+  "nSEC3PARAMRecord",
+  "tLSARecord",
+  "cDSRecord",
+  "cDNSKeyRecord",
+  "openPGPKeyRecord",
+  "SVCBRecord",
+  "HTTPSRecord",
+  "sPFRecord",
+  "EUI48Record",
+  "EUI64Record",
+  "tKeyRecord",
+  "uRIRecord",
+  "cAARecord",
+  "TYPE65226Record",
+  "TYPE65534Record",
+  "modifyTimestamp",
+  "PdnsRecordTTL",
+  "PdnsRecordAuth",
+  "PdnsRecordOrdername",
+  nullptr};
+
 bool LdapBackend::list(const ZoneName& target, int domain_id, bool /* include_disabled */)
 {
   try {