summaryrefslogtreecommitdiff
path: root/cpp/src/qpid
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2011-10-12 15:54:07 +0000
committerAlan Conway <aconway@apache.org>2011-10-12 15:54:07 +0000
commitf821fb7fae3c74d8662e7783b255d52c785961f5 (patch)
treeec2a942f8ad27fcb5e72855b97796a0782768f2b /cpp/src/qpid
parent2508aed9e4bdc14ca883fde81ee01708dfa461e3 (diff)
downloadqpid-python-f821fb7fae3c74d8662e7783b255d52c785961f5.tar.gz
QPID-3544: ACL denials while replicating exclusive queues to a newly joined node.
Disabled ACL during cluster update process. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1182451 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid')
-rw-r--r--cpp/src/qpid/acl/AclPlugin.cpp2
-rw-r--r--cpp/src/qpid/cluster/Cluster.cpp6
-rw-r--r--cpp/src/qpid/cluster/Cluster.h2
3 files changed, 8 insertions, 2 deletions
diff --git a/cpp/src/qpid/acl/AclPlugin.cpp b/cpp/src/qpid/acl/AclPlugin.cpp
index e4d721ea44..d611797c49 100644
--- a/cpp/src/qpid/acl/AclPlugin.cpp
+++ b/cpp/src/qpid/acl/AclPlugin.cpp
@@ -69,7 +69,7 @@ struct AclPlugin : public Plugin {
}
acl = new Acl(values, b);
- b.setAcl(acl.get());
+ b.setAcl(acl.get());
b.addFinalizer(boost::bind(&AclPlugin::shutdown, this));
}
diff --git a/cpp/src/qpid/cluster/Cluster.cpp b/cpp/src/qpid/cluster/Cluster.cpp
index 7432fbbc33..e6e3de64f2 100644
--- a/cpp/src/qpid/cluster/Cluster.cpp
+++ b/cpp/src/qpid/cluster/Cluster.cpp
@@ -278,7 +278,8 @@ Cluster::Cluster(const ClusterSettings& set, broker::Broker& b) :
lastBroker(false),
updateRetracted(false),
updateClosed(false),
- error(*this)
+ error(*this),
+ acl(0)
{
broker.setInCluster(true);
@@ -856,6 +857,8 @@ void Cluster::updateOffer(const MemberId& updater, uint64_t updateeInt, Lock& l)
else if (updatee == self && url) {
assert(state == JOINER);
state = UPDATEE;
+ acl = broker.getAcl();
+ broker.setAcl(0); // Disable ACL during update
QPID_LOG(notice, *this << " receiving update from " << updater);
checkUpdateIn(l);
}
@@ -956,6 +959,7 @@ void Cluster::checkUpdateIn(Lock& l) {
// NB: don't updateMgmtMembership() here as we are not in the deliver
// thread. It will be updated on delivery of the "ready" we just mcast.
broker.setClusterUpdatee(false);
+ broker.setAcl(acl); // Restore ACL
discarding = false; // OK to set, we're stalled for update.
QPID_LOG(notice, *this << " update complete, starting catch-up.");
QPID_LOG(debug, debugSnapshot()); // OK to call because we're stalled.
diff --git a/cpp/src/qpid/cluster/Cluster.h b/cpp/src/qpid/cluster/Cluster.h
index da5781b7a9..ccec4948e6 100644
--- a/cpp/src/qpid/cluster/Cluster.h
+++ b/cpp/src/qpid/cluster/Cluster.h
@@ -56,6 +56,7 @@ namespace qpid {
namespace broker {
class Message;
+class AclModule;
}
namespace framing {
@@ -312,6 +313,7 @@ class Cluster : private Cpg::Handler, public management::Manageable {
sys::Timer clockTimer;
sys::AbsTime clusterTime;
sys::Duration clusterTimeOffset;
+ broker::AclModule* acl;
friend std::ostream& operator<<(std::ostream&, const Cluster&);
friend struct ClusterDispatcher;