From: Soyoung Kim Date: Mon, 28 Oct 2013 14:27:44 +0000 (+0900) Subject: Add to privilege level for install hybrid app. X-Git-Tag: 2.2.1_release~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d8d8ac161e5301df043a9549ca770d2ca2e1116;hp=3701e7e4160737cd78f0ebaa3f50464923ed7d5d;p=framework%2Fweb%2Fwrt-installer.git Add to privilege level for install hybrid app. [Issue#] N/A [Problem] If hybrid app singined public app, installation success like having platform privilege. [Cause] wrt-installer doesn't pass signature info when service app install. [Solution] add to pass parameter about privilege level during install hybrid app. 0: NP, 1: Public, 2: Partner, 3: Platform wrt-installer -iv [path] -p 1 [SCMRequest] N/A Change-Id: Ib8d8148a0e7479b869e08c9d4a9425f577bc5fb4 --- diff --git a/src/jobs/widget_install/task_certify_level.cpp b/src/jobs/widget_install/task_certify_level.cpp index c1372f4..fd696e0 100644 --- a/src/jobs/widget_install/task_certify_level.cpp +++ b/src/jobs/widget_install/task_certify_level.cpp @@ -166,6 +166,7 @@ TaskCertifyLevel::Level TaskCertifyLevel::getCertifyLevel() } } + m_contextData.certLevel = level; return level; } diff --git a/src/jobs/widget_install/task_certify_level.h b/src/jobs/widget_install/task_certify_level.h index ddad9e9..ad8d427 100644 --- a/src/jobs/widget_install/task_certify_level.h +++ b/src/jobs/widget_install/task_certify_level.h @@ -46,7 +46,7 @@ class TaskCertifyLevel : //data InstallerContext& m_contextData; - enum class Level : std::int8_t { + enum Level { UNKNOWN = 0, PUBLIC = 1, PARTNER = 2, diff --git a/src/jobs/widget_install/task_install_ospsvc.cpp b/src/jobs/widget_install/task_install_ospsvc.cpp index 96d0dae..15923f9 100644 --- a/src/jobs/widget_install/task_install_ospsvc.cpp +++ b/src/jobs/widget_install/task_install_ospsvc.cpp @@ -42,7 +42,8 @@ using namespace WrtDB; namespace { const int MAX_BUF_SIZE = 128; -const char* OSP_INSTALL_STR = "/usr/etc/package-manager/backend/tpk -iv "; +const char* OSP_INSTALL_STR1 = "/usr/etc/package-manager/backend/tpk -iv "; +const char* OSP_INSTALL_STR2 = " -p "; } namespace Jobs { @@ -61,9 +62,9 @@ void TaskInstallOspsvc::StepInstallOspService() _D("Step: installation for osp service"); std::ostringstream commStr; - commStr << OSP_INSTALL_STR << BashUtils::escape_arg( - m_context.locations->getPackageInstallationDir()); - //commStr << " 2>&1"; + commStr << OSP_INSTALL_STR1<< BashUtils::escape_arg( + m_context.locations->getPackageInstallationDir()) + << OSP_INSTALL_STR2 << m_context.certLevel; _D("osp install command : %s", commStr.str().c_str()); char readBuf[MAX_BUF_SIZE]; diff --git a/src/jobs/widget_install/widget_install_context.h b/src/jobs/widget_install/widget_install_context.h index 4816e94..5750cbd 100644 --- a/src/jobs/widget_install/widget_install_context.h +++ b/src/jobs/widget_install/widget_install_context.h @@ -101,6 +101,7 @@ struct InstallerContext std::string requestedPath; ///input path of widget bool needEncryption; ///for configuring right task if encryption needed + int certLevel; }; #endif // INSTALLER_CONTEXT_H