/base/security/access_token/interfaces/innerkits/privacy/src/ |
D | privacy_kit.cpp | 34 …t32_t PrivacyKit::AddPermissionUsedRecord(AccessTokenID tokenID, const std::string& permissionName, in AddPermissionUsedRecord() argument 38 tokenID, permissionName.c_str()); in AddPermissionUsedRecord() 39 …!DataValidator::IsTokenIDValid(tokenID) || !DataValidator::IsPermissionNameValid(permissionName) || in AddPermissionUsedRecord() 45 tokenID, permissionName, successCount, failCount, asyncMode); in AddPermissionUsedRecord() 48 int32_t PrivacyKit::StartUsingPermission(AccessTokenID tokenID, const std::string& permissionName) in StartUsingPermission() argument 51 tokenID, permissionName.c_str()); in StartUsingPermission() 52 …!DataValidator::IsTokenIDValid(tokenID) || !DataValidator::IsPermissionNameValid(permissionName)) { in StartUsingPermission() 56 return PrivacyManagerClient::GetInstance().StartUsingPermission(tokenID, permissionName); in StartUsingPermission() 59 int32_t PrivacyKit::StartUsingPermission(AccessTokenID tokenID, const std::string& permissionName, in StartUsingPermission() argument 63 tokenID, permissionName.c_str()); in StartUsingPermission() [all …]
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/permission/ |
D | permission_manager.cpp | 123 if (!PermissionDefinitionCache::GetInstance().HasDefinition(perm.permissionName)) { in AddDefPermissions() 145 …t PermissionManager::VerifyHapAccessToken(AccessTokenID tokenID, const std::string& permissionName) in VerifyHapAccessToken() argument 159 return permPolicySet->VerifyPermissionStatus(permissionName); in VerifyHapAccessToken() 162 …ermissionManager::VerifyNativeAccessToken(AccessTokenID tokenID, const std::string& permissionName) in VerifyNativeAccessToken() argument 181 …enInfoPtr->IsRemote() && !PermissionDefinitionCache::GetInstance().HasDefinition(permissionName)) { in VerifyNativeAccessToken() 183 LABEL, "no definition for permission: %{public}s!", permissionName.c_str()); in VerifyNativeAccessToken() 193 return permPolicySet->VerifyPermissionStatus(permissionName); in VerifyNativeAccessToken() 196 int PermissionManager::VerifyAccessToken(AccessTokenID tokenID, const std::string& permissionName) in VerifyAccessToken() argument 201 … static_cast<AccessTokenID>(IPCSkeleton::GetCallingTokenID()), "PERMISSION_NAME", permissionName); in VerifyAccessToken() 206 if (!PermissionValidator::IsPermissionNameValid(permissionName)) { in VerifyAccessToken() [all …]
|
D | permission_definition_cache.cpp | 48 auto it = permissionDefinitionMap_.find(info.permissionName); in Insert() 51 info.permissionName.c_str()); in Insert() 54 permissionDefinitionMap_[info.permissionName].permDef = info; in Insert() 55 permissionDefinitionMap_[info.permissionName].tokenId = tokenId; in Insert() 62 permissionDefinitionMap_[info.permissionName].permDef = info; in Update() 63 permissionDefinitionMap_[info.permissionName].tokenId = tokenId; in Update() 80 int PermissionDefinitionCache::FindByPermissionName(const std::string& permissionName, PermissionDe… in FindByPermissionName() argument 83 auto it = permissionDefinitionMap_.find(permissionName); in FindByPermissionName() 86 permissionName.c_str()); in FindByPermissionName() 93 bool PermissionDefinitionCache::IsSystemGrantedPermission(const std::string& permissionName) in IsSystemGrantedPermission() argument [all …]
|
D | dlp_permission_set_manager.cpp | 50 auto it = dlpPermissionModeMap_.find(iter->permissionName); in ProcessDlpPermInfos() 54 iter->permissionName.c_str(), iter->dlpMode); in ProcessDlpPermInfos() 57 dlpPermissionModeMap_[iter->permissionName] = iter->dlpMode; in ProcessDlpPermInfos() 61 int32_t DlpPermissionSetManager::GetPermDlpMode(const std::string& permissionName) in GetPermDlpMode() argument 63 auto it = dlpPermissionModeMap_.find(permissionName); in GetPermDlpMode() 66 permissionName.c_str()); in GetPermDlpMode() 69 return dlpPermissionModeMap_[permissionName]; in GetPermDlpMode() 80 int32_t dlpMode = GetPermDlpMode(iter->permissionName); in UpdatePermStateWithDlpInfo()
|
D | permission_policy_set.cpp | 70 return permStateNew.permissionName == permStateOld.permissionName; in Update() 112 if (state.permissionName == iter->permissionName) { in MergePermissionStateFull() 175 int PermissionPolicySet::VerifyPermissionStatus(const std::string& permissionName) in VerifyPermissionStatus() argument 179 if (perm.permissionName == permissionName) { in VerifyPermissionStatus() 189 [permissionName](const auto& permission) { return permission == permissionName; })) { in VerifyPermissionStatus() 206 int PermissionPolicySet::QueryPermissionFlag(const std::string& permissionName, int& flag) in QueryPermissionFlag() argument 210 if (perm.permissionName == permissionName) { in QueryPermissionFlag() 230 int32_t PermissionPolicySet::UpdatePermStateList(const std::string& permissionName, bool isGranted,… in UpdatePermStateList() argument 234 [permissionName](const PermissionStateFull& permState) { in UpdatePermStateList() 235 return permissionName == permState.permissionName; in UpdatePermStateList() [all …]
|
/base/telephony/core_service/utils/common/src/ |
D | telephony_permission.cpp | 64 bool TelephonyPermission::CheckPermission(const std::string &permissionName) in CheckPermission() argument 66 if (permissionName.empty()) { in CheckPermission() 73 int result = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckPermission() 75 if (permissionName == Permission::ANSWER_CALL || permissionName == Permission::READ_CALL_LOG in CheckPermission() 76 … || permissionName == Permission::READ_CONTACTS || permissionName == Permission::WRITE_CONTACTS in CheckPermission() 77 || permissionName == Permission::SEND_MESSAGES) { in CheckPermission() 82 …int32_t ret = PrivacyKit::AddPermissionUsedRecord(callerToken, permissionName, successCount, failC… in CheckPermission() 86 permissionName.c_str(), successCount, failCount); in CheckPermission() 93 permissionName.c_str(), callerToken, tokenType); in CheckPermission()
|
/base/security/permission_lite/services/pms/include/ |
D | pms.h | 31 int IsPermissionValid(const char *permissionName); 33 int IsPermissionRestricted(const char *permissionName); 41 int CheckPermissionStat(int uid, const char *permissionName); 51 int UpdatePermissionFlags(const char *identifier, const char *permissionName, const int flags); 53 int GrantRuntimePermission(int uid, const char *permissionName); 55 int RevokeRuntimePermission(int uid, const char *permissionName);
|
D | pms_inner.h | 31 int (*CheckPermission)(int uid, const char *permissionName); 35 int (*GrantRuntimePermission)(int uid, const char *permissionName); 36 int (*RevokeRuntimePermission)(int uid, const char *permissionName); 37 int (*UpdatePermissionFlags)(const char *identifier, const char *permissionName, int flags);
|
/base/security/permission_lite/interfaces/kits/ |
D | pms_interface.h | 63 int CheckPermission(int uid, const char *permissionName); 75 int CheckSelfPermission(const char *permissionName); 135 int UpdatePermissionFlags(const char *identifier, const char *permissionName, const int flags); 152 int GrantRuntimePermission(int uid, const char *permissionName); 169 int RevokeRuntimePermission(int uid, const char *permissionName);
|
/base/sensors/sensor/utils/common/src/ |
D | permission_util.cpp | 47 std::string permissionName = sensorPermissions_[sensorTypeId]; in CheckSensorPermission() local 48 int32_t ret = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckSensorPermission() 49 if ((permissionName == ACTIVITY_MOTION_PERMISSION) in CheckSensorPermission() 50 || (permissionName == READ_HEALTH_DATA_PERMISSION)) { in CheckSensorPermission() 51 AddPermissionRecord(callerToken, permissionName, (ret == PERMISSION_GRANTED)); in CheckSensorPermission() 56 void PermissionUtil::AddPermissionRecord(AccessTokenID tokenID, const std::string& permissionName, … in AddPermissionRecord() argument 60 …int32_t ret = PrivacyKit::AddPermissionUsedRecord(tokenID, permissionName, successCount, failCount… in AddPermissionRecord() 63 permissionName.c_str(), successCount, failCount); in AddPermissionRecord()
|
/base/sensors/medical_sensor/utils/src/ |
D | permission_util.cpp | 45 std::string permissionName = sensorPermissions_[sensorTypeId]; in CheckSensorPermission() local 46 int32_t ret = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckSensorPermission() 47 AddPermissionRecord(callerToken, permissionName, (ret == PERMISSION_GRANTED)); in CheckSensorPermission() 51 void PermissionUtil::AddPermissionRecord(AccessTokenID tokenID, const std::string& permissionName, … in AddPermissionRecord() argument 55 …int32_t ret = PrivacyKit::AddPermissionUsedRecord(tokenID, permissionName, successCount, failCount… in AddPermissionRecord() 59 permissionName.c_str(), successCount, failCount); in AddPermissionRecord()
|
/base/security/access_token/services/accesstokenmanager/main/cpp/include/permission/ |
D | permission_manager.h | 52 int VerifyNativeAccessToken(AccessTokenID tokenID, const std::string& permissionName); 53 int VerifyHapAccessToken(AccessTokenID tokenID, const std::string& permissionName); 54 virtual int VerifyAccessToken(AccessTokenID tokenID, const std::string& permissionName); 55 int GetDefPermission(const std::string& permissionName, PermissionDef& permissionDefResult); 59 int GetPermissionFlag(AccessTokenID tokenID, const std::string& permissionName, int& flag); 60 int32_t GrantPermission(AccessTokenID tokenID, const std::string& permissionName, int flag); 61 int32_t RevokePermission(AccessTokenID tokenID, const std::string& permissionName, int flag); 75 void ParamUpdate(const std::string& permissionName, uint32_t flag, bool filtered); 85 AccessTokenID tokenID, const std::string& permissionName, bool isGranted, int flag); 87 bool IsPermissionVaild(const std::string& permissionName); [all …]
|
D | permission_definition_cache.h | 43 int FindByPermissionName(const std::string& permissionName, PermissionDef& info); 45 bool IsSystemGrantedPermission(const std::string& permissionName); 47 bool IsUserGrantedPermission(const std::string& permissionName); 49 bool HasDefinition(const std::string& permissionName); 62 bool IsGrantedModeEqualInner(const std::string& permissionName, int grantMode) const;
|
D | permission_policy_set.h | 45 int VerifyPermissionStatus(const std::string& permissionName); 48 int QueryPermissionFlag(const std::string& permissionName, int& flag); 49 … int32_t UpdatePermissionStatus(const std::string& permissionName, bool isGranted, uint32_t flag); 51 bool IsPermissionReqValid(int32_t tokenApl, const std::string& permissionName, 71 int32_t UpdateSecCompGrantedPermList(const std::string& permissionName, bool isGranted); 72 int32_t UpdatePermStateList(const std::string& permissionName, bool isGranted, uint32_t flag); 73 void SetPermissionFlag(const std::string& permissionName, uint32_t flag, bool needToAdd); 74 void SecCompGrantedPermListUpdated(const std::string& permissionName, bool isToGrant);
|
/base/telephony/sms_mms/test/gtest/ |
D | sms_mms_gtest.h | 36 .permissionName = "ohos.permission.RECEIVE_SMS", 46 .permissionName = "ohos.permission.RECEIVE_SMS", 53 .permissionName = "ohos.permission.SEND_MESSAGES", 63 .permissionName = "ohos.permission.SEND_MESSAGES", 70 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 80 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 87 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 97 .permissionName = "ohos.permission.GET_TELEPHONY_STATE",
|
/base/telephony/sms_mms/test/unittest/ |
D | access_mms_token.h | 36 .permissionName = "ohos.permission.RECEIVE_SMS", 46 .permissionName = "ohos.permission.RECEIVE_SMS", 53 .permissionName = "ohos.permission.SEND_MESSAGES", 63 .permissionName = "ohos.permission.SEND_MESSAGES", 70 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 80 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 88 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 98 .permissionName = "ohos.permission.GET_TELEPHONY_STATE",
|
/base/telephony/core_service/services/network_search/test/ |
D | test.h | 38 .permissionName = "ohos.permission.LOCATION", 52 .permissionName = "ohos.permission.LOCATION", 57 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 71 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 76 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 90 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 95 .permissionName = "ohos.permission.GET_NETWORK_INFO", 109 .permissionName = "ohos.permission.GET_NETWORK_INFO",
|
/base/telephony/telephony_data/common/src/ |
D | permission_util.cpp | 31 bool PermissionUtil::CheckPermission(const std::string &permissionName) in CheckPermission() argument 33 if (permissionName.empty()) { in CheckPermission() 39 int result = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckPermission() 42 permissionName.c_str(), callerToken); in CheckPermission()
|
/base/telephony/core_service/test/unittest/core_service_gtest/ |
D | network_search_test.h | 40 .permissionName = "ohos.permission.LOCATION", 54 .permissionName = "ohos.permission.LOCATION", 59 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 73 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 78 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 92 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 97 .permissionName = "ohos.permission.GET_NETWORK_INFO", 111 .permissionName = "ohos.permission.GET_NETWORK_INFO", 116 .permissionName = "ohos.permission.READ_CONTACTS", 130 .permissionName = "ohos.permission.READ_CONTACTS", [all …]
|
/base/telephony/state_registry/test/unittest/state_test/ |
D | state_registry_test.h | 50 .permissionName = "ohos.permission.GET_NETWORK_INFO", 64 .permissionName = "ohos.permission.GET_NETWORK_INFO", 69 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 83 .permissionName = "ohos.permission.SET_TELEPHONY_STATE", 88 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 102 .permissionName = "ohos.permission.GET_TELEPHONY_STATE", 107 .permissionName = "ohos.permission.LOCATION", 121 .permissionName = "ohos.permission.LOCATION", 126 .permissionName = "ohos.permission.READ_CALL_LOG", 140 .permissionName = "ohos.permission.READ_CALL_LOG",
|
/base/security/access_token/services/accesstokenmanager/test/unittest/cpp/src/ |
D | permission_grant_event_test.cpp | 54 std::string permissionName = "testpremission"; variable 58 eventHandler.AddEvent(tokenID, permissionName, time); 76 std::string permissionName = "testpremission"; variable 80 eventHandler.AddEvent(tokenID, permissionName, time); 98 std::string permissionName = "testpremission"; variable 102 eventHandler.AddEvent(tokenID, permissionName, time);
|
/base/security/access_token/tools/accesstoken/src/ |
D | atm_command.cpp | 187 const int32_t& option, OptType& type, AccessTokenID& tokenId, std::string& permissionName) in RunAsCommandExistentOptionArgument() argument 214 permissionName = optarg; in RunAsCommandExistentOptionArgument() 223 std::string AtmCommand::DumpRecordInfo(uint32_t tokenId, const std::string& permissionName) in DumpRecordInfo() argument 228 if (!permissionName.empty()) { in DumpRecordInfo() 229 request.permissionList.emplace_back(permissionName); in DumpRecordInfo() 242 …nd::ModifyPermission(const OptType& type, AccessTokenID tokenId, const std::string& permissionName) in ModifyPermission() argument 244 if ((tokenId == 0) || (permissionName.empty())) { in ModifyPermission() 250 result = AccessTokenKit::GrantPermission(tokenId, permissionName, PERMISSION_FLAG); in ModifyPermission() 252 result = AccessTokenKit::RevokePermission(tokenId, permissionName, PERMISSION_FLAG); in ModifyPermission() 260 AccessTokenID tokenId, const std::string& permissionName) in RunCommandByOperationType() argument [all …]
|
/base/security/access_token/interfaces/innerkits/privacy/test/unittest/privacy_mock_test/ |
D | privacy_kit_test.cpp | 59 std::string permissionName = "ohos.permission.CAMERA"; variable 62 …int32_t ret = PrivacyKit::AddPermissionUsedRecord(tokenId, permissionName, successCount, failCount… 75 std::string permissionName = "ohos.permission.CAMERA"; variable 76 int32_t ret = PrivacyKit::StartUsingPermission(tokenId, permissionName); 102 std::string permissionName = "ohos.permission.CAMERA"; variable 104 PrivacyKit::StartUsingPermission(g_TokenId_A, permissionName, callbackPtr)); 116 std::string permissionName = "ohos.permission.CAMERA"; variable 117 int32_t ret = PrivacyKit::StopUsingPermission(tokenId, permissionName); 216 std::string permissionName = "ohos.permission.CAMERA"; variable 217 bool ret = PrivacyKit::IsAllowedUsingPermission(tokenId, permissionName);
|
/base/security/access_token/services/privacymanager/include/record/ |
D | permission_record_manager.h | 50 …AccessTokenID tokenId, const std::string& permissionName, int32_t successCount, int32_t failCount); 55 int32_t StartUsingPermission(AccessTokenID tokenId, const std::string& permissionName); 56 int32_t StartUsingPermission(AccessTokenID tokenId, const std::string& permissionName, 58 int32_t StopUsingPermission(AccessTokenID tokenId, const std::string& permissionName); 63 void CallbackExecute(AccessTokenID tokenId, const std::string& permissionName, int32_t status); 65 bool IsAllowedUsingPermission(AccessTokenID tokenId, const std::string& permissionName); 82 int32_t GetPermissionRecord(AccessTokenID tokenId, const std::string& permissionName, 100 bool GetGlobalSwitchStatus(const std::string& permissionName); 101 …void SavePermissionRecords(const std::string& permissionName, PermissionRecord& record, bool switc… 102 bool ShowGlobalDialog(const std::string& permissionName);
|
/base/security/access_token/interfaces/innerkits/privacy/include/ |
D | privacy_kit.h | 66 static int32_t AddPermissionUsedRecord(AccessTokenID tokenID, const std::string& permissionName, 74 static int32_t StartUsingPermission(AccessTokenID tokenID, const std::string& permissionName); 84 static int32_t StartUsingPermission(AccessTokenID tokenID, const std::string& permissionName, 92 static int32_t StopUsingPermission(AccessTokenID tokenID, const std::string& permissionName); 133 static bool IsAllowedUsingPermission(AccessTokenID tokenID, const std::string& permissionName);
|