From b823dcd7701e74cdd5f73967c23c4d609fcf4dc1 Mon Sep 17 00:00:00 2001 From: lixiyuan Date: Fri, 11 Oct 2024 21:54:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=8C=E5=8D=87=E5=8D=95=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E8=A7=A3=E5=AF=86=E5=90=8E=E9=87=8D=E5=90=AFel1=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E4=B8=8Bneed=5Frestore=E6=A0=87=E8=AF=86=E8=A2=AB?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AF=BC=E8=87=B4=E5=BA=94=E7=94=A8=E5=88=86?= =?UTF-8?q?=E8=BA=AB=E6=97=A0=E6=B3=95=E8=A7=A3=E5=AF=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lixiyuan --- services/storage_daemon/ipc/src/storage_daemon.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/services/storage_daemon/ipc/src/storage_daemon.cpp b/services/storage_daemon/ipc/src/storage_daemon.cpp index e97157c4..7d5e7c29 100644 --- a/services/storage_daemon/ipc/src/storage_daemon.cpp +++ b/services/storage_daemon/ipc/src/storage_daemon.cpp @@ -497,6 +497,10 @@ int32_t StorageDaemon::StopUser(int32_t userId) int32_t StorageDaemon::CompleteAddUser(int32_t userId) { LOGI("CompleteAddUser enter."); + if (userId >= StorageService::START_APP_CLONE_USER_ID && userId < StorageService::MAX_APP_CLONE_USER_ID) { + LOGE("User %{public}d is app clone user, do not delete el1 need_restore.", userId); + return E_OK; + } #ifdef USER_CRYPTO_MIGRATE_KEY std::string elNeedRestorePath = GetNeedRestoreFilePathByType(userId, EL1_KEY); if (elNeedRestorePath.empty() || !std::filesystem::exists(elNeedRestorePath)) {