Reworking handling privileges for hybrid application 44/90544/6
authorTomasz Iwanek <t.iwanek@samsung.com>
Thu, 29 Sep 2016 14:25:57 +0000 (16:25 +0200)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Thu, 3 Nov 2016 12:54:18 +0000 (05:54 -0700)
commit0d7aea8b9ce763198225f1dc33eec9b487a823f6
treebac2fc6652ad4eb0d0fbb21bb7078adeb4e9b4f4
parent94b98890048f39274b76fa0c0d2c1900f2c70116
Reworking handling privileges for hybrid application

This patch keeps single list of privileges (stored in
manifest_x) and filters privileges when registring
security rules of applications. Following changed:
 - generated platform manifest xml contains <privilege>
   tags with 'type' atttibute set to 'tpk' or 'wgt',
 - in case of absence of attribute, its default value
   is 'tpk',
 - manifest_x changes privilege type from GList of char*
   to GList of privilege_x. Structure named 'privilege_x'
   contain parsed privilege type,
 - although there is one privilege list, given the fact
   that privilege now have type, native and web privileges
   should be registered in native or web apps only.

Verification:
 - no regression in tpk/wgt smoke tests,
 - install hybrid app with native and web privileges
   and check generated manifest file for privileges,
 - install web app with privileges and check generated
   manifest file,
 - install web app without privileges and check generated
   manifest file -> default privileges should be added.

Submit together:
 - https://review.tizen.org/gerrit/#/c/90540/
 - https://review.tizen.org/gerrit/#/c/90543/
 - https://review.tizen.org/gerrit/#/c/90544/
 - https://review.tizen.org/gerrit/#/c/90546/
 - https://review.tizen.org/gerrit/#/c/90561/

Change-Id: I16a0ec57d48c615f58aa8bada27073fb26208298
19 files changed:
src/common/certificate_validation.cc
src/common/certificate_validation.h
src/common/installer_context.cc
src/common/installer_context.h
src/common/privileges.cc
src/common/privileges.h
src/common/security_registration.cc
src/common/security_registration.h
src/common/step/configuration/step_parse_manifest.cc
src/common/step/filesystem/step_create_per_user_storage_directories.cc
src/common/step/filesystem/step_create_storage_directories.cc
src/common/step/security/step_check_signature.cc
src/common/step/security/step_privilege_compatibility.cc
src/common/step/security/step_privilege_compatibility.h
src/common/step/security/step_recover_security.cc
src/common/step/security/step_register_security.cc
src/common/step/security/step_revoke_security.cc
src/common/step/security/step_rollback_deinstallation_security.cc
src/common/step/security/step_update_security.cc