Home
last modified time | relevance | path

Searched refs:callerToken (Results 1 – 25 of 127) sorted by relevance

123456

/base/notification/common_event_service/services/test/unittest/
Dcommon_event_access_token_helper_test.cpp63 AccessTokenID callerToken = DLP_PERMISSION_GRANTED; in HWTEST_F() local
64 EXPECT_TRUE(AccessTokenHelper::IsDlpHap(callerToken)); in HWTEST_F()
66 callerToken = PERMISSION_GRANTED; in HWTEST_F()
67 EXPECT_FALSE(AccessTokenHelper::IsDlpHap(callerToken)); in HWTEST_F()
80 AccessTokenID callerToken = DLP_PERMISSION_GRANTED; in HWTEST_F() local
81 EXPECT_FALSE(AccessTokenHelper::VerifyNativeToken(callerToken)); in HWTEST_F()
83 callerToken = PERMISSION_GRANTED; in HWTEST_F()
84 EXPECT_FALSE(AccessTokenHelper::VerifyNativeToken(callerToken)); in HWTEST_F()
96 AccessTokenID callerToken = DLP_PERMISSION_GRANTED; in HWTEST_F() local
97 EXPECT_FALSE(AccessTokenHelper::VerifyAccessToken(callerToken, permission)); in HWTEST_F()
[all …]
/base/notification/common_event_service/test/mock/
Dmock_access_token_helper.cpp23 bool AccessTokenHelper::VerifyNativeToken(const AccessToken::AccessTokenID &callerToken) in VerifyNativeToken() argument
25 return callerToken == PERMISSION_GRANTED; in VerifyNativeToken()
28 bool AccessTokenHelper::VerifyAccessToken(const AccessToken::AccessTokenID &callerToken, const std:… in VerifyAccessToken() argument
30 return callerToken == PERMISSION_GRANTED; in VerifyAccessToken()
33 …id AccessTokenHelper::RecordSensitivePermissionUsage(const AccessToken::AccessTokenID &callerToken, in RecordSensitivePermissionUsage() argument
37 bool AccessTokenHelper::IsDlpHap(const AccessToken::AccessTokenID &callerToken) in IsDlpHap() argument
39 return callerToken == DLP_PERMISSION_GRANTED; in IsDlpHap()
Dmock_accesstoken_kit.cpp22 ATokenTypeEnum AccessTokenKit::GetTokenTypeFlag(AccessTokenID callerToken) in GetTokenTypeFlag() argument
24 if (callerToken == EventFwk::DLP_PERMISSION_GRANTED) { in GetTokenTypeFlag()
30 int AccessTokenKit::GetHapTokenInfo(AccessTokenID callerToken, HapTokenInfo& hapTokenInfoRes) in GetHapTokenInfo() argument
33 if (callerToken == EventFwk::DLP_PERMISSION_GRANTED) { in GetHapTokenInfo()
/base/notification/common_event_service/services/src/
Daccess_token_helper.cpp28 bool AccessTokenHelper::VerifyNativeToken(const AccessTokenID &callerToken) in VerifyNativeToken() argument
30 ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in VerifyNativeToken()
34 bool AccessTokenHelper::VerifyAccessToken(const AccessTokenID &callerToken, in VerifyAccessToken() argument
37 return (AccessTokenKit::VerifyAccessToken(callerToken, permission) == in VerifyAccessToken()
41 void AccessTokenHelper::RecordSensitivePermissionUsage(const AccessTokenID &callerToken, in RecordSensitivePermissionUsage() argument
45 ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in RecordSensitivePermissionUsage()
56 PrivacyKit::AddPermissionUsedRecord(callerToken, permissionName, 1, 0); in RecordSensitivePermissionUsage()
60 bool AccessTokenHelper::IsDlpHap(const AccessTokenID &callerToken) in IsDlpHap() argument
62 ATokenTypeEnum type = AccessTokenKit::GetTokenTypeFlag(callerToken); in IsDlpHap()
65 AccessTokenKit::GetHapTokenInfo(callerToken, info); in IsDlpHap()
[all …]
/base/time/time_service/services/
Dtime_permission.cpp32 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckCallingPermission() local
33 auto tokenType = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckCallingPermission()
39 … result = Security::AccessToken::AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckCallingPermission()
42 callerToken, tokenType); in CheckCallingPermission()
47 permissionName.c_str(), callerToken); in CheckCallingPermission()
55 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckProxyCallingPermission() local
56 auto tokenType = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckProxyCallingPermission()
63 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckSystemUidCallingPermission() local
64 auto tokenType = Security::AccessToken::AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckSystemUidCallingPermission()
/base/notification/distributed_notification_service/services/ans/src/
Daccess_token_helper.cpp33 bool AccessTokenHelper::VerifyNativeToken(const AccessTokenID &callerToken) in VerifyNativeToken() argument
35 ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in VerifyNativeToken()
52 bool AccessTokenHelper::IsDlpHap(const AccessTokenID &callerToken) in IsDlpHap() argument
54 ATokenTypeEnum type = AccessTokenKit::GetTokenTypeFlag(callerToken); in IsDlpHap()
57 AccessTokenKit::GetHapTokenInfo(callerToken, info); in IsDlpHap()
65 bool AccessTokenHelper::VerifyShellToken(const AccessTokenID &callerToken) in VerifyShellToken() argument
67 ATokenTypeEnum tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in VerifyShellToken()
Dnotification_dialog.cpp50 …onDialog::StartEnableNotificationDialogAbility(int32_t uid, const sptr<IRemoteObject> &callerToken) in StartEnableNotificationDialogAbility() argument
63 if (callerToken != nullptr) { in StartEnableNotificationDialogAbility()
64 want.SetParam("callerToken", callerToken); in StartEnableNotificationDialogAbility()
/base/notification/common_event_service/services/include/
Daccess_token_helper.h32 static bool VerifyNativeToken(const AccessToken::AccessTokenID &callerToken);
33 static bool VerifyAccessToken(const AccessToken::AccessTokenID &callerToken,
35 static void RecordSensitivePermissionUsage(const AccessToken::AccessTokenID &callerToken,
37 static bool IsDlpHap(const AccessToken::AccessTokenID &callerToken);
39 static bool VerifyShellToken(const AccessToken::AccessTokenID &callerToken);
/base/sensors/sensor/utils/common/src/
Dpermission_util.cpp42 int32_t PermissionUtil::CheckSensorPermission(AccessTokenID callerToken, int32_t sensorTypeId) in CheckSensorPermission() argument
48 int32_t ret = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckSensorPermission()
51 AddPermissionRecord(callerToken, permissionName, (ret == PERMISSION_GRANTED)); in CheckSensorPermission()
67 bool PermissionUtil::IsNativeToken(AccessTokenID callerToken) in IsNativeToken() argument
69 int32_t tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in IsNativeToken()
77 int32_t PermissionUtil::CheckManageSensorPermission(AccessTokenID callerToken) in CheckManageSensorPermission() argument
79 int32_t ret = AccessTokenKit::VerifyAccessToken(callerToken, MANAGE_SENSOR_PERMISSION); in CheckManageSensorPermission()
/base/sensors/medical_sensor/utils/include/
Dapp_thread_info.h27 AccessTokenID callerToken { 0 };
29 AppThreadInfo(int32_t pid, int32_t uid, AccessTokenID callerToken) in AppThreadInfo()
30 : pid(pid), uid(uid), callerToken(callerToken) {}; in AppThreadInfo()
/base/sensors/sensor/utils/common/include/
Dapp_thread_info.h27 AccessTokenID callerToken { 0 };
29 AppThreadInfo(int32_t pid, int32_t uid, AccessTokenID callerToken) in AppThreadInfo()
30 : pid(pid), uid(uid), callerToken(callerToken) {}; in AppThreadInfo()
Dpermission_util.h38 int32_t CheckSensorPermission(AccessTokenID callerToken, int32_t sensorTypeId);
39 bool IsNativeToken(AccessTokenID callerToken);
40 int32_t CheckManageSensorPermission(AccessTokenID callerToken);
/base/notification/distributed_notification_service/services/ans/test/unittest/mock/
Dmock_access_token_helper.cpp28 bool AccessTokenHelper::VerifyNativeToken(const Security::AccessToken::AccessTokenID &callerToken) in VerifyNativeToken() argument
30 return callerToken == NATIVE_TOKEN; in VerifyNativeToken()
42 bool AccessTokenHelper::IsDlpHap(const Security::AccessToken::AccessTokenID &callerToken) in IsDlpHap() argument
44 return callerToken == DLP_NATIVE_TOKEN; in IsDlpHap()
/base/telephony/core_service/utils/common/src/
Dtelephony_permission.cpp71 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckPermission() local
72 auto tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckPermission()
73 int result = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckPermission()
82 …int32_t ret = PrivacyKit::AddPermissionUsedRecord(callerToken, permissionName, successCount, failC… in CheckPermission()
93 permissionName.c_str(), callerToken, tokenType); in CheckPermission()
101 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckCallerIsSystemApp() local
102 auto tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckCallerIsSystemApp()
/base/telephony/telephony_data/common/src/
Dpermission_util.cpp38 auto callerToken = IPCSkeleton::GetCallingTokenID(); in CheckPermission() local
39 int result = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckPermission()
42 permissionName.c_str(), callerToken); in CheckPermission()
/base/notification/distributed_notification_service/services/ans/include/
Daccess_token_helper.h36 static bool VerifyNativeToken(const Security::AccessToken::AccessTokenID &callerToken);
38 static bool IsDlpHap(const Security::AccessToken::AccessTokenID &callerToken);
39 static bool VerifyShellToken(const Security::AccessToken::AccessTokenID &callerToken);
/base/notification/common_event_service/services/test/unittest/static_subscriber_manager_unit_test/
Dmock_access_token_helper.cpp61 bool AccessTokenHelper::VerifyNativeToken(const AccessTokenID &callerToken) in VerifyNativeToken() argument
66 bool AccessTokenHelper::VerifyAccessToken(const AccessTokenID &callerToken, in VerifyAccessToken() argument
78 void AccessTokenHelper::RecordSensitivePermissionUsage(const AccessTokenID &callerToken, in RecordSensitivePermissionUsage() argument
83 bool AccessTokenHelper::IsDlpHap(const AccessTokenID &callerToken) in IsDlpHap() argument
/base/notification/common_event_service/services/test/unittest/common_event_manager_service_branch_test/
Dmock_access_token_helper.cpp49 bool AccessTokenHelper::VerifyNativeToken(const AccessTokenID &callerToken) in VerifyNativeToken() argument
59 bool AccessTokenHelper::IsDlpHap(const AccessTokenID &callerToken) in IsDlpHap() argument
64 bool AccessTokenHelper::VerifyShellToken(const AccessTokenID &callerToken) in VerifyShellToken() argument
/base/startup/init/device_info/
Ddevice_info_stub.cpp113 AccessTokenID callerToken = IPCSkeleton::GetCallingTokenID(); in CheckPermission() local
115 int32_t tokenType = AccessTokenKit::GetTokenTypeFlag(callerToken); in CheckPermission()
117 DINFO_LOGE("AccessToken type:%d, permission:%d denied!", tokenType, callerToken); in CheckPermission()
120 result = AccessTokenKit::VerifyAccessToken(callerToken, permission); in CheckPermission()
123 DINFO_LOGE("AccessTokenID:%d, permission:%s denied!", callerToken, permission.c_str()); in CheckPermission()
126 …DINFO_LOGI("tokenType %d dAccessTokenID:%d, permission:%s matched!", tokenType, callerToken, permi… in CheckPermission()
/base/sensors/miscdevice/utils/src/
Dpermission_util.cpp24 int32_t PermissionUtil::CheckVibratePermission(AccessTokenID callerToken, std::string permissionNam… in CheckVibratePermission() argument
26 return AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckVibratePermission()
/base/notification/distributed_notification_service/services/dialog_ui/enable_notification_dialog/entry/src/main/ets/ServiceExtAbility/
DNotificationServiceExtAbility.ts41 globalThis.callerToken = want['parameters']['callerToken'];
45 if (globalThis.callerToken != null) {
68 if (globalThis.callerToken != null) {
69 await win.bindDialogTarget(globalThis.callerToken.value, () => {
/base/notification/distributed_notification_service/services/test/moduletest/mock/
Dmock_access_token_helper.cpp26 bool AccessTokenHelper::VerifyNativeToken(const Security::AccessToken::AccessTokenID &callerToken) in VerifyNativeToken() argument
36 bool AccessTokenHelper::IsDlpHap(const Security::AccessToken::AccessTokenID &callerToken) in IsDlpHap() argument
/base/security/access_token/services/privacymanager/src/sensitive/ability_manager/
Dability_manager_privacy_proxy.cpp27 …yManagerPrivacyProxy::StartAbility(const AAFwk::Want &want, const sptr<IRemoteObject> &callerToken, in StartAbility() argument
43 if (callerToken) { in StartAbility()
44 if (!data.WriteBool(true) || !data.WriteRemoteObject(callerToken)) { in StartAbility()
/base/sensors/medical_sensor/utils/src/
Dpermission_util.cpp40 int32_t PermissionUtil::CheckSensorPermission(AccessTokenID callerToken, int32_t sensorTypeId) in CheckSensorPermission() argument
46 int32_t ret = AccessTokenKit::VerifyAccessToken(callerToken, permissionName); in CheckSensorPermission()
47 AddPermissionRecord(callerToken, permissionName, (ret == PERMISSION_GRANTED)); in CheckSensorPermission()
/base/notification/common_event_service/services/test/unittest/mock/
Dmock_access_token_helper.cpp37 bool AccessTokenHelper::VerifyNativeToken(const AccessTokenID &callerToken) in VerifyNativeToken() argument
42 bool AccessTokenHelper::VerifyAccessToken(const AccessTokenID &callerToken, in VerifyAccessToken() argument

123456