!1365 双升单分身用户解密再重启解密失败

Merge pull request !1365 from lixiyuan/master
This commit is contained in:
openharmony_ci 2024-10-12 01:21:49 +00:00 committed by Gitee
commit def19436e2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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)) {