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>