/base/location/frameworks/location_common/common/source/ |
D | common_utils.cpp | 36 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 …]
|
D | app_identity.cpp | 29 AppIdentity::AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint32_t firstTokenId) in AppIdentity() argument 30 : uid_(uid), pid_(pid), tokenId_(tokenId), firstTokenId_(firstTokenId) in AppIdentity()
|
/base/location/interfaces/inner_api/include/ |
D | app_identity.h | 26 explicit AppIdentity(pid_t uid, pid_t pid, uint32_t tokenId, uint32_t firstTokenId); 64 inline void SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument 66 firstTokenId_ = firstTokenId; in SetFirstTokenId()
|
D | common_utils.h | 143 static bool CheckLocationPermission(uint32_t tokenId, uint32_t firstTokenId); 144 static bool CheckApproximatelyPermission(uint32_t tokenId, uint32_t firstTokenId); 145 static bool CheckBackgroundPermission(uint32_t tokenId, uint32_t firstTokenId); 146 …tatic bool CheckPermission(const std::string &permission, uint32_t tokenId, uint32_t firstTokenId); 147 static bool CheckSecureSettings(uint32_t tokenId, uint32_t firstTokenId); 155 static int GetPermissionLevel(uint32_t tokenId, uint32_t firstTokenId);
|
/base/location/services/location_locator/locator/source/ |
D | report_manager.cpp | 96 uint32_t firstTokenId = request->GetFirstTokenId(); in ProcessRequestForReport() local 97 std::unique_ptr<Location> finalLocation = GetPermittedLocation(tokenId, firstTokenId, location); in ProcessRequestForReport() 116 …::unique_ptr<Location> ReportManager::GetPermittedLocation(uint32_t tokenId, uint32_t firstTokenId, in GetPermittedLocation() argument 124 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation() 125 CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in GetPermittedLocation() 127 } else if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in GetPermittedLocation() 128 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in GetPermittedLocation()
|
D | request.cpp | 92 void Request::SetFirstTokenId(uint32_t firstTokenId) in SetFirstTokenId() argument 94 this->firstTokenId_ = firstTokenId; in SetFirstTokenId()
|
D | locator_background_proxy.cpp | 248 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()
|
D | request_manager.cpp | 419 uint32_t firstTokenId = request->GetFirstTokenId(); in AddRequestToWorkRecord() local 421 if (!CommonUtils::CheckLocationPermission(tokenId, firstTokenId) && in AddRequestToWorkRecord() 422 !CommonUtils::CheckApproximatelyPermission(tokenId, firstTokenId)) { in AddRequestToWorkRecord()
|
/base/location/test/fuzztest/locator/reportmanager_fuzzer/ |
D | reportmanager_fuzzer.cpp | 52 uint32_t firstTokenId = data[index++]; in ReportManagerFuzzerTest() local 53 reportManager->GetPermittedLocation(tokenId, firstTokenId, location); in ReportManagerFuzzerTest()
|
/base/useriam/user_auth_framework/services/ipc/src/ |
D | ipc_common.cpp | 150 uint32_t firstTokenId = stub.GetFirstTokenID(); in CheckDirectCallerAndFirstCallerIfSet() local 153 …if ((firstTokenId != 0 && AccessTokenKit::VerifyAccessToken(firstTokenId, permission) != RET_SUCCE… in CheckDirectCallerAndFirstCallerIfSet()
|
/base/location/test/location_common/source/ |
D | common_utils_test.cpp | 183 uint32_t firstTokenId = 0; variable 185 EXPECT_EQ(false, CommonUtils::CheckLocationPermission(invalidTokenId, firstTokenId)); 186 EXPECT_EQ(false, CommonUtils::CheckApproximatelyPermission(invalidTokenId, firstTokenId)); 187 EXPECT_EQ(false, CommonUtils::CheckBackgroundPermission(invalidTokenId, firstTokenId)); 188 EXPECT_EQ(false, CommonUtils::CheckSecureSettings(invalidTokenId, firstTokenId));
|
/base/location/services/location_locator/locator/include/ |
D | report_manager.h | 38 std::unique_ptr<Location> GetPermittedLocation(uint32_t tokenId, uint32_t firstTokenId,
|
D | request.h | 52 void SetFirstTokenId(uint32_t firstTokenId);
|