/base/startup/appspawn_lite/services/test/unittest/common/ |
D | message_func_test.cpp | 143 MessageSt msgSt = {0}; variable 144 FreeMessageSt(&msgSt); 146 EXPECT_EQ(msgSt.bundleName, nullptr); 147 EXPECT_EQ(msgSt.identityID, nullptr); 148 EXPECT_EQ(msgSt.caps, nullptr); 149 EXPECT_EQ(msgSt.uID, -1); 150 EXPECT_EQ(msgSt.gID, -1); 151 EXPECT_EQ(msgSt.capsCnt, 0); 163 MessageSt msgSt = {0}; variable 165 msgSt.capsCnt = MALLOC_TEST_LENGTH; [all …]
|
/base/startup/appspawn/test/unittest/app_spawn_lite_test/ |
D | app_spawn_lite_test.cpp | 197 MessageSt msgSt = {0}; variable 198 FreeMessageSt(&msgSt); 200 EXPECT_EQ(msgSt.bundleName, nullptr); 201 EXPECT_EQ(msgSt.identityID, nullptr); 202 EXPECT_EQ(msgSt.caps, nullptr); 203 EXPECT_EQ(msgSt.uID, -1); 204 EXPECT_EQ(msgSt.gID, -1); 205 EXPECT_EQ(msgSt.capsCnt, 0); 217 MessageSt msgSt = {0}; variable 219 msgSt.capsCnt = MALLOC_TEST_LENGTH; [all …]
|
/base/startup/appspawn_lite/services/src/ |
D | appspawn_message.c | 103 static int GetCaps(const cJSON* curItem, MessageSt* msgSt) in GetCaps() argument 105 msgSt->capsCnt = 0; in GetCaps() 106 msgSt->caps = NULL; in GetCaps() 125 msgSt->caps = (unsigned int*)malloc(sizeof(unsigned int) * capsCnt); in GetCaps() 126 if (msgSt->caps == NULL) { in GetCaps() 135 free(msgSt->caps); in GetCaps() 136 msgSt->caps = NULL; in GetCaps() 139 msgSt->caps[i] = (unsigned int)cJSON_GetNumberValue(capJ); in GetCaps() 140 if (msgSt->caps[i] > CAP_LAST_CAP) { in GetCaps() 142 msgSt->caps[i]); in GetCaps() [all …]
|
D | appspawn_service.c | 97 static int GetMessageSt(MessageSt* msgSt, IpcIo* req) in GetMessageSt() argument 99 if (msgSt == NULL || req == NULL) { in GetMessageSt() 109 …int ret = SplitMessage(str, len, msgSt); // after split message, str no need to free(linux vers… in GetMessageSt() 130 MessageSt msgSt = {0}; in Invoke() local 131 if (GetMessageSt(&msgSt, req) != EC_SUCCESS) { in Invoke() 138 msgSt.bundleName, msgSt.identityID, msgSt.uID, msgSt.gID); in Invoke() 140 pid_t newPid = CreateProcess(&msgSt); in Invoke() 141 FreeMessageSt(&msgSt); in Invoke()
|
D | appspawn_process.c | 134 pid_t CreateProcess(const MessageSt* msgSt) in CreateProcess() argument 153 if (SetPerms(msgSt->uID, msgSt->gID, msgSt->capsCnt, msgSt->caps) != 0) { in CreateProcess() 154 … HILOG_ERROR(HILOG_MODULE_HIVIEW, "[appspawn] sub-process %{public}s exit!", msgSt->bundleName); in CreateProcess() 158 (void)prctl(PR_SET_NAME, msgSt->bundleName); in CreateProcess() 172 if (AbilityMain(msgSt->identityID) != 0) { in CreateProcess()
|
/base/startup/appspawn/lite/ |
D | appspawn_message.c | 104 static int GetCaps(const cJSON *curItem, MessageSt *msgSt) in GetCaps() argument 106 msgSt->capsCnt = 0; in GetCaps() 107 msgSt->caps = NULL; in GetCaps() 126 msgSt->caps = (unsigned int *)malloc(sizeof(unsigned int) * capsCnt); in GetCaps() 127 if (msgSt->caps == NULL) { in GetCaps() 136 free(msgSt->caps); in GetCaps() 137 msgSt->caps = NULL; in GetCaps() 140 msgSt->caps[i] = (unsigned int)cJSON_GetNumberValue(capJ); in GetCaps() 141 if (msgSt->caps[i] > CAP_LAST_CAP) { in GetCaps() 143 msgSt->caps[i]); in GetCaps() [all …]
|
D | appspawn_service.c | 84 static int GetMessageSt(MessageSt *msgSt, IpcIo *req) in GetMessageSt() argument 86 if (msgSt == NULL || req == NULL) { in GetMessageSt() 97 …int ret = SplitMessage(str, len, msgSt); // after split message, str no need to free(linux versio… in GetMessageSt()
|
D | appspawn_message.h | 48 int SplitMessage(const char *msg, unsigned int msgLen, MessageSt *msgSt);
|
/base/startup/appspawn_lite/services/include/ |
D | appspawn_process.h | 27 pid_t CreateProcess(const MessageSt* msgSt);
|
D | appspawn_message.h | 33 int SplitMessage(const char* msg, unsigned int msgLen, MessageSt* msgSt);
|