Signed-off-by: lwk <1076278852@qq.com>
This commit is contained in:
lwk
2022-03-16 19:24:24 +08:00
parent c805ea83b8
commit 21f28f401c
3 changed files with 11 additions and 5 deletions
+9 -3
View File
@@ -29,11 +29,17 @@ uint64_t AuthResManager::Register(std::shared_ptr<ResAuthExecutor> executorInfo,
}
ExecutorInfo info;
std::vector<uint8_t> publicKey;
executorInfo->GetAuthType(info.authType);
AuthType authType;
ExecutorSecureLevel esl;
ExecutorType exeType;
executorInfo->GetAuthType(authType);
executorInfo->GetAuthAbility(info.authAbility);
executorInfo->GetExecutorSecLevel(info.esl);
executorInfo->GetExecutorType(info.executorType);
executorInfo->GetExecutorSecLevel(esl);
executorInfo->GetExecutorType(exeType);
executorInfo->GetPublicKey(publicKey);
info.authType = authType;
info.esl = esl;
info.executorType = exeType;
if (publicKey.size() > PUBLIC_KEY_LEN) {
COAUTH_HILOGE(MODULE_SERVICE, "publicKey length too long");
return INVALID_EXECUTOR_ID;
+1 -1
View File
@@ -135,7 +135,7 @@ int32_t AuthResPool::GetScheduleCount(uint64_t scheduleId, uint64_t &scheduleCou
}
scheduleCount = iter->second->executorNum;
COAUTH_HILOGD(MODULE_SERVICE, "get schedule count success");
resultCode = SUCCESS;
return SUCCESS;
}
int32_t AuthResPool::DeleteScheduleCallback(uint64_t scheduleId)
+1 -1
View File
@@ -46,7 +46,7 @@ void CoAuthManager::CoAuthHandle(uint64_t scheduleId, AuthInfo &authInfo, sptr<I
return callback->OnFinish(FAIL, scheduleToken);
}
sptr<IRemoteObject::DeathRecipient> dr =
new (std::noboolalpha) ResICoAuthCallbackDeathRecipient(scheduleId, this);
new (std::nothrow) ResICoAuthCallbackDeathRecipient(scheduleId, this);
if (dr == nullptr) {
COAUTH_HILOGE(MODULE_SERVICE, "dr is nullptr.");
return callback->OnFinish(FAIL, scheduleToken);