From af1ed395176fad8d50760b330c335e9cd25543ef Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Fri, 19 Sep 2008 19:12:10 +0000 Subject: - fix 'all' user rules to match if not in user db. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@697191 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/acl/AclData.cpp | 4 ++++ cpp/src/qpid/acl/AclReader.cpp | 1 + 2 files changed, 5 insertions(+) (limited to 'cpp/src') diff --git a/cpp/src/qpid/acl/AclData.cpp b/cpp/src/qpid/acl/AclData.cpp index ee8b3b1b7d..b9501ce6c1 100644 --- a/cpp/src/qpid/acl/AclData.cpp +++ b/cpp/src/qpid/acl/AclData.cpp @@ -59,6 +59,8 @@ AclResult AclData::lookup(const std::string& id, const Action& action, const Obj if (actionList[action] && actionList[action][objType]){ AclData::actObjItr itrRule = actionList[action][objType]->find(id); + if (itrRule != actionList[action][objType]->end()) + itrRule = actionList[action][objType]->find("*"); if (itrRule != actionList[action][objType]->end() ) { //loop the vector @@ -95,6 +97,8 @@ AclResult AclData::lookup(const std::string& id, const Action& action, const Obj if (actionList[action] && actionList[action][objType]){ AclData::actObjItr itrRule = actionList[action][objType]->find(id); + if (itrRule != actionList[action][objType]->end()) + itrRule = actionList[action][objType]->find("*"); if (itrRule != actionList[action][objType]->end() ) { //loop the vector diff --git a/cpp/src/qpid/acl/AclReader.cpp b/cpp/src/qpid/acl/AclReader.cpp index ee29426a25..0ad92a2243 100644 --- a/cpp/src/qpid/acl/AclReader.cpp +++ b/cpp/src/qpid/acl/AclReader.cpp @@ -207,6 +207,7 @@ void AclReader::aclRule::processName(const std::string& name, const groupMap& gr AclReader::AclReader() : lineNumber(0), contFlag(false), validationMap(new AclHelper::objectMap) { AclHelper::loadValidationMap(validationMap); + names.insert("*"); } AclReader::~AclReader() {} -- cgit v1.2.1