From b404f7d2aac2cb11bad9de1010d796a1d9a216c3 Mon Sep 17 00:00:00 2001 From: zhanglei Date: Tue, 3 Jun 2025 21:35:31 +0800 Subject: [PATCH] update Signed-off-by: zhanglei --- .../include/trustprofilemanager/trust_profile_manager.h | 2 +- .../src/trustprofilemanager/trust_profile_manager.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/core/include/trustprofilemanager/trust_profile_manager.h b/services/core/include/trustprofilemanager/trust_profile_manager.h index 30801df3..a7ff0eb0 100644 --- a/services/core/include/trustprofilemanager/trust_profile_manager.h +++ b/services/core/include/trustprofilemanager/trust_profile_manager.h @@ -128,7 +128,7 @@ private: int32_t NotifyCheck(const AccessControlProfile& profile, const AccessControlProfile& oldProfile); void RemoveLnnAcl(std::vector& profiles); bool IsLnnAcl(const AccessControlProfile& aclProfile); - bool IsAcerCreIdExistToAceeTable(); + bool IsAceeCreIdExistToAceeTable(); int32_t AddAceeCreIdColumnToAceeTable(); private: diff --git a/services/core/src/trustprofilemanager/trust_profile_manager.cpp b/services/core/src/trustprofilemanager/trust_profile_manager.cpp index 395048f9..16f3a208 100644 --- a/services/core/src/trustprofilemanager/trust_profile_manager.cpp +++ b/services/core/src/trustprofilemanager/trust_profile_manager.cpp @@ -50,7 +50,7 @@ int32_t TrustProfileManager::Init() } this->CreateTable(); this->CreateUniqueIndex(); - if (IsAcerCreIdExistToAceeTable() && AddAceeCreIdColumnToAceeTable() != DP_SUCCESS) { + if (!IsAceeCreIdExistToAceeTable() && AddAceeCreIdColumnToAceeTable() != DP_SUCCESS) { HILOGE("acee table add aceeCreId failed"); return DP_CREATE_TABLE_FAIL; } @@ -2183,7 +2183,7 @@ bool TrustProfileManager::IsLnnAcl(const AccessControlProfile& aclProfile) return false; } -bool TrustProfileManager::IsAcerCreIdExistToAceeTable() +bool TrustProfileManager::IsAceeCreIdExistToAceeTable() { std::shared_ptr resultSet = GetResultSet(PRAGMA_ACCESSEE_TABLE, std::vector{}); if (resultSet == nullptr) { @@ -2195,8 +2195,8 @@ bool TrustProfileManager::IsAcerCreIdExistToAceeTable() std::string columnName; resultSet->GetColumnIndex(NAME, columnIndex); resultSet->GetString(columnIndex, columnName); - if (columnName == ACCESSER_CREDENTIAL_ID) { - HILOGE("acerCreId exist to acee_table"); + if (columnName == ACCESSEE_CREDENTIAL_ID) { + HILOGE("aceeCreId exist to acee_table"); return true; } } -- Gitee