Fix to list policies descriptions lowest to highest 73/35573/3
authorMichal Eljasiewicz <m.eljasiewic@samsung.com>
Wed, 18 Feb 2015 12:57:27 +0000 (13:57 +0100)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 27 Feb 2015 16:25:05 +0000 (08:25 -0800)
Change-Id: I8eaa21c94a64d882a0e9045ede18521e66b52651
Signed-off-by: Michal Eljasiewicz <m.eljasiewic@samsung.com>
src/common/cynara.cpp
src/include/security-manager.h

index de48f90..fba5fb5 100644 (file)
@@ -447,8 +447,8 @@ void CynaraAdmin::ListPoliciesDescriptions(std::vector<std::string> &policiesDes
 {
     FetchCynaraPolicyDescriptions(false);
 
-    for (auto it = TypeToDescription.rbegin(); it != TypeToDescription.rend(); ++it)
-        policiesDescriptions.push_back(it->second);
+    for (const auto &it : TypeToDescription)
+        policiesDescriptions.push_back(it.second);
 }
 
 std::string CynaraAdmin::convertToPolicyDescription(const int policyType, bool forceRefresh)
index da0f288..d04ca67 100644 (file)
@@ -706,7 +706,7 @@ void security_manager_policy_entries_free(policy_entry *p_entries, const size_t
 /**
  * This function returns array of available policy levels in form of simple
  * text descriptions. List is sorted using internal policy level value,
- * from highest value to lowest and starts with "Allow".
+ * from lowest value to highest and starts with "Deny".
  *
  * Caller needs to free memory allocated for the list using
  * security_manager_policy_levels_free().