/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/ |
D | hks_client_service_passthrough.c | 33 char *processName = NULL; in HksClientRefreshKeyInfo() local 34 …HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetProcessName(&processName), HKS_ERROR_INTERNAL_ERROR, "get proces… in HksClientRefreshKeyInfo() 35 struct HksBlob processNameBlob = { strlen(processName), (uint8_t *)processName }; in HksClientRefreshKeyInfo() 39 static int32_t GetProcessInfo(char **processName, char **userId) in GetProcessInfo() argument 41 …HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetProcessName(processName), HKS_ERROR_INTERNAL_ERROR, "get process… in GetProcessInfo() 50 char *processName = NULL; in HksClientGenerateKey() local 52 HKS_IF_NOT_SUCC_LOGE_RETURN(GetProcessInfo(&processName, &userId), HKS_ERROR_INTERNAL_ERROR, in HksClientGenerateKey() 57 { strlen(processName), (uint8_t *)processName }, in HksClientGenerateKey() 67 char *processName = NULL; in HksClientImportKey() local 69 HKS_IF_NOT_SUCC_LOGE_RETURN(GetProcessInfo(&processName, &userId), HKS_ERROR_INTERNAL_ERROR, in HksClientImportKey() [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/core/src/ |
D | hks_client_check.c | 42 int32_t HksCheckProcessNameAndKeyAlias(const struct HksBlob *processName, const struct HksBlob *key… in HksCheckProcessNameAndKeyAlias() argument 44 HKS_IF_NOT_SUCC_RETURN(HksCheckBlob2(processName, keyAlias), HKS_ERROR_INVALID_ARGUMENT) in HksCheckProcessNameAndKeyAlias() 46 return CheckProcessNameAndKeyAliasSize(processName->size, keyAlias->size); in HksCheckProcessNameAndKeyAlias() 49 int32_t HksCheckGenAndImportKeyParams(const struct HksBlob *processName, const struct HksBlob *keyA… in HksCheckGenAndImportKeyParams() argument 52 int32_t ret = HksCheckBlob3AndParamSet(processName, keyAlias, key, paramSetIn); in HksCheckGenAndImportKeyParams() 55 return CheckProcessNameAndKeyAliasSize(processName->size, keyAlias->size); in HksCheckGenAndImportKeyParams() 58 int32_t HksCheckImportWrappedKeyParams(const struct HksBlob *processName, const struct HksBlob *key… in HksCheckImportWrappedKeyParams() argument 61 …int32_t ret = HksCheckBlob4AndParamSet(processName, keyAlias, wrappingKeyAlias, wrappedKeyData, pa… in HksCheckImportWrappedKeyParams() 64 ret = CheckProcessNameAndKeyAliasSize(processName->size, keyAlias->size); in HksCheckImportWrappedKeyParams() 67 return CheckProcessNameAndKeyAliasSize(processName->size, wrappingKeyAlias->size); in HksCheckImportWrappedKeyParams() [all …]
|
D | hks_session_manager.c | 66 HKS_FREE_BLOB((*operation)->processInfo.processName); in FreeOperation() 110 uint32_t processNameLen = processInfo->processName.size; in ConstructOperationProcessInfo() 115 uint8_t *processName = (uint8_t *)HksMalloc(processNameLen); in ConstructOperationProcessInfo() 116 if (processName == NULL) { in ConstructOperationProcessInfo() 123 (void)memcpy_s(processName, processNameLen, processInfo->processName.data, processNameLen); in ConstructOperationProcessInfo() 127 operation->processInfo.processName.size = processNameLen; in ConstructOperationProcessInfo() 128 operation->processInfo.processName.data = processName; in ConstructOperationProcessInfo() 163 HKS_FREE_BLOB(operation->processInfo.processName); in CreateOperation() 173 HKS_FREE_BLOB(operation->processInfo.processName); in CreateOperation() 183 uint32_t processNameLen = operation->processInfo.processName.size; in IsSameProcessName() [all …]
|
D | hks_upgrade_storage_data.c | 109 char *processName = NULL; in CopyRootKeyMaterialFile() local 110 int32_t ret = HksGetProcessName(&processName); in CopyRootKeyMaterialFile() 113 struct HksBlob processNameBlob = { strlen(processName), (uint8_t *)processName }; in CopyRootKeyMaterialFile() 143 char *processName = NULL; in RollBackNewVersionFiles() local 144 int32_t ret = HksGetProcessName(&processName); in RollBackNewVersionFiles() 147 struct HksBlob processNameBlob = { strlen(processName), (uint8_t *)processName }; in RollBackNewVersionFiles() 174 char *processName = NULL; in UpgradeRootKeyMaterialFile() local 175 …HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetProcessName(&processName), HKS_ERROR_INTERNAL_ERROR, "get proces… in UpgradeRootKeyMaterialFile() 177 struct HksBlob processNameBlob = { strlen(processName), (uint8_t *)processName }; in UpgradeRootKeyMaterialFile() 292 char *processName = NULL; in UpgradeSingleKeyInfo() local [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/core/include/ |
D | hks_client_check.h | 33 int32_t HksCheckProcessNameAndKeyAlias(const struct HksBlob *processName, const struct HksBlob *key… 35 int32_t HksCheckGenAndImportKeyParams(const struct HksBlob *processName, const struct HksBlob *keyA… 38 int32_t HksCheckImportWrappedKeyParams(const struct HksBlob *processName, const struct HksBlob *key… 41 int32_t HksCheckAllParams(const struct HksBlob *processName, const struct HksBlob *keyAlias, 44 int32_t HksCheckGetKeyParamSetParams(const struct HksBlob *processName, const struct HksBlob *keyAl… 47 int32_t HksCheckGenerateRandomParams(const struct HksBlob *processName, const struct HksBlob *rando… 49 int32_t HksCheckExportPublicKeyParams(const struct HksBlob *processName, const struct HksBlob *keyA… 52 int32_t HksCheckDeriveKeyParams(const struct HksBlob *processName, const struct HksParamSet *paramS… 55 int32_t HksCheckGetKeyInfoListParams(const struct HksBlob *processName, const struct HksKeyInfo *ke… 59 int32_t HksCheckAttestKeyParams(const struct HksBlob *processName, const struct HksBlob *keyAlias, [all …]
|
D | hks_storage.h | 58 int32_t HksStoreGetKeyBlobSize(const struct HksBlob *processName, 60 int32_t HksGetKeyCountByProcessName(const struct HksBlob *processName, uint32_t *keyCount); 85 int32_t HksStoreDestroy(const struct HksBlob *processName); 90 int32_t HksServiceDeleteUserIDKeyAliasFile(const struct HksBlob processName);
|
/base/security/access_token/interfaces/innerkits/nativetoken/test/unittest/src/ |
D | nativetoken_kit_test.cpp | 79 static void DeleteGoalItemFromRecord(const char *processName, cJSON *record) in DeleteGoalItemFromRecord() argument 88 if (strcmp(innerProcessName->valuestring, processName) == 0) { in DeleteGoalItemFromRecord() 99 static int32_t DeleteNodeInFile(const char *processName) in DeleteNodeInFile() argument 120 DeleteGoalItemFromRecord(processName, record); in DeleteNodeInFile() 127 static int32_t DeleteAccessTokenId(const char *processName) in DeleteAccessTokenId() argument 136 if (strcmp(tokenNode->next->processName, processName) == 0) { in DeleteAccessTokenId() 137 result = DeleteNodeInFile(processName); in DeleteAccessTokenId() 148 int32_t Start(const char *processName) in Start() argument 175 .processName = processName, in Start() 212 infoInstance.processName = ""; [all …]
|
/base/startup/appspawn/adapter/sysevent/ |
D | event_reporter.cpp | 30 void ReportProcessExitInfo(const char* processName, int pid, int uid, int status) in ReportProcessExitInfo() argument 33 if ((processName != NULL) && (strlen(processName) <= MAX_NAME_LENGTH)) { in ReportProcessExitInfo() 34 pname = std::string(processName, strlen(processName)); in ReportProcessExitInfo() 43 void ReportProcessExitInfo(const char* processName, int pid, int uid, int status) in ReportProcessExitInfo() argument 45 OHOS::system::ReportProcessExitInfo(processName, pid, uid, status); in ReportProcessExitInfo()
|
/base/security/huks/test/unittest/huks_standard_test/storage_multithread_test/src/ |
D | hks_storage_test.cpp | 37 HksBlob processName = { in TearDown() local 51 .processName = processName in TearDown() 59 HksBlob processName = { in PrepareBlob() local 77 .processName = processName in PrepareBlob() 86 HksBlob processName = { variable 104 .processName = processName 115 HksBlob processName = { variable 134 .processName = processName 145 HksBlob processName = { variable 159 .processName = processName
|
/base/startup/init/services/begetctl/ |
D | sandbox.cpp | 85 static void EnterExec(const std::string &processName) in EnterExec() argument 87 std::string tmpName = processName; in EnterExec() 112 …d(const std::string &serviceName, const std::string &namespaceName, const std::string &processName) in RunCmd() argument 114 if (!namespaceName.empty() && processName.empty() && serviceName.empty()) { in RunCmd() 117 } else if (!namespaceName.empty() && !processName.empty() && serviceName.empty()) { in RunCmd() 119 EnterExec(processName); in RunCmd() 120 } else if (namespaceName.empty() && !processName.empty() && serviceName.empty()) { in RunCmd() 121 std::cout << "process name:" << processName << std::endl; in RunCmd() 123 EnterExec(processName); in RunCmd() 124 } else if (namespaceName.empty() && processName.empty() && !serviceName.empty()) { in RunCmd() [all …]
|
/base/hiviewdfx/hiview/plugins/hicollie_collector/ |
D | plugin.cpp | 91 int32_t pid, const std::string& processName, const std::string& moduleName) const in SelectEventFromDB() argument 101 .And("PROCESS_NAME", EventStore::Op::EQ, processName) in SelectEventFromDB() 140 void HiCollieCollector::SaveToFile(SysEvent &sysEvent, int32_t pid, const std::string& processName, in SaveToFile() argument 147 desText << "MODULE:" << processName << "-" << moduleName << std::endl; in SaveToFile() 157 std::string log = SelectEventFromDB(pid, processName, moduleName); in SaveToFile() 182 std::string processName = StringUtil::TrimStr(sysEvent.GetEventValue("PROCESS_NAME")); in ProcessHiCollieEvent() local 183 if (processName == "") { in ProcessHiCollieEvent() 184 processName = std::to_string(pid); in ProcessHiCollieEvent() 189 desFile = "watchdog-" + processName + "-" + std::to_string(uid) + "-" + timestamp; in ProcessHiCollieEvent() 191 desFile = "timeout-" + processName + "-" + std::to_string(uid) + "-" + timestamp; in ProcessHiCollieEvent() [all …]
|
D | plugin.h | 48 int32_t pid, const std::string& processName, const std::string& moduleName) const; 49 void SaveToFile(SysEvent &sysEvent, int32_t pid, const std::string& processName, 51 bool ShouldReportSysFreeze(const std::string& processName); 52 …rtSysFreezeIfNeed(SysEvent &sysEvent, const std::string& timestamp, const std::string& processName,
|
/base/hiviewdfx/hiview/plugins/freeze_detector/ |
D | vendor.cpp | 87 std::string processName = StringUtil::TrimStr(watchPoint.GetProcessName()); in SendFaultLog() local 93 processName = stringId; in SendFaultLog() 94 } else if (processName == "" && packageName != "") { in SendFaultLog() 95 processName = packageName; in SendFaultLog() 97 if (processName == "" && packageName == "") { in SendFaultLog() 98 processName = stringId; in SendFaultLog() 107 info.module = processName; in SendFaultLog() 109 info.summary = type + ": " + processName + " " + stringId in SendFaultLog() 145 std::string processName = StringUtil::TrimStr(watchPoint.GetProcessName()); in MergeEventLog() local 151 processName = stringId; in MergeEventLog() [all …]
|
/base/security/access_token/services/accesstokenmanager/test/unittest/cpp/src/ |
D | native_token_receptor_test.cpp | 78 R"({"processName":"process6","APL":3,"version":1,"tokenId":685266937,"tokenAttr":0,)"\ 80 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 112 std::string testStr = R"([{"processName":""}])"; 120 testStr = R"([{"processName":"", }])"; 124 testStr = R"([{"processName":"process6"}, {}])"; 128 testStr = R"([{"processName":""}, {"":"", ""}])"; 132 testStr = R"([{"processName":"process6", "tokenId":685266937, "APL":3, "version":new}])"; 136 testStr = R"([{"processName":"process6", "tokenId":685266937, "APL":7, "version":1}])"; 140 …testStr = R"({"NativeToken":[{"processName":"process6", "tokenId":685266937, "APL":7, "version":1}… 144 …testStr = R"({"NativeToken":[{"processName":"process6", "tokenId":685266937, "APL":7, "version":1}… [all …]
|
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/idl/ipc/ |
D | hks_response.cpp | 70 int32_t HksGetProcessNameForIPC(const uint8_t *context, struct HksBlob *processName) in HksGetProcessNameForIPC() argument 72 if ((context == nullptr) || (processName == nullptr)) { in HksGetProcessNameForIPC() 82 processName->size = sizeof(callingUid); in HksGetProcessNameForIPC() 83 processName->data = name; in HksGetProcessNameForIPC() 99 processInfo->processName.size = sizeof(callingUid); in HksGetProcessInfoForIPC() 100 processInfo->processName.data = name; in HksGetProcessInfoForIPC() 123 processInfo->processName.data = nullptr; in HksGetProcessInfoForIPC()
|
D | hks_response_samgr.c | 54 int32_t HksGetProcessNameForIPC(const uint8_t *context, struct HksBlob *processName) in HksGetProcessNameForIPC() argument 56 if ((context == NULL) || (processName == NULL)) { in HksGetProcessNameForIPC() 70 processName->size = sizeof(callingUid); in HksGetProcessNameForIPC() 71 processName->data = name; in HksGetProcessNameForIPC()
|
D | hks_ipc_service.c | 95 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceGenerateKey() 120 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceImportKey() 146 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceImportWrappedKey() 175 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceExportPublicKey() 193 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceDeleteKey() 226 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceGetKeyParamSet() 245 HKS_FREE_BLOB(processInfo.processName); in HksIpcServiceKeyExist() 251 struct HksBlob processName = { 0, NULL }; in HksIpcServiceGenerateRandom() local 275 ret = HksGetProcessNameForIPC(context, &processName); in HksIpcServiceGenerateRandom() 278 ret = HksServiceGenerateRandom(&processName, &random); in HksIpcServiceGenerateRandom() [all …]
|
/base/security/selinux/interfaces/policycoreutils/src/ |
D | param_checker.c | 34 static int GetProcessNameFromPid(pid_t pid, char *processName) in GetProcessNameFromPid() argument 49 if (sscanf_s(buff, "%*s %s", processName) <= 0) { in GetProcessNameFromPid() 71 char processName[BUF_SIZE]; in SelinuxAuditCallback() local 72 if (GetProcessNameFromPid(msg->ucred->pid, processName) != 0) { in SelinuxAuditCallback() 73 if (strcpy_s(processName, BUF_SIZE, "unknown process") != EOK) { in SelinuxAuditCallback() 77 …tf_s(buf, len, len - 1, "process=\"%s\" parameter=%s pid=%d uid=%u gid=%u", processName, msg->name, in SelinuxAuditCallback()
|
/base/security/access_token/interfaces/innerkits/nativetoken/test/unittest/mock/ |
D | nativetoken_oper_test.cpp | 74 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 102 (void)strcpy_s(tokenNode.processName, MAX_PROCESS_NAME_LEN + 1, "process5"); 105 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 129 (void)strcpy_s(tokenNode.processName, MAX_PROCESS_NAME_LEN + 1, "process5"); 136 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 161 (void)strcpy_s(tokenNode.processName, MAX_PROCESS_NAME_LEN + 1, "process5"); 171 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 207 (void)strcpy_s(tokenNode.processName, MAX_PROCESS_NAME_LEN + 1, "process5"); 217 R"({"processName":"process5","APL":3,"version":1,"tokenId":678065606,"tokenAttr":0,)"\ 258 (void)strcpy_s(tokenNode.processName, MAX_PROCESS_NAME_LEN + 1, "process5"); [all …]
|
/base/security/huks/frameworks/huks_standard/main/os_dependency/sysinfo/src/ |
D | hks_get_process_info_passthrough.c | 21 int32_t HksGetProcessName(char **processName) in HksGetProcessName() argument 23 *processName = g_processName; in HksGetProcessName()
|
/base/security/access_token/services/accesstokenmanager/main/cpp/src/token/ |
D | native_token_info_inner.cpp | 54 int NativeTokenInfoInner::Init(AccessTokenID id, const std::string& processName, in Init() argument 60 if (!DataValidator::IsProcessNameValid(processName)) { in Init() 65 tokenInfoBasic_.processName = processName; in Init() 108 outGenericValues.Put(TokenFiledConst::FIELD_PROCESS_NAME, tokenInfoBasic_.processName); in TranslationIntoGenericValues() 122 tokenInfoBasic_.processName = inGenericValues.GetString(TokenFiledConst::FIELD_PROCESS_NAME); in RestoreNativeTokenInfo() 123 if (!DataValidator::IsProcessNameValid(tokenInfoBasic_.processName)) { in RestoreNativeTokenInfo() 165 infoParcel.processName = tokenInfoBasic_.processName; in TranslateToNativeTokenInfo() 204 return tokenInfoBasic_.processName; in GetProcessName() 257 info.append(R"( "processName": ")" + tokenInfoBasic_.processName + R"(")" + ",\n"); in ToString()
|
/base/security/huks/services/huks_standard/huks_service/main/systemapi_wrap/hisysevent_wrapper/src/ |
D | hks_report_wrapper.c | 174 int processName = 0; in ReportFaultEvent() local 182 if (memcpy_s(&processName, sizeof(processName), processInfo->processName.data, in ReportFaultEvent() 183 processInfo->processName.size) != EOK) { in ReportFaultEvent() 189 struct EventValues eventValues = { userId, processName, algorithmTag, errorCode }; in ReportFaultEvent()
|
/base/theme/screenlock_mgr/utils/src/ |
D | screenlock_appinfo.cpp | 44 appInfo.bundleName = tokenInfo.processName; in GetAppInfoByToken() 45 appInfo.appId = tokenInfo.processName; in GetAppInfoByToken()
|
/base/security/access_token/frameworks/common/src/ |
D | data_validator.cpp | 62 bool DataValidator::IsProcessNameValid(const std::string& processName) in IsProcessNameValid() argument 64 return !processName.empty() && (processName.length() <= MAX_LENGTH); in IsProcessNameValid()
|
/base/security/huks/services/huks_standard/huks_engine/main/core/src/ |
D | hks_rkc_rw.c | 255 static int32_t GetProcessInfo(char **processName, char **userId) in GetProcessInfo() argument 257 …HKS_IF_NOT_SUCC_LOGE_RETURN(HksGetProcessName(processName), HKS_ERROR_INTERNAL_ERROR, "get process… in GetProcessInfo() 275 char *processName = NULL; in HksRkcReadKsf() local 277 if (GetProcessInfo(&processName, &userId) != HKS_SUCCESS) { in HksRkcReadKsf() 285 { strlen(processName), (uint8_t *)processName }, in HksRkcReadKsf() 509 char *processName = NULL; in HksRkcWriteKsf() 511 if (GetProcessInfo(&processName, &userId) != HKS_SUCCESS) { in HksRkcWriteKsf() 519 { strlen(processName), (uint8_t *)processName }, in HksRkcWriteKsf() 536 char *processName = NULL; in RkcKsfExist() local 538 HKS_IF_NOT_SUCC_LOGE_RETURN(GetProcessInfo(&processName, &userId), in RkcKsfExist() [all …]
|