Change logic of security_manager_set_process_groups_from_appid 81/67981/3
authorRafal Krypa <r.krypa@samsung.com>
Fri, 29 Apr 2016 18:06:00 +0000 (20:06 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Sat, 30 Apr 2016 06:52:08 +0000 (08:52 +0200)
commit5aa65d374fe9f086ee68a189ef0dda1ae1d35574
tree9b6cf7066043c0bc0e551ed7b2dc44f0635b8eeb
parente5aaf17b1afbe7a8efb916325222d9fdbf1615e4
Change logic of security_manager_set_process_groups_from_appid

The API function sets groups in application candidate process.
The following changes are applied:
- groups are based on privileges assigned to appId, not pkgId - don't
  consider privileges granted to other apps in the package
- if the process was previously added to any group that is mapped to
  a privilege and app doesn't have access to that privilege, the group
  will be removed from the process
- no group will be added to the process more than once

Change-Id: Ifbb5fe48f2ad0bcc69ca00c13e6d7f2a20b148a2
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
src/client/client-security-manager.cpp
src/common/cynara.cpp
src/common/include/cynara.h
src/common/include/service_impl.h
src/common/service_impl.cpp
src/server/service/service.cpp