#include "tpk/tpk_installer.h"
#include <common/app_installer.h>
+#include <common/privileges.h>
#include <common/step/backup/step_backup_icons.h>
#include <common/step/backup/step_backup_manifest.h>
#include <common/step/backup/step_copy_backup.h>
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::filesystem::StepAcquireExternalStorage>(false);
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::security::StepCheckOldCertificate>();
AddStep<ci::configuration::StepParseManifest>(
AddStep<ci::configuration::StepConfigure>(pkgmgr_);
AddStep<tpk::configuration::StepCheckReinstallManifest>();
AddStep<ci::configuration::StepParseManifest>(
- ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
- ci::configuration::StepParseManifest::StoreLocation::NORMAL);
+ ci::configuration::StepParseManifest::ManifestLocation::PACKAGE,
+ ci::configuration::StepParseManifest::StoreLocation::NORMAL);
AddStep<ci::configuration::StepParsePreload>();
AddStep<ci::pkgmgr::StepCheckRestriction>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::security::StepCheckOldCertificate>();
AddStep<ci::configuration::StepParseManifest>(
- ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
- ci::configuration::StepParseManifest::StoreLocation::BACKUP);
+ ci::configuration::StepParseManifest::ManifestLocation::INSTALLED,
+ ci::configuration::StepParseManifest::StoreLocation::BACKUP);
AddStep<ci::configuration::StepBlockCrossUpdate>();
AddStep<ci::pkgmgr::StepKillApps>();
AddStep<ci::backup::StepBackupManifest>();
AddStep<ci::filesystem::StepDisableExternalMount>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::security::StepCheckOldCertificate>();
AddStep<ci::configuration::StepBlockCrossUpdate>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::security::StepRollbackInstallationSecurity>();
AddStep<ci::filesystem::StepRemoveGlobalAppSymlinks>();
AddStep<ci::configuration::StepCheckTizenVersion>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<ci::security::StepCheckOldCertificate>();
AddStep<ci::configuration::StepParseManifest>(
AddStep<tpk::pkgmgr::StepManifestAdjustment>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<tpk::filesystem::StepCreateSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
AddStep<tpk::pkgmgr::StepManifestAdjustment>();
AddStep<ci::security::StepCheckSignature>();
AddStep<tpk::configuration::StepAdjustInstallLocation>();
- AddStep<ci::security::StepPrivilegeCompatibility>();
+ AddStep<ci::security::StepPrivilegeCompatibility>(
+ ci::security::StepPrivilegeCompatibility::InternalPrivType::TPK);
AddStep<tpk::security::StepCheckTpkBackgroundCategory>();
AddStep<tpk::filesystem::StepCreateSymbolicLink>();
AddStep<tpk::filesystem::StepTpkPatchIcons>();
ASSERT_TRUE(runner.Run());
manifest_x* m = runner.GetManifest();
ASSERT_NE(m, nullptr);
- auto privileges = GListRange<const char*>(m->privileges);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
ASSERT_EQ(Size(&privileges), 0);
}
ASSERT_TRUE(runner.Run());
manifest_x* m = runner.GetManifest();
ASSERT_NE(m, nullptr);
- auto privileges = GListRange<char*>(m->privileges);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
ASSERT_EQ(Size(&privileges), 0);
}
ASSERT_TRUE(runner.Run());
manifest_x* m = runner.GetManifest();
ASSERT_NE(m, nullptr);
- auto privileges = GListRange<char*>(m->privileges);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
ASSERT_EQ(Size(&privileges), 1);
- ASSERT_CSTR_EQ(*(privileges.begin()),
+ ASSERT_CSTR_EQ((*privileges.begin())->value,
"http://tizen.org/privilege/application.admin");
}
ASSERT_TRUE(runner.Run());
manifest_x* m = runner.GetManifest();
ASSERT_NE(m, nullptr);
- auto privileges = GListRange<char*>(m->privileges);
+ auto privileges = GListRange<privilege_x*>(m->privileges);
ASSERT_EQ(Size(&privileges), 3);
- ASSERT_CSTR_EQ(*(privileges.begin()),
+ ASSERT_CSTR_EQ(((*privileges.begin()))->value,
"http://tizen.org/privilege/account.read");
- ASSERT_CSTR_EQ(*(++privileges.begin()),
+ ASSERT_CSTR_EQ(((*++privileges.begin()))->value,
"http://tizen.org/privilege/application.admin");
- ASSERT_CSTR_EQ(*(++++privileges.begin()),
+ ASSERT_CSTR_EQ(((*++++privileges.begin())->value),
"http://tizen.org/privilege/appmanager.launch");
}