From f3b74990a8a46f7eeb8eb2391fcd8913c332c2b3 Mon Sep 17 00:00:00 2001 From: baiwei Date: Thu, 24 Mar 2022 16:07:24 +0800 Subject: [PATCH 1/3] fix mulUser Signed-off-by: baiwei --- common/database/src/idm_file_manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/database/src/idm_file_manager.c b/common/database/src/idm_file_manager.c index a65278a..c4c5d9e 100644 --- a/common/database/src/idm_file_manager.c +++ b/common/database/src/idm_file_manager.c @@ -212,6 +212,7 @@ ResultCode UpdateFileInfo(LinkedList *userInfoList) ret = RESULT_GENERAL_ERROR; goto EXIT; } + temp = temp->next; } FileOperator *fileOperator = GetFileOperator(DEFAULT_FILE_OPERATOR); -- Gitee From 9e980c3257350250ff1dece7e686247692d70358 Mon Sep 17 00:00:00 2001 From: yky Date: Fri, 25 Mar 2022 17:06:40 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=B0=8664=E4=BD=8D=E6=95=B0=E5=A4=84?= =?UTF-8?q?=E7=90=86=E4=B8=BA=E6=8E=A9=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/database/src/idm_file_manager.c | 1 - 1 file changed, 1 deletion(-) diff --git a/common/database/src/idm_file_manager.c b/common/database/src/idm_file_manager.c index c4c5d9e..a65278a 100644 --- a/common/database/src/idm_file_manager.c +++ b/common/database/src/idm_file_manager.c @@ -212,7 +212,6 @@ ResultCode UpdateFileInfo(LinkedList *userInfoList) ret = RESULT_GENERAL_ERROR; goto EXIT; } - temp = temp->next; } FileOperator *fileOperator = GetFileOperator(DEFAULT_FILE_OPERATOR); -- Gitee From 15a7aba25f5c62ea2d3b677430e40fe74c3b6f54 Mon Sep 17 00:00:00 2001 From: yky Date: Fri, 25 Mar 2022 17:14:06 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=B7=B2=E5=B0=8664=E4=BD=8D=E6=95=B0?= =?UTF-8?q?=E5=A4=84=E7=90=86=E4=B8=BA=E6=8E=A9=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- services/src/auth_res_manager.cpp | 2 +- services/src/auth_res_pool.cpp | 2 +- services/src/call_monitor.cpp | 5 +++-- services/src/coauth_service.cpp | 2 +- services/src/coauth_stub.cpp | 8 ++++---- utils/native/include/coauth_hilog_wrapper.h | 9 +++++++++ 6 files changed, 19 insertions(+), 9 deletions(-) diff --git a/services/src/auth_res_manager.cpp b/services/src/auth_res_manager.cpp index 3e4b1fb..97c932d 100644 --- a/services/src/auth_res_manager.cpp +++ b/services/src/auth_res_manager.cpp @@ -65,7 +65,7 @@ uint64_t AuthResManager::Register(std::shared_ptr executorInfo, sptr messenger = new UserIAM::AuthResPool::ExecutorMessenger(&coAuthResPool_); callback->OnMessengerReady(messenger); - COAUTH_HILOGD(MODULE_SERVICE, "register is successfull, exeID is XXXX%{public}04" PRIx64, executorId); + COAUTH_HILOGD(MODULE_SERVICE, "register is successfull, exeID is XXXX%{public}04" PRIx64, g_mask & executorId); return executorId; } diff --git a/services/src/auth_res_pool.cpp b/services/src/auth_res_pool.cpp index b4843c0..7e12f43 100644 --- a/services/src/auth_res_pool.cpp +++ b/services/src/auth_res_pool.cpp @@ -94,7 +94,7 @@ int32_t AuthResPool::DeleteExecutorCallback(uint64_t executorID) return FAIL; } authResPool_.erase(iter); - COAUTH_HILOGI(MODULE_SERVICE, "delete executor callback XXXX%{public}" PRIx64 " success", executorID); + COAUTH_HILOGI(MODULE_SERVICE, "delete executor callback XXXX%{public}" PRIx64 " success", g_mask & executorID); return SUCCESS; } diff --git a/services/src/call_monitor.cpp b/services/src/call_monitor.cpp index eba4645..9e9fb80 100644 --- a/services/src/call_monitor.cpp +++ b/services/src/call_monitor.cpp @@ -16,6 +16,7 @@ #include "call_monitor.h" #include "inner_event.h" #include "event_runner.h" +#include namespace OHOS { namespace UserIAM { @@ -40,7 +41,7 @@ void CallMonitor::MonitorCall(int64_t waitTime, uint64_t scheduleId, Callback &t return; } std::string name = std::to_string(scheduleId); - COAUTH_HILOGI(MODULE_SERVICE, "CallMonitor MonitorCall is called, name is %{public}s", name.c_str()); + COAUTH_HILOGI(MODULE_SERVICE, "CallMonitor MonitorCall is called, name is %{public}04" PRIx64,g_mask & scheduleId); eventHandler_->PostHighPriorityTask(timeoutFun, name, waitTime); } @@ -51,7 +52,7 @@ void CallMonitor::MonitorRemoveCall(uint64_t scheduleId) return; } std::string name = std::to_string(scheduleId); - COAUTH_HILOGI(MODULE_SERVICE, "CallMonitor MonitorRemoveCall is called, name is %{public}s", name.c_str()); + COAUTH_HILOGI(MODULE_SERVICE, "CallMonitor MonitorRemoveCall is called, name is %{public}04" PRIx64,g_mask & scheduleId); eventHandler_->RemoveTask(name); } } // namespace PinAuth diff --git a/services/src/coauth_service.cpp b/services/src/coauth_service.cpp index 85237a0..3410126 100644 --- a/services/src/coauth_service.cpp +++ b/services/src/coauth_service.cpp @@ -106,7 +106,7 @@ uint64_t CoAuthService::Register(std::shared_ptr executorInfo, } uint64_t exeID = authResMgr_.Register(executorInfo, callback); - COAUTH_HILOGD(MODULE_SERVICE, "exeID is XXXX%{public}4" PRIx64, exeID); + COAUTH_HILOGD(MODULE_SERVICE, "exeID is XXXX%{public}4" PRIx64, g_mask & exeID); return exeID; } diff --git a/services/src/coauth_stub.cpp b/services/src/coauth_stub.cpp index 2488210..a7b6304 100644 --- a/services/src/coauth_stub.cpp +++ b/services/src/coauth_stub.cpp @@ -60,7 +60,7 @@ void CoAuthStub::ReadAuthExecutor(AuthResPool::AuthExecutor &executorInfo, Messa uint64_t authAbility = data.ReadUint64(); executorInfo.SetAuthAbility(authAbility); - COAUTH_HILOGD(MODULE_SERVICE, "ReadInt64,authAbility:%{public}" PRIu64, authAbility); + COAUTH_HILOGD(MODULE_SERVICE, "ReadInt64,authAbility:%{public}4" PRIu64, g_mask & authAbility); int32_t executorSecLevel = data.ReadInt32(); executorInfo.SetExecutorSecLevel(static_cast(executorSecLevel)); @@ -118,10 +118,10 @@ int32_t CoAuthStub::BeginScheduleStub(MessageParcel& data, MessageParcel& reply) authInfo.SetPkgName(GetPkgName); uint64_t GetCallerUid = data.ReadUint64(); authInfo.SetCallerUid(GetCallerUid); - COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64,GetCallerUid:%{public}" PRIu64, GetCallerUid); + COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64,GetCallerUid:%{public}4" PRIu64, g_mask & GetCallerUid); uint64_t scheduleId = data.ReadUint64(); - COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64,scheduleId:%{public}" PRIu64, scheduleId); + COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64,scheduleId:%{public}4" PRIu64, g_mask & scheduleId); sptr callback = iface_cast(data.ReadRemoteObject()); if (callback == nullptr) { @@ -139,7 +139,7 @@ int32_t CoAuthStub::CancelStub(MessageParcel& data, MessageParcel& reply) COAUTH_HILOGI(MODULE_SERVICE, "CoAuthStub: CancelStub start"); uint64_t scheduleId = data.ReadUint64(); - COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64 scheduleId:%{public}" PRIu64, scheduleId); + COAUTH_HILOGD(MODULE_SERVICE, "ReadUint64 scheduleId:%{public}4" PRIu64, g_mask & scheduleId); int ret = Cancel(scheduleId); if (!reply.WriteInt32(ret)) { diff --git a/utils/native/include/coauth_hilog_wrapper.h b/utils/native/include/coauth_hilog_wrapper.h index 9524fa7..ddf11ce 100644 --- a/utils/native/include/coauth_hilog_wrapper.h +++ b/utils/native/include/coauth_hilog_wrapper.h @@ -18,6 +18,7 @@ #define CONFIG_HILOG #ifdef CONFIG_HILOG + #include "hilog/log.h" namespace OHOS { namespace UserIAM { @@ -78,6 +79,8 @@ static constexpr OHOS::HiviewDFX::HiLogLabel COAUTH_LABEL[COAUTH_MODULE_BUTT] = #define COAUTH_HILOGW(module, ...) (void)OHOS::HiviewDFX::HiLog::Warn(COAUTH_LABEL[module], FORMATTED(__VA_ARGS__)) #define COAUTH_HILOGI(module, ...) (void)OHOS::HiviewDFX::HiLog::Info(COAUTH_LABEL[module], FORMATTED(__VA_ARGS__)) #define COAUTH_HILOGD(module, ...) (void)OHOS::HiviewDFX::HiLog::Debug(COAUTH_LABEL[module], FORMATTED(__VA_ARGS__)) + +const uint64_t g_mask = 0x0000FFFF; } // namespace UserIAM } // namespace OHOS @@ -89,6 +92,12 @@ static constexpr OHOS::HiviewDFX::HiLogLabel COAUTH_LABEL[COAUTH_MODULE_BUTT] = #define COAUTH_HILOGI(...) #define COAUTH_HILOGD(...) +namespace OHOS { +namespace UserIAM { +const uint64_t g_mask = 0x0000FFFF; +} // namespace UserIAM +} // namespace OHOS + #endif // CONFIG_HILOG #endif // COAUTH_HILOG_WRAPPER_H -- Gitee