SET_TARGET_PROPERTIES(${PROFILE_COMMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
TARGET_LINK_LIBRARIES(${PROFILE_COMMON} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL})
+SET(PRIVILEGE_COMMON "privilege_common")
+SET(${PRIVILEGE_COMMON}_SOURCE_FILES
+ tool/privilege_common.cc
+)
+ADD_LIBRARY(${PRIVILEGE_COMMON} SHARED ${${PRIVILEGE_COMMON}_SOURCE_FILES})
+SET_TARGET_PROPERTIES(${PRIVILEGE_COMMON} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
+TARGET_LINK_LIBRARIES(${PRIVILEGE_COMMON} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL})
+
SET(MULTI_TARGET_RESOLVER "multi_target_resolver")
SET(${MULTI_TARGET_RESOLVER}_SOURCE_FILES
tool/multi_target_resolver.cc
)
ADD_EXECUTABLE(${DOTNETTOOL} ${${DOTNETTOOL}_SOURCE_FILES})
SET_TARGET_PROPERTIES(${DOTNETTOOL} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_EXE})
-TARGET_LINK_LIBRARIES(${DOTNETTOOL} ${${PROJECT_NAME}_LDFLAGS} "-pie" ${DOTNET_LAUNCHER_UTIL} ${NI_COMMON} ${TAC_COMMON} ${PROFILE_COMMON} ${MULTI_TARGET_RESOLVER})
+TARGET_LINK_LIBRARIES(${DOTNETTOOL} ${${PROJECT_NAME}_LDFLAGS} "-pie" ${DOTNET_LAUNCHER_UTIL} ${NI_COMMON} ${TAC_COMMON} ${PROFILE_COMMON} ${PRIVILEGE_COMMON} ${MULTI_TARGET_RESOLVER})
SET(PREFER_DOTNET_AOT_PLUGIN "prefer_dotnet_aot_plugin")
SET(${PREFER_DOTNET_AOT_PLUGIN}_SOURCE_FILES
)
ADD_LIBRARY(${DOTNET_APPTYPE_PLUGIN} SHARED ${${DOTNET_APPTYPE_PLUGIN}_SOURCE_FILES})
SET_TARGET_PROPERTIES(${DOTNET_APPTYPE_PLUGIN} PROPERTIES COMPILE_FLAGS ${EXTRA_CFLAGS_LIB})
-TARGET_LINK_LIBRARIES(${DOTNET_APPTYPE_PLUGIN} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL} ${MULTI_TARGET_RESOLVER} ${NI_COMMON} ${PROFILE_COMMON})
+TARGET_LINK_LIBRARIES(${DOTNET_APPTYPE_PLUGIN} ${${PROJECT_NAME}_LDFLAGS} ${DOTNET_LAUNCHER_UTIL} ${MULTI_TARGET_RESOLVER} ${NI_COMMON} ${PROFILE_COMMON} ${PRIVILEGE_COMMON})
# Build for test plugin library (libdotnet-plugin.so)
IF(DEFINED BUILD_DOTNET_PLUGIN)
INSTALL(TARGETS ${TAC_COMMON} DESTINATION ${LIBDIR})
INSTALL(TARGETS ${NI_COMMON} DESTINATION ${LIBDIR})
INSTALL(TARGETS ${PROFILE_COMMON} DESTINATION ${LIBDIR})
+INSTALL(TARGETS ${PRIVILEGE_COMMON} DESTINATION ${LIBDIR})
INSTALL(TARGETS ${MULTI_TARGET_RESOLVER} DESTINATION ${LIBDIR})
INSTALL(TARGETS ${TPATOOL} DESTINATION ${BINDIR})
INSTALL(TARGETS ${DOTNETTOOL} DESTINATION ${BINDIR})
INSTALL(FILES inc/ni_common.h DESTINATION ${INCLUDEDIR})
INSTALL(FILES inc/tac_common.h DESTINATION ${INCLUDEDIR})
INSTALL(FILES inc/profile_common.h DESTINATION ${INCLUDEDIR})
+INSTALL(FILES inc/privilege_common.h DESTINATION ${INCLUDEDIR})
INSTALL(FILES ../dotnet-launcher.pc DESTINATION ${LIBDIR}/pkgconfig)
INSTALL(FILES dotnet-launcher.info DESTINATION /usr/share/parser-plugins)
IF(DEFINED BUILD_DOTNET_PLUGIN)
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __PRIVILEGE_COMMON_H__
+#define __PRIVILEGE_COMMON_H__
+
+#include <functional>
+#include <string>
+
+/**
+ * @brief check internet privilege and disable ipv6
+ * @param[in] pkgId package id
+ * @param[in] rootPath root path
+ */
+void checkInternetPrivilegeAndDisableIPv6(const char* pkgId, const std::string& rootPath);
+
+/**
+ * @brief check all app privilege
+ */
+void checkAllAppPrivilege();
+
+#endif /* __PRIVILEGE_COMMON_H__ */
#include "multi_target_resolver.h"
#include "ni_common.h"
#include "profile_common.h"
+#include "privilege_common.h"
#include "launcher_env.h"
-#include <vector>
-#include <app-runtime.h>
-
#ifdef LOG_TAG
#undef LOG_TAG
#endif
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)
{
_ERR("Failed to resolve platform specific resources of nuget");
}
- checkPrivilegeAndDisableIPv6(pkgId, rootPath);
+ checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath);
return 0;
}
#include "ni_common.h"
#include "tac_common.h"
#include "profile_common.h"
+#include "privilege_common.h"
#include "multi_target_resolver.h"
#include "log.h"
" (this option should be run as root)\n"
" --rm-all-app-profile - Remove application profile of all packages for all users\n"
" (this option should be run as root)\n"
+ " --check-all-app-privilege - Chcek application privilege of all package\n"
+ " (this option should be run as root)\n"
"\n"
"Options:\n"
" --mibc - Specify Mibc files. Sepatated with ':'.\n"
else if (cmd == "--rm-all-app-profile") {
removeAllAppProfileData();
}
+ //sh-3.2# dotnettool --check-all-app-privilege
+ else if (cmd == "--check-all-app-privilege") {
+ checkAllAppPrivilege();
+ }
else {
_SERR("Unknown option [%s]", cmd.c_str());
DisplayUsage();
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "log.h"
+#include "utils.h"
+#include "privilege_common.h"
+#include "launcher_env.h"
+
+#include <app-runtime.h>
+
+static const char* INTERNET_PRIVILEGE = "http://tizen.org/privilege/internet";
+static int UID_OWNER = 5001;
+
+void checkInternetPrivilegeAndDisableIPv6(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();
+ }
+ }
+}
+
+static int checkAppPrivilegeListCb(pkgmgrinfo_appinfo_h handle, void *user_data)
+{
+ char *pkgId = NULL;
+ int ret = pkgmgrinfo_appinfo_get_pkgid(handle, &pkgId);
+ if (ret != PMINFO_R_OK || pkgId == NULL) {
+ _SERR("Failed to get package id");
+ return 0;
+ }
+
+ char *rootPath = NULL;
+ ret = pkgmgrinfo_appinfo_get_root_path(handle, &rootPath);
+ if (ret != PMINFO_R_OK) {
+ _SERR("Failed to get root path");
+ return 0;
+ }
+
+ checkInternetPrivilegeAndDisableIPv6(pkgId, rootPath);
+
+ return 0;
+}
+
+static void checkAppPrivilegeByAppType(const char* type)
+{
+ pkgmgrinfo_appinfo_filter_h filter;
+
+ int ret = pkgmgrinfo_appinfo_filter_create(&filter);
+ if (ret != PMINFO_R_OK) {
+ _SERR("Failed to create appinfo filter");
+ return;
+ }
+
+ ret = pkgmgrinfo_appinfo_filter_add_string(filter, PMINFO_APPINFO_PROP_APP_TYPE, type);
+ if (ret != PMINFO_R_OK) {
+ pkgmgrinfo_appinfo_filter_destroy(filter);
+ _SERR("Failed to add appinfo filter (%s)", type);
+ return;
+ }
+
+ ret = pkgmgrinfo_appinfo_filter_foreach_appinfo(filter, checkAppPrivilegeListCb, NULL);
+ if (ret != PMINFO_R_OK) {
+ _SERR("Failed to pkgmgrinfo_pkginfo_filter_foreach_pkginfo");
+ pkgmgrinfo_appinfo_filter_destroy(filter);
+ return;
+ }
+
+ pkgmgrinfo_appinfo_filter_destroy(filter);
+
+ return;
+}
+
+void checkAllAppPrivilege()
+{
+ std::vector<const char*> appTypeList = {"dotnet", "dotnet-nui", "dotnet-inhouse"};
+
+ for (auto& type : appTypeList) {
+ checkAppPrivilegeByAppType(type);
+ }
+}
/usr/bin/dotnettool --ni-regen-all-app --skip-ro-app
/usr/bin/dotnettool --resolve-all-app
/usr/bin/dotnettool --rm-all-app-profile
+/usr/bin/dotnettool --check-all-app-privilege
%{_libdir}/libni_common.so
%{_libdir}/libtac_common.so
%{_libdir}/libprofile_common.so
+%{_libdir}/libprivilege_common.so
%{_libdir}/libmulti_target_resolver.so
%{_tmpfilesdir}/%{name}.conf
/usr/share/parser-plugins/dotnet-launcher.info
%{_includedir}/ni_common.h
%{_includedir}/tac_common.h
%{_includedir}/profile_common.h
+%{_includedir}/privilege_common.h
%{_includedir}/dotnet_launcher_plugin.h
%{_includedir}/coreclr_host.h
%{_libdir}/libdotnet_launcher_util.so
%{_libdir}/libni_common.so
%{_libdir}/libtac_common.so
%{_libdir}/libprofile_common.so
+%{_libdir}/libprivilege_common.so
%{_libdir}/pkgconfig/dotnet-launcher.pc
%{_framework_dir}/Tizen.Runtime.pdb
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31727.386\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_09", "Launcher_TC_PLUGIN_09\Launcher_TC_PLUGIN_09\Launcher_TC_PLUGIN_09.csproj", "{4E74FF59-5B11-42A8-B5B2-445E351D8002}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_09.Tizen", "Launcher_TC_PLUGIN_09\Launcher_TC_PLUGIN_09.Tizen\Launcher_TC_PLUGIN_09.Tizen.csproj", "{9229D8E3-0ED9-4E6C-905A-93CF9C749672}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {4E74FF59-5B11-42A8-B5B2-445E351D8002}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {4E74FF59-5B11-42A8-B5B2-445E351D8002}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {4E74FF59-5B11-42A8-B5B2-445E351D8002}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {4E74FF59-5B11-42A8-B5B2-445E351D8002}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {9229D8E3-0ED9-4E6C-905A-93CF9C749672}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {9229D8E3-0ED9-4E6C-905A-93CF9C749672}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {9229D8E3-0ED9-4E6C-905A-93CF9C749672}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {9229D8E3-0ED9-4E6C-905A-93CF9C749672}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ SolutionGuid = {9AEC76D8-7CD4-40F6-A3A8-E69561DBB25E}\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+using System;\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_PLUGIN_09\r
+{\r
+ class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication\r
+ {\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+\r
+ LoadApplication(new App());\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ var app = new Program();\r
+ Forms.Init(app);\r
+ app.Run(args);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>tizen60</TargetFramework>\r
+ <AssemblyName>Launcher_TC_PLUGIN_09.Tizen</AssemblyName>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="lib\" />\r
+ <Folder Include="res\" />\r
+ </ItemGroup>\r
+\r
+ \r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Launcher_TC_PLUGIN_09\Launcher_TC_PLUGIN_09.csproj" />\r
+ </ItemGroup>\r
+ \r
+\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest xmlns="http://tizen.org/ns/packages" api-version="5.5" package="org.tizen.example.Launcher_TC_PLUGIN_09.Tizen" version="1.0.0">\r
+ <profile name="common" />\r
+ <ui-application appid="org.tizen.example.Launcher_TC_PLUGIN_09.Tizen"\r
+ exec="Launcher_TC_PLUGIN_09.Tizen.dll"\r
+ type="dotnet"\r
+ multiple="false"\r
+ taskmanage="true"\r
+ nodisplay="false"\r
+ launch_mode="single"\r
+ api-version="6">\r
+ <label>Launcher_TC_PLUGIN_09.Tizen</label>\r
+ <icon>Launcher_TC_PLUGIN_09.Tizen.png</icon>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ </ui-application>\r
+</manifest>\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_PLUGIN_09\r
+{\r
+ public class App : Application\r
+ {\r
+ public App()\r
+ {\r
+ // The root page of your application\r
+ MainPage = new ContentPage\r
+ {\r
+ Content = new StackLayout\r
+ {\r
+ VerticalOptions = LayoutOptions.Center,\r
+ Children = {\r
+ new Label {\r
+ HorizontalTextAlignment = TextAlignment.Center,\r
+ Text = "Welcome to Xamarin Forms!"\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }\r
+\r
+ protected override void OnStart()\r
+ {\r
+ // Handle when your app starts\r
+ }\r
+\r
+ protected override void OnSleep()\r
+ {\r
+ // Handle when your app sleeps\r
+ }\r
+\r
+ protected override void OnResume()\r
+ {\r
+ // Handle when your app resumes\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <TargetFramework>netstandard2.0</TargetFramework>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <PackageReference Include="Xamarin.Forms" Version="4.6.0.967" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31727.386\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_10", "Launcher_TC_PLUGIN_10\Launcher_TC_PLUGIN_10\Launcher_TC_PLUGIN_10.csproj", "{2606DC60-FB43-4D6E-8B65-FA01CF966D6E}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_PLUGIN_10.Tizen", "Launcher_TC_PLUGIN_10\Launcher_TC_PLUGIN_10.Tizen\Launcher_TC_PLUGIN_10.Tizen.csproj", "{47D8D4A8-AEDB-4995-B090-BA218137ADA7}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {2606DC60-FB43-4D6E-8B65-FA01CF966D6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {2606DC60-FB43-4D6E-8B65-FA01CF966D6E}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {2606DC60-FB43-4D6E-8B65-FA01CF966D6E}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {2606DC60-FB43-4D6E-8B65-FA01CF966D6E}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {47D8D4A8-AEDB-4995-B090-BA218137ADA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {47D8D4A8-AEDB-4995-B090-BA218137ADA7}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {47D8D4A8-AEDB-4995-B090-BA218137ADA7}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {47D8D4A8-AEDB-4995-B090-BA218137ADA7}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ SolutionGuid = {B74D80B9-A84E-4030-A754-346A1AB54157}\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+using System;\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_PLUGIN_10\r
+{\r
+ class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication\r
+ {\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+\r
+ LoadApplication(new App());\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ var app = new Program();\r
+ Forms.Init(app);\r
+ app.Run(args);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>tizen60</TargetFramework>\r
+ <AssemblyName>Launcher_TC_PLUGIN_10.Tizen</AssemblyName>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="lib\" />\r
+ <Folder Include="res\" />\r
+ </ItemGroup>\r
+\r
+ \r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Launcher_TC_PLUGIN_10\Launcher_TC_PLUGIN_10.csproj" />\r
+ </ItemGroup>\r
+ \r
+\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest package="org.tizen.example.Launcher_TC_PLUGIN_10.Tizen" version="1.0.0" api-version="5.5" xmlns="http://tizen.org/ns/packages">\r
+ <profile name="common" />\r
+ <ui-application appid="org.tizen.example.Launcher_TC_PLUGIN_10.Tizen" exec="Launcher_TC_PLUGIN_10.Tizen.dll" multiple="false" nodisplay="false" taskmanage="true" api-version="6" type="dotnet" launch_mode="single">\r
+ <label>Launcher_TC_PLUGIN_10.Tizen</label>\r
+ <icon>Launcher_TC_PLUGIN_10.Tizen.png</icon>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ <splash-screens />\r
+ </ui-application>\r
+ <shortcut-list />\r
+ <privileges>\r
+ <privilege>http://tizen.org/privilege/internet</privilege>\r
+ </privileges>\r
+ <dependencies />\r
+ <provides-appdefined-privileges />\r
+</manifest>\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_PLUGIN_10\r
+{\r
+ public class App : Application\r
+ {\r
+ public App()\r
+ {\r
+ // The root page of your application\r
+ MainPage = new ContentPage\r
+ {\r
+ Content = new StackLayout\r
+ {\r
+ VerticalOptions = LayoutOptions.Center,\r
+ Children = {\r
+ new Label {\r
+ HorizontalTextAlignment = TextAlignment.Center,\r
+ Text = "Welcome to Xamarin Forms!"\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }\r
+\r
+ protected override void OnStart()\r
+ {\r
+ // Handle when your app starts\r
+ }\r
+\r
+ protected override void OnSleep()\r
+ {\r
+ // Handle when your app sleeps\r
+ }\r
+\r
+ protected override void OnResume()\r
+ {\r
+ // Handle when your app resumes\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <TargetFramework>netstandard2.0</TargetFramework>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <PackageReference Include="Xamarin.Forms" Version="4.6.0.967" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
--- /dev/null
+\r
+Microsoft Visual Studio Solution File, Format Version 12.00\r
+# Visual Studio Version 16\r
+VisualStudioVersion = 16.0.31727.386\r
+MinimumVisualStudioVersion = 10.0.40219.1\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_TOOL_10", "Launcher_TC_TOOL_10\Launcher_TC_TOOL_10\Launcher_TC_TOOL_10.csproj", "{253A4C84-2488-4A71-A07E-B90FF118D7D0}"\r
+EndProject\r
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Launcher_TC_TOOL_10.Tizen", "Launcher_TC_TOOL_10\Launcher_TC_TOOL_10.Tizen\Launcher_TC_TOOL_10.Tizen.csproj", "{C6BDFE5E-5BEE-4170-9E0F-8F198AE30628}"\r
+EndProject\r
+Global\r
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+ Debug|Any CPU = Debug|Any CPU\r
+ Release|Any CPU = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+ {253A4C84-2488-4A71-A07E-B90FF118D7D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {253A4C84-2488-4A71-A07E-B90FF118D7D0}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {253A4C84-2488-4A71-A07E-B90FF118D7D0}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {253A4C84-2488-4A71-A07E-B90FF118D7D0}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ {C6BDFE5E-5BEE-4170-9E0F-8F198AE30628}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\r
+ {C6BDFE5E-5BEE-4170-9E0F-8F198AE30628}.Debug|Any CPU.Build.0 = Debug|Any CPU\r
+ {C6BDFE5E-5BEE-4170-9E0F-8F198AE30628}.Release|Any CPU.ActiveCfg = Release|Any CPU\r
+ {C6BDFE5E-5BEE-4170-9E0F-8F198AE30628}.Release|Any CPU.Build.0 = Release|Any CPU\r
+ EndGlobalSection\r
+ GlobalSection(SolutionProperties) = preSolution\r
+ HideSolutionNode = FALSE\r
+ EndGlobalSection\r
+ GlobalSection(ExtensibilityGlobals) = postSolution\r
+ SolutionGuid = {C6424644-C8C2-42A2-B35F-B87B9474C8F7}\r
+ EndGlobalSection\r
+EndGlobal\r
--- /dev/null
+using System;\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_TOOL_10\r
+{\r
+ class Program : global::Xamarin.Forms.Platform.Tizen.FormsApplication\r
+ {\r
+ protected override void OnCreate()\r
+ {\r
+ base.OnCreate();\r
+\r
+ LoadApplication(new App());\r
+ }\r
+\r
+ static void Main(string[] args)\r
+ {\r
+ var app = new Program();\r
+ Forms.Init(app);\r
+ app.Run(args);\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <OutputType>Exe</OutputType>\r
+ <TargetFramework>tizen60</TargetFramework>\r
+ <AssemblyName>Launcher_TC_TOOL_10.Tizen</AssemblyName>\r
+ </PropertyGroup>\r
+\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+ <DebugType>portable</DebugType>\r
+ </PropertyGroup>\r
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+ <DebugType>None</DebugType>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <Folder Include="lib\" />\r
+ <Folder Include="res\" />\r
+ </ItemGroup>\r
+\r
+ \r
+ <ItemGroup>\r
+ <ProjectReference Include="..\Launcher_TC_TOOL_10\Launcher_TC_TOOL_10.csproj" />\r
+ </ItemGroup>\r
+ \r
+\r
+</Project>\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>\r
+<manifest package="org.tizen.example.Launcher_TC_TOOL_10.Tizen" version="1.0.0" api-version="5.5" xmlns="http://tizen.org/ns/packages">\r
+ <profile name="common" />\r
+ <ui-application appid="org.tizen.example.Launcher_TC_TOOL_10.Tizen" exec="Launcher_TC_TOOL_10.Tizen.dll" multiple="false" nodisplay="false" taskmanage="true" api-version="6" type="dotnet" launch_mode="single">\r
+ <label>Launcher_TC_TOOL_10.Tizen</label>\r
+ <icon>Launcher_TC_TOOL_10.Tizen.png</icon>\r
+ <metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />\r
+ <splash-screens />\r
+ </ui-application>\r
+ <shortcut-list />\r
+ <privileges />\r
+ <dependencies />\r
+ <provides-appdefined-privileges />\r
+</manifest>\r
--- /dev/null
+using System;\r
+using System.Collections.Generic;\r
+using System.Linq;\r
+using System.Text;\r
+\r
+using Xamarin.Forms;\r
+\r
+namespace Launcher_TC_TOOL_10\r
+{\r
+ public class App : Application\r
+ {\r
+ public App()\r
+ {\r
+ // The root page of your application\r
+ MainPage = new ContentPage\r
+ {\r
+ Content = new StackLayout\r
+ {\r
+ VerticalOptions = LayoutOptions.Center,\r
+ Children = {\r
+ new Label {\r
+ HorizontalTextAlignment = TextAlignment.Center,\r
+ Text = "Welcome to Xamarin Forms!"\r
+ }\r
+ }\r
+ }\r
+ };\r
+ }\r
+\r
+ protected override void OnStart()\r
+ {\r
+ // Handle when your app starts\r
+ }\r
+\r
+ protected override void OnSleep()\r
+ {\r
+ // Handle when your app sleeps\r
+ }\r
+\r
+ protected override void OnResume()\r
+ {\r
+ // Handle when your app resumes\r
+ }\r
+ }\r
+}\r
--- /dev/null
+<Project Sdk="Tizen.NET.Sdk/1.1.5">\r
+\r
+ <PropertyGroup>\r
+ <TargetFramework>netstandard2.0</TargetFramework>\r
+ </PropertyGroup>\r
+\r
+ <ItemGroup>\r
+ <PackageReference Include="Xamarin.Forms" Version="4.6.0.967" />\r
+ </ItemGroup>\r
+\r
+</Project>\r
return "PASS"
+# The Launcher_TC_PLUGIN_09 application must have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file exist.
+def TC_09():
+ sln_name = "Launcher_TC_PLUGIN_09.Tizen"
+
+ tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+ if tpk_path == None:
+ return f"FAIL : Get the tpk path for {sln_name}"
+
+ if "OK" not in app_install(f"{tpk_path}"):
+ return f"FAIL : Install the application for {tpk_path}"
+
+ pkg_id = f"org.tizen.example.Launcher_TC_PLUGIN_09.Tizen"
+
+ root_path = get_root_path(f"{pkg_id}")
+ if root_path == "None":
+ return f"FAIL : Get the root path for {pkg_id}"
+
+ if not exist(f"{root_path}/bin/._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6"):
+ return "FAIL : The ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file should exist"
+
+ return "PASS"
+
+# The Launcher_TC_PLUGIN_10 application must not have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file.
+def TC_10():
+ sln_name = "Launcher_TC_PLUGIN_10.Tizen"
+
+ tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+ if tpk_path == None:
+ return f"FAIL : Get the tpk path for {sln_name}"
+
+ if "OK" not in app_install(f"{tpk_path}"):
+ return f"FAIL : Install the application for {tpk_path}"
+
+ pkg_id = f"org.tizen.example.Launcher_TC_PLUGIN_10.Tizen"
+
+ root_path = get_root_path(f"{pkg_id}")
+ if root_path == "None":
+ return f"FAIL : Get the root path for {pkg_id}"
+
+ if exist(f"{root_path}/bin/._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6"):
+ return "FAIL : The ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file should not exist"
+
+ return "PASS"
+
# Run the test
def run():
cmd(f"root on")
cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_06.Tizen")
cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_07.Tizen")
cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_08.Tizen")
+ cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_09.Tizen")
+ cmd(f"uninstall org.tizen.example.Launcher_TC_PLUGIN_10.Tizen")
# Main entry point
def main():
else:
tc_array.append(funcMap[tc_num])
else:
- tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08]
+ tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_07, TC_08, TC_09, TC_10]
global serial
if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
funcMap = {
-'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05, 'TC_06': TC_06, 'TC_07': TC_07, 'TC_08': TC_08,
-'PLUGIN_TC_01': TC_01, 'PLUGIN_TC_02': TC_02, 'PLUGIN_TC_03': TC_03, 'PLUGIN_TC_04': TC_04,
-'PLUGIN_TC_05': TC_05, 'PLUGIN_TC_06': TC_06, 'PLUGIN_TC_07': TC_07, 'PLUGIN_TC_08': TC_08
+'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05, 'TC_06': TC_06, 'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09, 'TC_10': TC_10,
+'PLUGIN_TC_01': TC_01, 'PLUGIN_TC_02': TC_02, 'PLUGIN_TC_03': TC_03, 'PLUGIN_TC_04': TC_04, 'PLUGIN_TC_05': TC_05,
+'PLUGIN_TC_06': TC_06, 'PLUGIN_TC_07': TC_07, 'PLUGIN_TC_08': TC_08, 'PLUGIN_TC_09': TC_09, 'PLUGIN_TC_10': TC_10
}
3. The `library(.so)` with `same SHA` value must exist in the application and TLC.
4. The `library(.so)` should be a symbolic link.
5. The arch of the target and the arch of the library must match.
+* TC_09
+```
+ PASS : The Launcher_TC_PLUGIN_09 application must have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file exist.
+```
+ 1. Applications without Internet privilege must have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file.
+* TC_10
+```
+ PASS : The Launcher_TC_PLUGIN_10 application must not have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file.
+```
+ 1. Applications with Internet privilege must not have a ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file.
----
### Note
PASS : Create native image for mscorlib.dll by adding option --no-pipeline.
```
1. sh-3.2# dotnettool --ni-dll --no-pipeline --print-cmd /usr/share/dotnet.tizen/netcoreapp/mscorlib.dll
+* TC_25
+```
+ PASS : Applications that do not have Internet privilege must have ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file created.
+```
+ 1. sh-3.2# dotnettool --check-all-app-privilege
----
### Note
return "PASS"
-#def TC_25():
+# Applications that do not have Internet privilege must have ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file created.
+def TC_25():
+ sln_name = "Launcher_TC_TOOL_10.Tizen"
+
+ tpk_path = get_tpk_path(tpk_list, f"{sln_name}")
+ if tpk_path == None:
+ return f"FAIL : Get the tpk path for {sln_name}"
+
+ if "OK" not in app_install(f"{tpk_path}"):
+ return f"FAIL : Install the application for {tpk_path}"
+
+ pkg_id = f"org.tizen.example.Launcher_TC_TOOL_10.Tizen"
+
+ root_path = get_root_path(f"{pkg_id}")
+ if root_path == "None":
+ return f"FAIL : Get the root path for {pkg_id}"
+
+ if not exist(f"{root_path}/bin/._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6"):
+ return "FAIL : The ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file should exist"
+
+ cmd(f"shell mount -o remount,rw /")
+ cmd(f"shell rm {root_path}/bin/._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6")
+
+ cmd(f"shell dotnettool --check-all-app-privilege")
+ if not exist(f"{root_path}/bin/._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6"):
+ return "FAIL : The ._TIZEN_DOTNET_SYSTEM_NET_DISABLEIPV6 file should exist"
+
+ return "PASS"
+
+#def TC_26():
#dotnettool --rm-app-profile
#dotnettool --rm-all-app-profile
cmd(f"uninstall org.tizen.example.Launcher_TC_TOOL_05.Tizen")
cmd(f"uninstall org.tizen.example.Launcher_TC_TOOL_06.Tizen")
cmd(f"uninstall org.tizen.example.Launcher_TC_TOOL_07.Tizen")
+ cmd(f"uninstall org.tizen.example.Launcher_TC_TOOL_10.Tizen")
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.ni.dll")
cmd(f"shell rm {FRAMEWORK_DIR}Tizen.Log.ni.dll")
tc_array.append(funcMap[tc_num])
else:
# skip TC_07 (--r2r), TC_09 (--ibc-dir)
- tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_08, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15, TC_16, TC_17, TC_18, TC_19, TC_20, TC_21, TC_22, TC_23, TC_24]
+ tc_array = [TC_01, TC_02, TC_03, TC_04, TC_05, TC_06, TC_08, TC_10, TC_11, TC_12, TC_13, TC_14, TC_15, TC_16, TC_17, TC_18, TC_19, TC_20, TC_21, TC_22, TC_23, TC_24, TC_25]
global serial
if len(sys.argv) >= 2 and "TC_" not in sys.argv[1]:
'TC_01': TC_01, 'TC_02': TC_02, 'TC_03': TC_03, 'TC_04': TC_04, 'TC_05': TC_05, 'TC_06': TC_06,
'TC_07': TC_07, 'TC_08': TC_08, 'TC_09': TC_09, 'TC_10': TC_10, 'TC_11': TC_11, 'TC_12': TC_12,
'TC_13': TC_13, 'TC_14': TC_14, 'TC_15': TC_15, 'TC_16': TC_16, 'TC_17': TC_17, 'TC_18': TC_17_18,
-'TC_19': TC_19, 'TC_20': TC_20, 'TC_21': TC_21, 'TC_22' : TC_22, 'TC_23' : TC_23, 'TC_24' : TC_24,
+'TC_19': TC_19, 'TC_20': TC_20, 'TC_21': TC_21, 'TC_22' : TC_22, 'TC_23' : TC_23, 'TC_24' : TC_24, 'TC_25' : TC_25,
'TOOL_TC_01': TC_01, 'TOOL_TC_02': TC_02, 'TOOL_TC_03': TC_03, 'TOOL_TC_04': TC_04, 'TOOL_TC_05': TC_05, 'TOOL_TC_06': TC_06,
'TOOL_TC_07': TC_07, 'TOOL_TC_08': TC_08, 'TOOL_TC_09': TC_09, 'TOOL_TC_10': TC_10, 'TOOL_TC_11': TC_11, 'TOOL_TC_12': TC_12,
-'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15, 'TOOL_TC_16': TC_16, 'TOOL_TC_17': TC_17, 'TOOL_TC_18': TC_17_18, 'TOOL_TC_19': TC_19, 'TOOL_TC_20': TC_20, 'TOOL_TC_21': TC_21, 'TOOL_TC_22' : TC_22, 'TOOL_TC_23' : TC_23, 'TOOL_TC_24' : TC_24
+'TOOL_TC_13': TC_13, 'TOOL_TC_14': TC_14, 'TOOL_TC_15': TC_15, 'TOOL_TC_16': TC_16, 'TOOL_TC_17': TC_17, 'TOOL_TC_18': TC_17_18,
+'TOOL_TC_19': TC_19, 'TOOL_TC_20': TC_20, 'TOOL_TC_21': TC_21, 'TOOL_TC_22' : TC_22, 'TOOL_TC_23' : TC_23, 'TOOL_TC_24' : TC_24, 'TOOL_TC_25' : TC_25
}