tokenId敏感日志信息整改和bundleMgr判空检验

Signed-off-by: liusensen <liusen43@huawei.com>
This commit is contained in:
liusensen 2024-08-08 16:42:47 +08:00
parent 7722a4900f
commit 25e85b5f10
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ bool Permission::IsSystemServiceCalling(bool needPrintLog, bool isLocalSysCallin
const auto flag = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(tokenId);
if (flag == Security::AccessToken::ATokenTypeEnum::TOKEN_NATIVE ||
flag == Security::AccessToken::ATokenTypeEnum::TOKEN_SHELL) {
TLOGD(WmsLogTag::DEFAULT, "system service calling, tokenId: %{private}}u, flag: %{public}u", tokenId, flag);
TLOGD(WmsLogTag::DEFAULT, "system service calling, tokenId: %{private}u, flag: %{public}u", tokenId, flag);
return true;
}
if (needPrintLog) {

View File

@ -113,7 +113,7 @@ bool SessionPermission::IsSACalling()
const auto tokenId = IPCSkeleton::GetCallingTokenID();
const auto flag = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(tokenId);
if (flag == Security::AccessToken::ATokenTypeEnum::TOKEN_NATIVE) {
TLOGE(WmsLogTag::DEFAULT, "SA called, tokenId:%{private}u, flag:%{public}u", tokenId, flag);
TLOGW(WmsLogTag::DEFAULT, "SA called, tokenId:%{private}u, flag:%{public}u", tokenId, flag);
return true;
}
TLOGI(WmsLogTag::DEFAULT, "Not SA called, tokenId:%{private}u, flag:%{public}u", tokenId, flag);