From: Gunnar Beutner Date: Thu, 19 Sep 2013 12:47:17 +0000 (+0200) Subject: Fix: DynamicObject::HasPrivileges should always return true if privs == 0. X-Git-Tag: v0.0.3~466 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=74a4432badbf958218bf9fba59614843d4da3aae;p=icinga2 Fix: DynamicObject::HasPrivileges should always return true if privs == 0. --- diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 65289e925..d68d6eca8 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -171,6 +171,9 @@ void DynamicObject::SetPrivileges(const String& instance, int privs) bool DynamicObject::HasPrivileges(const String& instance, int privs) const { + if (privs == 0) + return true; + std::map::const_iterator it; it = m_Privileges.find(instance);