Home
last modified time | relevance | path

Searched refs:firstTokenId (Results 1 – 13 of 13) sorted by relevance

/base/location/frameworks/location_common/common/source/
Dcommon_utils.cpp36 bool CommonUtils::CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckLocationPermission() argument
38 return CheckPermission(ACCESS_LOCATION, tokenId, firstTokenId); in CheckLocationPermission()
63 bool CommonUtils::CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckBackgroundPermission() argument
65 return CheckPermission(ACCESS_BACKGROUND_LOCATION, tokenId, firstTokenId); in CheckBackgroundPermission()
68 bool CommonUtils::CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId) in CheckApproximatelyPermission() argument
70 return CheckPermission(ACCESS_APPROXIMATELY_LOCATION, tokenId, firstTokenId); in CheckApproximatelyPermission()
73 bool CommonUtils::CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId) in CheckSecureSettings() argument
75 return CheckPermission(MANAGE_SECURE_SETTINGS, tokenId, firstTokenId); in CheckSecureSettings()
88 int CommonUtils::GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId) in GetPermissionLevel() argument
91 if (CheckPermission(ACCESS_APPROXIMATELY_LOCATION, tokenId, firstTokenId) && in GetPermissionLevel()
[all …]
Dapp_identity.cpp30 …ity::AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint64_t tokenIdEx, uint32_t firstTokenId) in AppIdentity() argument
31 : uid_(uid), pid_(pid), tokenId_(tokenId), tokenIdEx_(tokenIdEx), firstTokenId_(firstTokenId) in AppIdentity()
/base/location/interfaces/inner_api/include/
Dapp_identity.h26 …cit AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint64_t tokenIdEx, uint32_t firstTokenId);
74 inline void SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument
76 firstTokenId_ = firstTokenId; in SetFirstTokenId()
Dcommon_utils.h166 static bool CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId);
167 static bool CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId);
168 static bool CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId);
169 …tatic bool CheckPermission(const std::string &permission, uint32_t tokenId, uint32_t firstTokenId);
170 static bool CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId);
178 static int GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId);
/base/location/test/fuzztest/locator/reportmanager_fuzzer/
Dreportmanager_fuzzer.cpp53 uint32_t firstTokenId = data[index++]; in ReportManagerFuzzerTest() local
54 reportManager->GetPermittedLocation(uid, tokenId, firstTokenId, location); in ReportManagerFuzzerTest()
/base/location/services/location_locator/locator/source/
Dreport_manager.cpp115 …r<Location> ReportManager::GetPermittedLocation(pid_t uid, uint32_t tokenId, uint32_t firstTokenId, in GetPermittedLocation() argument
127 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation()
128 CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in GetPermittedLocation()
130 } else if ((!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation()
131 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) || in GetPermittedLocation()
133 !CommonUtils::CheckBackgroundPermission(tokenId, firstTokenId))) { in GetPermittedLocation()
Drequest.cpp92 void Request::SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument
94 this->firstTokenId_ = firstTokenId; in SetFirstTokenId()
Dlocator_background_proxy.cpp248 uint32_t firstTokenId = request->GetFirstTokenId(); in CheckPermission() local
249 return ((CommonUtils::CheckLocationPermission(tokenId, firstTokenId) || in CheckPermission()
250 CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) && in CheckPermission()
251 CommonUtils::CheckBackgroundPermission(tokenId, firstTokenId)); in CheckPermission()
Drequest_manager.cpp410 uint32_t firstTokenId = request->GetFirstTokenId(); in AddRequestToWorkRecord() local
412 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in AddRequestToWorkRecord()
413 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in AddRequestToWorkRecord()
/base/useriam/user_auth_framework/services/ipc/src/
Dipc_common.cpp165 uint32_t firstTokenId = stub.GetFirstTokenID(); in CheckDirectCallerAndFirstCallerIfSet() local
168 …if ((firstTokenId != 0 && AccessTokenKit::VerifyAccessToken(firstTokenId, permission) != RET_SUCCE… in CheckDirectCallerAndFirstCallerIfSet()
/base/location/test/location_common/source/
Dcommon_utils_test.cpp207 uint32_t firstTokenId = 0; variable
209 EXPECT_EQ(false, CommonUtils::CheckLocationPermission(invalidTokenId, firstTokenId));
210 EXPECT_EQ(false, CommonUtils::CheckApproximatelyPermission(invalidTokenId, firstTokenId));
211 EXPECT_EQ(false, CommonUtils::CheckBackgroundPermission(invalidTokenId, firstTokenId));
212 EXPECT_EQ(false, CommonUtils::CheckSecureSettings(invalidTokenId, firstTokenId));
/base/location/services/location_locator/locator/include/
Dreport_manager.h38 … std::unique_ptr<Location> GetPermittedLocation(pid_t uid, uint32_t tokenId, uint32_t firstTokenId,
Drequest.h52 void SetFirstTokenId(uint32_t firstTokenId);