From 2f0fb53b48a47f12a8c791582523da19536dbb9c Mon Sep 17 00:00:00 2001 From: Dariusz Michaluk Date: Mon, 15 May 2017 14:50:18 +0200 Subject: [PATCH] Prevent from collision with system privileges Change-Id: If307f2b4609d5af45126cdd1aac2e577d8ad5cac --- src/common/service_impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/service_impl.cpp b/src/common/service_impl.cpp index 36491f3..46a7404 100644 --- a/src/common/service_impl.cpp +++ b/src/common/service_impl.cpp @@ -96,11 +96,11 @@ private: }; bool verifyAppDefinedPrivileges(const AppDefinedPrivilegesVector &privileges) { - // TODO check for collision with system privileges - // check if licenses are set for license-privileges + // check for collision with system privileges for (auto &e : privileges) { - if ((std::get<1>(e) == SM_APP_DEFINED_PRIVILEGE_TYPE_LICENSED) && std::get<2>(e).empty()) + if (((std::get<1>(e) == SM_APP_DEFINED_PRIVILEGE_TYPE_LICENSED) && std::get<2>(e).empty()) || + (std::get<0>(e).find("http://tizen.org/privilege/") != std::string::npos)) return false; } return true; -- 2.7.4