From 6fde03bcfb6868662c71b3b4776496aae24dea24 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Wed, 30 Apr 2025 15:17:34 +0200 Subject: [PATCH] Move ldap_attrany[] definition from a header file to its only user. --- modules/ldapbackend/ldapbackend.hh | 60 ------------------------------ modules/ldapbackend/native.cc | 60 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 60 deletions(-) diff --git a/modules/ldapbackend/ldapbackend.hh b/modules/ldapbackend/ldapbackend.hh index a64a673fbb..970d4019b6 100644 --- a/modules/ldapbackend/ldapbackend.hh +++ b/modules/ldapbackend/ldapbackend.hh @@ -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; diff --git a/modules/ldapbackend/native.cc b/modules/ldapbackend/native.cc index de0e91d7d5..427083105b 100644 --- a/modules/ldapbackend/native.cc +++ b/modules/ldapbackend/native.cc @@ -24,6 +24,66 @@ #include "ldapbackend.hh" #include +/* + * 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 { -- 2.47.2