You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by cc...@apache.org on 2008/09/04 22:07:49 UTC

svn commit: r692217 - in /incubator/qpid/trunk/qpid/cpp/src/qpid/acl: Acl.cpp Acl.h AclPlugin.cpp

Author: cctrieloff
Date: Thu Sep  4 13:07:49 2008
New Revision: 692217

URL: http://svn.apache.org/viewvc?rev=692217&view=rev
Log:
QPID-107 swap the enforce defualt to ACL has to be turned on. So defualt install can do something...

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.cpp?rev=692217&r1=692216&r2=692217&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.cpp Thu Sep  4 13:07:49 2008
@@ -43,7 +43,7 @@
 
    bool Acl::authorise(const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map<Property, std::string>* params)
    {
-      if (aclValues.noEnforce) return true;
+      if (!aclValues.enforce) return true;
       boost::shared_ptr<AclData> dataLocal = data;  //rcu copy
       
       // add real ACL check here... 
@@ -55,7 +55,7 @@
 
    bool Acl::authorise(const std::string& id, const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey)
    {
-      if (aclValues.noEnforce) return true;
+      if (!aclValues.enforce) return true;
       boost::shared_ptr<AclData> dataLocal = data;  //rcu copy
       
       // only use dataLocal here...

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.h?rev=692217&r1=692216&r2=692217&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/acl/Acl.h Thu Sep  4 13:07:49 2008
@@ -38,10 +38,10 @@
 namespace acl {
 
 struct AclValues {
-	bool noEnforce;
+	bool enforce;
     std::string aclFile;
 
-    AclValues() {noEnforce = false; aclFile = "policy.acl"; }
+    AclValues() {enforce = false; aclFile = "policy.acl"; }
 };
 
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp?rev=692217&r1=692216&r2=692217&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/acl/AclPlugin.cpp Thu Sep  4 13:07:49 2008
@@ -40,7 +40,7 @@
 
     AclOptions(AclValues& v) : Options("ACL Options"), values(v) {
         addOptions()
-            ("no-enforce-acl", optValue(values.noEnforce), "Do not enforce ACL")
+            ("enforce-acl", optValue(values.enforce), "Enforce ACL")
             ("acl-file", optValue(values.aclFile, "FILE"), "The policy file to load from, loaded from data dir")
             ;
     }
@@ -57,7 +57,7 @@
     Options* getOptions() { return &options; }
 
     void init(broker::Broker& b) {
-        if (values.noEnforce){
+        if (!values.enforce){
 		    QPID_LOG(info, "ACL Disabled, no ACL checking being done.");
 			return;  
 		}