-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();
- }
- }
-}