X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=NativeLauncher%2Finstaller-plugin%2Fdotnet_apptype_plugin.cc;h=48e0ed30ead61c259f626887b73768b37074b43f;hb=1cdab49c2d2a267f43d0ca5a4db2e0efe424cb3a;hp=c5c9786d0ebc71993ca79924a7104bc01068acc5;hpb=667e87b9e2fd3879ba6100b7fde9295408f9c337;p=platform%2Fcore%2Fdotnet%2Flauncher.git diff --git a/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc b/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc index c5c9786..48e0ed3 100644 --- a/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc +++ b/NativeLauncher/installer-plugin/dotnet_apptype_plugin.cc @@ -19,11 +19,9 @@ #include "multi_target_resolver.h" #include "ni_common.h" #include "profile_common.h" +#include "privilege_common.h" #include "launcher_env.h" -#include -#include - #ifdef LOG_TAG #undef LOG_TAG #endif @@ -33,25 +31,6 @@ typedef struct _xmlDoc xmlDoc; typedef xmlDoc* xmlDocPtr; bool pluginInstalled = false; -static const char* INTERNET_PRIVILEGE = "http://tizen.org/privilege/internet"; -static int UID_OWNER = 5001; - -static void checkPrivilegeAndDisableIPv6(const char* pkgId, const std::string& rootPath) -{ - int res = 0; - if (security_manager_app_has_privilege(pkgId, INTERNET_PRIVILEGE, UID_OWNER, &res) == SECURITY_MANAGER_SUCCESS) { - if (res != 1) { - std::string filePath = rootPath + "/bin/" + DISABLE_IPV6_FILE; - std::ofstream output(filePath); - if (exist(filePath)) { - _INFO("File to disable IPv6 is created successfully"); - } else { - _ERR("Failed to create file to disable IPv6 [%s]", pkgId); - } - output.close(); - } - } -} extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId) { @@ -86,7 +65,7 @@ extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId) _ERR("Failed to resolve platform specific resources of nuget"); } - checkPrivilegeAndDisableIPv6(pkgId, rootPath); + checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath); return 0; }