MESSAGE("CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
INCLUDE(FindPkgConfig)
-PKG_CHECK_MODULES(${PROJECT_NAME} REQUIRED aul pkgmgr-info pkgmgr-installer ecore bundle dlog liblaunchpad glib-2.0 libsmack capi-appfw-app-common storage jsoncpp openssl1.1 sqlite3 libtzplatform-config)
+PKG_CHECK_MODULES(${PROJECT_NAME} REQUIRED aul pkgmgr-info pkgmgr-installer ecore bundle dlog liblaunchpad glib-2.0 libsmack capi-appfw-app-common storage jsoncpp openssl1.1 sqlite3 libtzplatform-config security-manager)
FOREACH(flag ${${PROJECT_NAME}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
#define TIZEN_DOTNET_SDK_NUGET "Tizen.NET.Sdk"
#define NET_STANDARD_LIBRARY_NUGET "NETStandard.Library"
#define PLATFORM_TPA_CACHE "/usr/share/dotnet.tizen/lib/platform_tpa_cache"
+#define DISABLE_IPV6_FILE "._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6"
#if defined (__aarch64__)
#define ARCHITECTURE_IDENTIFIER "arm64"
#include "utils.h"
#include "multi_target_resolver.h"
#include "ni_common.h"
+#include "launcher_env.h"
#include <vector>
+#include <app-runtime.h>
#ifdef LOG_TAG
#undef LOG_TAG
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);
+ }
+ }
+ }
+}
extern "C" int PKGMGR_PARSER_PLUGIN_INSTALL(xmlDocPtr doc, const char* pkgId)
{
_ERR("Failed to resolve platform specific resources of nuget");
}
+ checkPrivilegeAndDisableIPv6(pkgId, rootPath);
+
return 0;
}
extern "C" int PKGMGR_PARSER_PLUGIN_UPGRADE(xmlDocPtr doc, const char* pkgId)
// Disable config cache to set environment after coreclr_initialize()
putenv(const_cast<char *>("COMPlus_DisableConfigCache=1"));
- // Disable IPv6 to solve Dual Mode issue (temporal patch)
- putenv(const_cast<char *>("DOTNET_SYSTEM_NET_DISABLEIPV6=1"));
-
// read string from external file and set them to environment value.
setEnvFromFile();
free(localDataPath);
}
+ if (exist(__pm->getAppRootPath() + "/bin/" + DISABLE_IPV6_FILE)) {
+ setSwitch("System.Net.DisableIPv6", true);
+ }
+
setSwitch("Switch.System.Diagnostics.StackTrace.ShowILOffsets", true);
vconf_ignore_key_changed(VCONFKEY_LANGSET, langChangedCB);
BuildRequires: pkgconfig(openssl1.1)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libtzplatform-config)
+BuildRequires: pkgconfig(security-manager)
BuildRequires: sqlite-devel
BuildRequires: boost-devel
BuildRequires: aul-devel