From: Soo-Hyun Choi Date: Tue, 17 Sep 2013 06:54:34 +0000 (+0900) Subject: Replace a deprecated libprivilege-control API X-Git-Tag: accepted/tizen/20131002.083908~7 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fframework%2Fweb%2Fwrt.git;a=commitdiff_plain;h=2439048a5d51d8c0a9831cf022eab70e47ee4c74 Replace a deprecated libprivilege-control API set_app_privilege() -> perm_app_set_privilege() [Issue#] N/A [Problem] set_app_privilege() will be deprecated. [Cause] API updates on libprivilege-control. [Solution] Replaced the deprecated API. --- diff --git a/src/api_new/runnable_widget_object.cpp b/src/api_new/runnable_widget_object.cpp index bedc0a1..3c3b929 100644 --- a/src/api_new/runnable_widget_object.cpp +++ b/src/api_new/runnable_widget_object.cpp @@ -52,7 +52,7 @@ RunnableWidgetObject::RunnableWidgetObject(WidgetModelPtr &model) : // this code prevent that widget launch with "root" permission, // when developers launch by command in the shell - set_app_privilege( + perm_app_set_privilege( DPL::ToUTF8String(m_widgetModel->TizenId).c_str(), m_widgetModel->Type.Get().getApptypeToString().c_str(), DPL::ToUTF8String(m_widgetModel->InstallPath.Get()).c_str() diff --git a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp index 838d1bf..cccfbbc 100644 --- a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp +++ b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp @@ -456,8 +456,8 @@ void Bundle::didReceiveMessage(WKStringRef messageName, WKTypeRef messageBody) _E("set_app_smack_label() failed"); } - _D("set_app_privilege(%s)", appPath.c_str()); - set_app_privilege(tzPkgId.c_str(), PRIVILEGE_APP_TYPE, appPath.c_str()); + _D("perm_app_set_privilege(%s)", appPath.c_str()); + perm_app_set_privilege(tzPkgId.c_str(), PRIVILEGE_APP_TYPE, appPath.c_str()); } /* This type of message is received when widget is restarting diff --git a/src/wrt-launchpad-daemon/include/access_control.h b/src/wrt-launchpad-daemon/include/access_control.h index 25d849b..6d01636 100644 --- a/src/wrt-launchpad-daemon/include/access_control.h +++ b/src/wrt-launchpad-daemon/include/access_control.h @@ -26,7 +26,7 @@ static inline int __set_access(const char* pkg_name, const char* pkg_type, const char* app_path) { - return set_app_privilege(pkg_name, pkg_type, app_path); + return perm_app_set_privilege(pkg_name, pkg_type, app_path); } #else