Lines Matching defs:property

66 static int SetProcessName(const AppSpawnMgr *content, const AppSpawningCtx *property)
68 const char *processName = GetProcessName(property);
99 static int SetKeepCapabilities(const AppSpawnMgr *content, const AppSpawningCtx *property)
101 AppSpawnMsgDacInfo *dacInfo = (AppSpawnMsgDacInfo *)GetAppProperty(property, TLV_DAC_INFO);
103 "No tlv %{public}d in msg %{public}s", TLV_DOMAIN_INFO, GetProcessName(property));
113 static int SetCapabilities(const AppSpawnMgr *content, const AppSpawningCtx *property)
152 static void InitDebugParams(const AppSpawnMgr *content, const AppSpawningCtx *property)
159 const char *processName = GetProcessName(property);
177 static void ClearEnvironment(const AppSpawnMgr *content, const AppSpawningCtx *property)
185 AppSpawningCtx *ctx = (AppSpawningCtx *)property;
191 static int SetXpmConfig(const AppSpawnMgr *content, const AppSpawningCtx *property)
200 char *provisionType = GetAppPropertyExt(property, MSG_EXT_NAME_PROVISION_TYPE, &len);
206 AppSpawnMsgOwnerId *ownerInfo = (AppSpawnMsgOwnerId *)GetAppProperty(property, TLV_OWNER_INFO);
207 int jitfortEnable = IsJitFortModeOn(property) ? 1 : 0;
214 } else if (CheckAppMsgFlagsSet(property, APP_FLAGS_TEMP_JIT)) {
227 static int SetUidGid(const AppSpawnMgr *content, const AppSpawningCtx *property)
229 AppSpawnMsgDacInfo *dacInfo = (AppSpawnMsgDacInfo *)GetAppProperty(property, TLV_DAC_INFO);
231 "No tlv %{public}d in msg %{public}s", TLV_DAC_INFO, GetProcessName(property));
252 ret = SetSeccompFilter(content, property);
262 if (CheckAppMsgFlagsSet(property, APP_FLAGS_DEBUGGABLE) && IsDeveloperModeOn(property)) {
273 static int32_t SetFileDescriptors(const AppSpawnMgr *content, const AppSpawningCtx *property)
332 static int32_t WaitForDebugger(const AppSpawningCtx *property)
335 if (CheckAppMsgFlagsSet(property, APP_FLAGS_NATIVEDEBUG) && CheckAppMsgFlagsSet(property, APP_FLAGS_DEBUGGABLE)) {
356 static int SpawnInitSpawningEnv(AppSpawnMgr *content, AppSpawningCtx *property)
359 int ret = SetProcessName(content, property);
362 ClearEnvironment(content, property);
366 ret = SetAppAccessToken(content, property);
371 static int SpawnSetAppEnv(AppSpawnMgr *content, AppSpawningCtx *property)
374 int ret = SetEnvInfo(content, property);
379 static int SpawnSetIntPermission(AppSpawnMgr *content, AppSpawningCtx *property)
382 int ret = SetInternetPermission(property);
387 static void SpawnLoadSilk(const AppSpawnMgr *content, const AppSpawningCtx *property)
389 const char *processName = GetBundleName(property);
394 static int SpawnSetProperties(AppSpawnMgr *content, AppSpawningCtx *property)
396 APPSPAWN_LOGV("Spawning: set child property");
397 SpawnLoadSilk(content, property);
399 int ret = SetKeepCapabilities(content, property);
401 ret = SetXpmConfig(content, property);
404 ret = SetProcessName(content, property);
407 ret = SetUidGid(content, property);
410 ret = SetFileDescriptors(content, property);
413 ret = SetCapabilities(content, property);
416 ret = SetSelinuxCon(content, property) == -1;
419 ret = WaitForDebugger(property);
422 APPSPAWN_ONLY_EXPER(GetAppSpawnMsgType(property) == MSG_SPAWN_NATIVE_PROCESS, return 0);
437 static int SpawnComplete(AppSpawnMgr *content, AppSpawningCtx *property)
439 InitDebugParams(content, property);
452 static int SpawnGetSpawningFlag(AppSpawnMgr *content, AppSpawningCtx *property)
454 APPSPAWN_LOGV("Spawning: prepare app %{public}s", GetProcessName(property));
455 if (CheckAppMsgFlagsSet(property, APP_FLAGS_COLD_BOOT)) {
457 property->client.flags |= CheckEnabled("startup.appspawn.cold.boot", "true") ? APP_COLD_START : 0;
459 if (CheckAppMsgFlagsSet(property, APP_FLAGS_BEGETCTL_BOOT)) {
461 property->client.flags |= APP_BEGETCTL_BOOT;
462 APPSPAWN_LOGI("Spawning: prepare app %{public}s, start from begetctl", GetProcessName(property));
464 property->client.flags |= content->flags;
477 static int CloseFdArgs(AppSpawnMgr *content, AppSpawningCtx *property)
479 APPSPAWN_CHECK(property != NULL && property->message != NULL
480 && property->message->connection != NULL,
482 int fdCount = property->message->connection->receiverCtx.fdCount;
483 int *fds = property->message->connection->receiverCtx.fds;
491 property->message->connection->receiverCtx.fdCount = 0;
495 APPSPAWN_STATIC int SetFdEnv(AppSpawnMgr *content, AppSpawningCtx *property)
497 APPSPAWN_CHECK_ONLY_EXPER(property != NULL, return -1);
498 APPSPAWN_CHECK_ONLY_EXPER(!property->isPrefork, return 0);
499 AppSpawnMsgNode *message = property->message;