Skip privilege registration in case of Move 99/122499/1
authorSemun Lee <semun.lee@samsung.com>
Sun, 2 Apr 2017 02:22:07 +0000 (11:22 +0900)
committerSemun Lee <semun.lee@samsung.com>
Sun, 2 Apr 2017 02:26:17 +0000 (19:26 -0700)
We don't need to update app privileges in case of Move operation.
It may drop some internal privileges because we skipped
StepPrivilegeCompatibility and StepCheckSignature steps.

Change-Id: I067df74664a83736700cbb56ca78eb5d0b4232ee
Signed-off-by: Semun Lee <semun.lee@samsung.com>
src/common/step/security/step_register_security.cc

index 4cd8439d1263837fe7f21ad4147065aacdf4d978..875da583cc13e6e7e98bfe571f6d2ccb61616a01 100644 (file)
@@ -39,7 +39,8 @@ Step::Status StepRegisterSecurity::precheck() {
 
 Step::Status StepRegisterSecurity::process() {
   std::string error_message;
-  if (!RegisterSecurityContextForManifest(
+  if (context_->request_type.get() != RequestType::Move &&
+      !RegisterSecurityContextForManifest(
       context_->pkgid.get(), context_->pkg_path.get(), context_->uid.get(),
       &context_->certificate_info.get(), context_->manifest_data.get(),
       context_->cross_app_rules.get(), &error_message)) {