Remove root user validation for direct modes 72/57372/4
authorLukasz Wysocki <l.wysocki@samsung.com>
Tue, 19 Jan 2016 12:06:18 +0000 (13:06 +0100)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Wed, 27 Jan 2016 00:15:42 +0000 (16:15 -0800)
This change is made due to requirements in commit:
- https://review.tizen.org/gerrit/#/c/55679/

Change-Id: I9befa463bd43b6d872e6fd2c8e08b037404d2646

src/common/pkgmgr_interface.cc
src/common/step/step_configure.cc

index 980b5dd..594eaac 100644 (file)
@@ -57,14 +57,6 @@ int PkgMgrInterface::InitInternal(int argc, char** argv) {
     // no need to free pkgmgr_installer here. it will be freed in DTOR.
   }
 
-  if (pkgmgr_installer_get_request_type(pi_)
-      == PKGMGR_REQ_MANIFEST_DIRECT_INSTALL) {
-    uid_t uid = getuid();
-    if (uid != 0) {
-      LOG(ERROR) << "You are not an authorized user(" << uid << ")!";
-      return EINVAL;
-    }
-  }
   is_app_installed_ = false;
   if (query_interface_)
     is_app_installed_ = query_interface_->IsAppInstalledByArgv(argc, argv);
index 313f6b8..236cba1 100644 (file)
@@ -72,11 +72,6 @@ Step::Status StepConfigure::process() {
       break;
     case RequestType::ManifestDirectInstall:
     case RequestType::ManifestDirectUpdate: {
-      if (context_->request_mode.get() != RequestMode::GLOBAL) {
-        LOG(ERROR) <<
-          "Only global user allows to use Manifest Direct Install";
-        return Status::CONFIG_ERROR;
-      }
       context_->pkgid.set(pkgmgr_->GetRequestInfo());
       bf::path package_directory =
           context_->root_application_path.get() / context_->pkgid.get();