]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Be more strict on conditional compiling (#ifdef ENABLE_GSS_TSIG), fixing non ENABLE_G...
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 3 Jan 2022 14:28:24 +0000 (15:28 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 2 Sep 2022 12:22:48 +0000 (14:22 +0200)
pdns/distributor.hh
pdns/dnspacket.cc
pdns/dnspacket.hh
pdns/gss_context.cc
pdns/gss_context.hh
pdns/packethandler.cc
pdns/packethandler.hh
pdns/rfc2136handler.cc
pdns/tcpreceiver.cc
pdns/tkey.cc

index a3dd1d08ce030ca9da4beddd6213a73ceef3e983..92b96b36ee9dae128dbc507e8b13b21448ba7ddf 100644 (file)
@@ -20,6 +20,9 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 #pragma once
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 #include <string>
 #include <deque>
 #include <queue>
@@ -245,7 +248,9 @@ retry:
       }
 
       QD->callback(a, QD->start);
+#ifdef ENABLE_GSS_TSIG
       QD->Q.cleanupGSS(a->d.rcode);
+#endif
       QD.reset();
     }
 
@@ -307,8 +312,9 @@ retry:
     }
   }
   callback(a, start);
+#ifdef ENABLE_GSS_TSIG
   q.cleanupGSS(a->d.rcode);
-
+#endif
   return 0;
 }
 
index b58e1f1ca6401fb12b98021efbea7a7974ba9995..aa43d337e1744668384976d36803b1987e062494 100644 (file)
@@ -760,6 +760,7 @@ const DNSName& DNSPacket::getTSIGKeyname() const {
   return d_tsigkeyname;
 }
 
+#ifdef ENABLE_GSS_TSIG
 void DNSPacket::cleanupGSS(int rcode)
 {
   if (rcode != RCode::NoError && d_tsig_algo == TSIG_GSS && !getTSIGKeyname().empty()) {
@@ -767,4 +768,5 @@ void DNSPacket::cleanupGSS(int rcode)
     ctx.destroy();
   }
 }
+#endif
+
index 02838b099b139da5ae50447de18c81f8eecfdf65..283fd90f84521bf72a6d309491f44cecd0c01ce0 100644 (file)
@@ -172,7 +172,10 @@ public:
   static bool s_doEDNSSubnetProcessing;
   static bool s_doEDNSCookieProcessing;
   static string s_EDNSCookieKey;
+
+#ifdef ENABLE_GSS_TSIG
   void cleanupGSS(int rcode);
+#endif
 
 private:
   void pasteQ(const char *question, int length); //!< set the question of this packet, useful for crafting replies
index ec6bdd7279e30656d4600f5eb75b28cad151c04f..17cc3b59a1c5f07517de17318d827850346ee692 100644 (file)
@@ -21,8 +21,6 @@
  */
 
 #include "gss_context.hh"
-
-#include "lock.hh"
 #include "logger.hh"
 
 #ifndef ENABLE_GSS_TSIG
@@ -50,6 +48,10 @@ GssContextError GssContext::getError() { return GSS_CONTEXT_UNSUPPORTED; }
 
 #else
 
+#include <unordered_map>
+
+#include "lock.hh"
+
 class GssCredential : boost::noncopyable
 {
 public:
index d75e211f2e8f894470aac1c87754eb01df49c150..7f3a36bc6cf333bbdf8e6f00639a67ace1b4613d 100644 (file)
  */
 #pragma once
 
+
+#ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
 
 #include "namespaces.hh"
 #include "pdnsexception.hh"
@@ -30,7 +33,6 @@
 #ifdef ENABLE_GSS_TSIG
 #include <gssapi/gssapi.h>
 #include <gssapi/gssapi_krb5.h>
-#include <gssapi/gssapi_ext.h>
 #endif
 
 //! Generic errors
index 0ef5e39c7bd8f76c9ab1afb5f51face5e0331b13..fdde319cb49d65614811a823ff69ffc2acbc3948 100644 (file)
@@ -46,6 +46,7 @@
 #include "version.hh"
 #include "auth-main.hh"
 #include "trusted-notification-proxy.hh"
+#include "gss_context.hh"
 
 #if 0
 #undef DLOG
index 91faa7d344fae36677a5855488ef7da09b677ee3..3bd0511fc317400e6c13db7e9fd6c7ce8e8dab39 100644 (file)
@@ -28,7 +28,6 @@
 #include "packetcache.hh"
 #include "dnsseckeeper.hh"
 #include "lua-auth4.hh"
-#include "gss_context.hh"
 
 #include "namespaces.hh"
 
index ba4a919157f569c88fd887b5fb0935c651e380f6..39b3a8cb41c80a8434c734fa3299cfeee95a54a9 100644 (file)
@@ -18,6 +18,7 @@
 #include "backends/gsql/ssql.hh"
 #include "communicator.hh"
 #include "query-local-address.hh"
+#include "gss_context.hh"
 
 extern StatBag S;
 extern CommunicatorClass Communicator;
index e35960f505d12f0121cb6e94ecd26837374721ca..88d1be86c0eb08eccb0139f779120b1b5c6da8a4 100644 (file)
@@ -409,7 +409,9 @@ void TCPNameserver::doConnection(int fd)
         break;
 
       sendPacket(reply, fd);
+#ifdef ENABLE_GSS_TSIG
       packet->cleanupGSS(reply->d.rcode);
+#endif
     }
   }
   catch(PDNSException &ae) {
index 0186e7c0a008648b2ed9bf6ac458f47bb30dbc91..fe94438eeb4f9fd3185040537e36fb8d43554c02 100644 (file)
@@ -2,6 +2,7 @@
 #include "config.h"
 #endif
 #include "packethandler.hh"
+#include "gss_context.hh"
 
 void PacketHandler::tkeyHandler(const DNSPacket& p, std::unique_ptr<DNSPacket>& r) {
 #if 0