diff --git a/services/include/updater/updater_const.h b/services/include/updater/updater_const.h index 38cb92de17553a5f99e9df783305f01c24182bec..6f9176d7e86f7c7ea6defa565726f76b11a0e35e 100644 --- a/services/include/updater/updater_const.h +++ b/services/include/updater/updater_const.h @@ -31,6 +31,7 @@ constexpr const char *SYS_INSTALLER_LOG = "/data/updater/log/sys_installer.log"; constexpr const char *UPDATER_STAGE_LOG = "/data/updater/log/updater_stage_log"; constexpr const char *UPDATER_LOG_FILE = "updater_log"; constexpr const char *UPDATER_STAGE_FILE = "updater_stage_log"; +constexpr const char *SYS_INSTALLER_PATH = "/mnt/sys_installer"; constexpr const char *UPDATER_PATH = "/data/updater"; constexpr const char *UPDATER_LOCALE_FILE = "locale"; constexpr const char *UPDATER_RESULT_FILE = "updater_result"; diff --git a/services/updater.cpp b/services/updater.cpp index fc32733c9918a213e33ec110954b002da737a884..c8c00ae73616bd18ca34009dd1b339a99531e79e 100644 --- a/services/updater.cpp +++ b/services/updater.cpp @@ -279,12 +279,6 @@ __attribute__((weak)) bool PreStartBinaryEntry([[maybe_unused]] const std::strin return true; } -__attribute__((weak)) bool EnableCodeSignForBinary([[maybe_unused]] const std::string &fullPath) -{ - LOG(INFO) << "no need to enable code sign for binary"; - return true; -} - float g_progressRatio = 1.0; void SetTotalProgressRatio(float ratio) @@ -728,11 +722,6 @@ UpdaterStatus StartUpdaterProc(PkgManager::PkgManagerPtr pkgManager, UpdaterPara #ifdef WITH_SELINUX Restorecon(fullPath.c_str()); #endif // WITH_SELINUX - if (!EnableCodeSignForBinary(fullPath)) { - LOG(ERROR) << "Failed to sign for binary"; - UPDATER_LAST_WORD(UPDATE_ERROR, "Failed to sign for binary"); - return UPDATE_ERROR; - } pid_t pid = fork(); if (pid < 0) { ERROR_CODE(CODE_FORK_FAIL); @@ -765,6 +754,6 @@ std::string GetWorkPath() return G_WORK_PATH; } - return std::string(UPDATER_PATH) + "/"; + return std::string(SYS_INSTALLER_PATH) + "/"; } } // namespace Updater diff --git a/services/updater_main.h b/services/updater_main.h index c8a430c944f91a586c0227655c5ecdc39b80bd0f..bd1cc22f48641b0a9651af6706ae72215292bc60 100644 --- a/services/updater_main.h +++ b/services/updater_main.h @@ -94,7 +94,6 @@ UpdaterStatus NotifyActionResult(UpdaterParams &upParams, UpdaterStatus &status, const std::vector ¬ifyActionVec); UpdaterStatus UpdateSubPkg(UpdaterParams &upParams); void NotifyPreCheck(UpdaterStatus &status, UpdaterParams &upParams); -bool EnableCodeSignForBinary([[maybe_unused]] const std::string &fullPath); #ifdef __cplusplus #if __cplusplus }