/base/startup/appspawn/modules/sandbox/ |
H A D | sandbox_utils.h | 40 static int32_t SetAppSandboxProperty(AppSpawningCtx *client, uint32_t sandboxNsFlags = CLONE_NEWNS); 41 static int32_t SetAppSandboxPropertyNweb(AppSpawningCtx *client, uint32_t sandboxNsFlags = CLONE_NEWNS); 44 static std::string GetExtraInfoByType(const AppSpawningCtx *appProperty, const std::string &type); 58 static int32_t DoSandboxFileCommonBind(const AppSpawningCtx *appProperty, nlohmann::json &wholeConfig); 59 static int32_t DoSandboxFileCommonSymlink(const AppSpawningCtx *appProperty, 61 static int32_t DoSandboxFilePrivateBind(const AppSpawningCtx *appProperty, nlohmann::json &wholeConfig); 62 static int32_t DoSandboxFilePrivateSymlink(const AppSpawningCtx *appProperty, 64 static int32_t DoSandboxFilePrivateFlagsPointHandle(const AppSpawningCtx *appProperty, 66 static int32_t DoSandboxFileCommonFlagsPointHandle(const AppSpawningCtx *appProperty, 68 static int32_t HandleFlagsPoint(const AppSpawningCtx *appPropert [all...] |
H A D | sandbox_utils.cpp | 149 static uint32_t GetAppMsgFlags(const AppSpawningCtx *property) in GetAppMsgFlags() 378 static void MakeAtomicServiceDir(const AppSpawningCtx *appProperty, std::string path) 426 static std::string ReplaceVariablePackageName(const AppSpawningCtx *appProperty, const std::string &path) in ReplaceVariablePackageName() 478 string SandboxUtils::ConvertToRealPath(const AppSpawningCtx *appProperty, std::string path) in ConvertToRealPath() 516 std::string SandboxUtils::ConvertToRealPathWithPermission(const AppSpawningCtx *appProperty, in ConvertToRealPathWithPermission() 561 std::string SandboxUtils::GetSbxPathByConfig(const AppSpawningCtx *appProperty, nlohmann::json &config) in GetSbxPathByConfig() 604 static bool CheckMountConfig(nlohmann::json &mntPoint, const AppSpawningCtx *appProperty, in CheckMountConfig() 639 static int32_t DoDlpAppMountStrategy(const AppSpawningCtx *appProperty, in DoDlpAppMountStrategy() 685 static int32_t HandleSpecialAppMount(const AppSpawningCtx *appProperty, in HandleSpecialAppMount() 734 std::string SandboxUtils::GetSandboxOptions(const AppSpawningCtx *appPropert [all...] |
/base/startup/appspawn/modules/common/ |
H A D | appspawn_adapter.h | 25 int SetAppAccessToken(const AppSpawnMgr *content, const AppSpawningCtx *property); 26 int SetSelinuxCon(const AppSpawnMgr *content, const AppSpawningCtx *property); 29 int SetSeccompFilter(const AppSpawnMgr *content, const AppSpawningCtx *property); 30 int SetInternetPermission(const AppSpawningCtx *property); 31 int32_t SetEnvInfo(const AppSpawnMgr *content, const AppSpawningCtx *property);
|
H A D | appspawn_common.c | 66 static int SetProcessName(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetProcessName() 99 static int SetKeepCapabilities(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetKeepCapabilities() 113 static int SetCapabilities(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetCapabilities() 152 static void InitDebugParams(const AppSpawnMgr *content, const AppSpawningCtx *property) in InitDebugParams() 177 static void ClearEnvironment(const AppSpawnMgr *content, const AppSpawningCtx *property) in ClearEnvironment() 185 AppSpawningCtx *ctx = (AppSpawningCtx *)property; in ClearEnvironment() 191 static int SetXpmConfig(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetXpmConfig() 227 static int SetUidGid(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetUidGid() 273 static int32_t SetFileDescriptors(const AppSpawnMgr *content, const AppSpawningCtx *propert [all...] |
H A D | appspawn_adapter.cpp | 46 int SetAppAccessToken(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetAppAccessToken() 68 int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetSelinuxConNweb() 85 int SetSelinuxCon(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetSelinuxCon() 160 int SetSeccompFilter(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetSeccompFilter() 206 int SetInternetPermission(const AppSpawningCtx *property) in SetInternetPermission() 219 void InitAppCommonEnv(const AppSpawningCtx *property) in InitAppCommonEnv() 233 int32_t SetEnvInfo(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetEnvInfo()
|
H A D | appspawn_begetctl.c | 68 APPSPAWN_STATIC int RunBegetctlBootApp(AppSpawnMgr *content, AppSpawningCtx *property) in RunBegetctlBootApp()
|
H A D | appspawn_namespace.c | 238 APPSPAWN_STATIC int PreForkSetPidNamespace(AppSpawnMgr *content, AppSpawningCtx *property) in PreForkSetPidNamespace() 250 APPSPAWN_STATIC int PostForkSetPidNamespace(AppSpawnMgr *content, AppSpawningCtx *property) in PostForkSetPidNamespace()
|
/base/startup/appspawn/test/moduletest/plugin-sample/ |
H A D | appspawn_plugin_sample.c | 45 static int TestPluginPreFork(AppSpawnMgr *content, AppSpawningCtx *property) in TestPluginPreFork() 51 static int TestPluginPreReply(AppSpawnMgr *content, AppSpawningCtx *property) in TestPluginPreReply() 57 static int TestPluginPostReply(AppSpawnMgr *content, AppSpawningCtx *property) in TestPluginPostReply() 63 static int ChildPreColdBoot(AppSpawnMgr *content, AppSpawningCtx *property) in ChildPreColdBoot() 68 static int ChildExecute(AppSpawnMgr *content, AppSpawningCtx *property) in ChildExecute() 73 static int ChildPreRely(AppSpawnMgr *content, AppSpawningCtx *property) in ChildPreRely() 78 static int ChildPostRely(AppSpawnMgr *content, AppSpawningCtx *property) in ChildPostRely() 83 static int ChildPreRun(AppSpawnMgr *content, AppSpawningCtx *property) in ChildPreRun()
|
/base/startup/appspawn/test/mock/ |
H A D | app_spawn_stub.h | 39 typedef struct TagAppSpawningCtx AppSpawningCtx;
typedef 58 int PreForkSetPidNamespace(AppSpawnMgr *content, AppSpawningCtx *property);
59 int PostForkSetPidNamespace(AppSpawnMgr *content, AppSpawningCtx *property);
76 int SpawnPrepareSandboxCfg(AppSpawnMgr *content, AppSpawningCtx *property);
96 int AppSpawnClearEnv(AppSpawnMgr *content, AppSpawningCtx *property);
98 int WriteMsgToChild(AppSpawningCtx *property, bool isNweb);
104 int SetProcessName(const AppSpawnMgr *content, const AppSpawningCtx *property);
105 int SetFdEnv(AppSpawnMgr *content, AppSpawningCtx *property);
111 int RunBegetctlBootApp(AppSpawnMgr *content, AppSpawningCtx *property);
133 int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *propert [all...] |
/base/startup/appspawn/standard/ |
H A D | appspawn_manager.h | 87 } AppSpawningCtx; typedef 149 typedef void (*ProcessTraversal)(const AppSpawnMgr *mgr, AppSpawningCtx *ctx, void *data); 151 AppSpawningCtx *GetAppSpawningCtxByPid(pid_t pid); 152 AppSpawningCtx *CreateAppSpawningCtx(); 153 void DeleteAppSpawningCtx(AppSpawningCtx *property); 198 APPSPAWN_INLINE int IsDeveloperModeOn(const AppSpawningCtx *property) in IsDeveloperModeOn() 203 APPSPAWN_INLINE int IsJitFortModeOn(const AppSpawningCtx *property) in IsJitFortModeOn() 208 APPSPAWN_INLINE int GetAppSpawnMsgType(const AppSpawningCtx *appProperty) in GetAppSpawnMsgType() 214 APPSPAWN_INLINE const char *GetProcessName(const AppSpawningCtx *property) in GetProcessName() 222 APPSPAWN_INLINE const char *GetBundleName(const AppSpawningCtx *propert [all...] |
H A D | appspawn_appmgr.c | 80 AppSpawningCtx *property = ListEntry(node, AppSpawningCtx, node); in SpawningQueueDestroy() 279 AppSpawningCtx *CreateAppSpawningCtx(void) in CreateAppSpawningCtx() 282 AppSpawningCtx *property = (AppSpawningCtx *)malloc(sizeof(AppSpawningCtx)); in CreateAppSpawningCtx() 283 APPSPAWN_CHECK(property != NULL, return NULL, "Failed to create AppSpawningCtx "); in CreateAppSpawningCtx() 304 void DeleteAppSpawningCtx(AppSpawningCtx *property) in DeleteAppSpawningCtx() 336 AppSpawningCtx *property = ListEntry(node, AppSpawningCtx, nod in AppPropertyComparePid() [all...] |
H A D | appspawn_service.c | 212 static void AppSpawningCtxOnClose(const AppSpawnMgr *mgr, AppSpawningCtx *ctx, void *data) in AppSpawningCtxOnClose() 511 APPSPAWN_STATIC int WriteMsgToChild(AppSpawningCtx *property, bool isNweb) in WriteMsgToChild() 536 static int InitForkContext(AppSpawningCtx *property) in InitForkContext() 580 static void WatchChildProcessFd(AppSpawningCtx *property) in WatchChildProcessFd() 621 static int IsChildColdRun(AppSpawningCtx *property) in IsChildColdRun() 630 static int AddChildWatcher(AppSpawningCtx *property) in AddChildWatcher() 675 static int WritePreforkMsg(AppSpawningCtx *property) in WritePreforkMsg() 696 static int GetAppSpawnMsg(AppSpawningCtx *property) in GetAppSpawnMsg() 760 static void ProcessPreFork(AppSpawnContent *content, AppSpawningCtx *property) in ProcessPreFork() 808 AppSpawningCtx *propert in AppSpawnProcessMsgForPrefork() [all...] |
/base/startup/appspawn/test/unittest/app_spawn_standard_test/ |
H A D | app_spawn_sandbox_test.cpp | 56 static AppSpawningCtx *GetTestAppProperty() in GetTestAppProperty() 66 static AppSpawningCtx *GetTestAppPropertyWithExtInfo(const char *name, const char *value) in GetTestAppPropertyWithExtInfo() 90 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 108 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 121 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 135 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 150 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 164 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 206 AppSpawningCtx *appProperty = GetTestAppProperty(); in HWTEST_F() 248 AppSpawningCtx *appPropert in HWTEST_F() [all...] |
H A D | app_spawn_common_test.cpp | 45 APPSPAWN_STATIC int RunChildByRenderCmd(const AppSpawnMgr *content, const AppSpawningCtx *property);
71 AppSpawningCtx *property = nullptr;
in HWTEST_F() 98 AppSpawningCtx *property = nullptr;
in HWTEST_F() 125 AppSpawningCtx *property = nullptr;
in HWTEST_F() 155 AppSpawningCtx *property = nullptr;
in HWTEST_F() 187 AppSpawningCtx *property = nullptr;
in HWTEST_F() 219 AppSpawningCtx *property = nullptr;
in HWTEST_F() 251 AppSpawningCtx *property = nullptr;
in HWTEST_F() 273 AppSpawningCtx *property = nullptr;
in HWTEST_F() 295 AppSpawningCtx *propert in HWTEST_F() [all...] |
H A D | app_spawn_child_test.cpp | 77 AppSpawningCtx *property = nullptr; in HWTEST_F() 114 AppSpawningCtx *property = nullptr; in HWTEST_F() 151 AppSpawningCtx *property = nullptr; in HWTEST_F() 190 AppSpawningCtx *property = nullptr; in HWTEST_F() 230 AppSpawningCtx *property = nullptr; in HWTEST_F() 271 AppSpawningCtx *property = nullptr; in HWTEST_F() 315 AppSpawningCtx *property = nullptr; in HWTEST_F() 359 AppSpawningCtx *property = nullptr; in HWTEST_F() 404 AppSpawningCtx *property = nullptr; in HWTEST_F() 441 AppSpawningCtx *propert in HWTEST_F() [all...] |
H A D | app_spawn_sandbox_new_test.cpp | 308 static AppSpawningCtx *TestCreateAppSpawningCtx() in TestCreateAppSpawningCtx() 318 static SandboxContext *TestGetSandboxContext(const AppSpawningCtx *property, int nwebspawn) in TestGetSandboxContext() 457 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 478 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 500 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 529 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 567 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 592 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 616 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx(); in HWTEST_F() 640 AppSpawningCtx *spawningCt in HWTEST_F() [all...] |
H A D | app_spawn_beget_test.cpp | 119 AppSpawningCtx *property = nullptr; in HWTEST_F() 163 AppSpawningCtx *property = nullptr; in HWTEST_F() 190 AppSpawningCtx *property = nullptr; in HWTEST_F()
|
H A D | app_spawn_sandbox_new_mount_test.cpp | 64 static AppSpawningCtx *TestCreateAppSpawningCtx()
in TestCreateAppSpawningCtx() 74 static SandboxContext *TestGetSandboxContext(const AppSpawningCtx *property, int nwebspawn)
in TestGetSandboxContext() 112 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx();
in HWTEST_F() 134 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx();
in HWTEST_F() 251 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx();
in HWTEST_F() 296 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx();
in HWTEST_F() 321 AppSpawningCtx *spawningCtx = TestCreateAppSpawningCtx();
in HWTEST_F() 487 AppSpawningCtx property = {};
in HWTEST_F()
|
/base/startup/appspawn/modules/asan/ |
H A D | asan_detector.c | 49 static int SetAsanEnabledEnv(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetAsanEnabledEnv() 87 static void SetGwpAsanEnabled(const AppSpawnMgr *content, const AppSpawningCtx *property) in SetGwpAsanEnabled() 118 static int AsanSpawnGetSpawningFlag(AppSpawnMgr *content, AppSpawningCtx *property) in AsanSpawnGetSpawningFlag() 143 static int AsanSpawnInitSpawningEnv(AppSpawnMgr *content, AppSpawningCtx *property) in AsanSpawnInitSpawningEnv()
|
/base/startup/appspawn/modules/native_adapter/ |
H A D | native_adapter.cpp | 81 static int RunChildThread(const AppSpawnMgr *content, const AppSpawningCtx *property) in RunChildThread() 104 AppSpawningCtx *property = reinterpret_cast<AppSpawningCtx *>(client); in RunChildProcessor()
|
/base/startup/appspawn/test/unittest/app_spawn_client_test/ |
H A D | app_spawn_client_test.cpp | 227 AppSpawningCtx *property = nullptr; in HWTEST_F() 262 AppSpawningCtx *property = nullptr; in HWTEST_F() 302 AppSpawningCtx *property = nullptr; in HWTEST_F() 342 AppSpawningCtx *property = nullptr; in HWTEST_F() 380 AppSpawningCtx *property = nullptr; in HWTEST_F() 416 AppSpawningCtx *property = nullptr; in HWTEST_F() 452 AppSpawningCtx *property = nullptr; in HWTEST_F() 488 AppSpawningCtx *property = nullptr; in HWTEST_F() 523 AppSpawningCtx *property = nullptr; in HWTEST_F() 575 AppSpawningCtx *propert in HWTEST_F() [all...] |
/base/startup/appspawn/modules/nweb_adapter/ |
H A D | nwebspawn_adapter.cpp | 101 reinterpret_cast<AppSpawningCtx *>(client), MSG_EXT_NAME_RENDER_CMD, &len)); in RunChildProcessor() 139 reinterpret_cast<AppSpawningCtx *>(client), MSG_EXT_NAME_PROCESS_TYPE, &len)); in RunChildProcessor()
|
/base/startup/appspawn/modules/module_engine/include/ |
H A D | appspawn_hook.h | 35 typedef struct TagAppSpawningCtx AppSpawningCtx; typedef 101 typedef int (*AppSpawnHook)(AppSpawnMgr *content, AppSpawningCtx *property);
|
/base/startup/appspawn/modules/ace_adapter/ |
H A D | ace_adapter.cpp | 188 static int RunChildThread(const AppSpawnMgr *content, const AppSpawningCtx *property) in RunChildThread() 208 APPSPAWN_STATIC int RunChildByRenderCmd(const AppSpawnMgr *content, const AppSpawningCtx *property) in RunChildByRenderCmd() 245 AppSpawningCtx *property = reinterpret_cast<AppSpawningCtx *>(client); in RunChildProcessor()
|
/base/startup/appspawn/common/ |
H A D | appspawn_server.c | 159 AppSpawningCtx *property = (AppSpawningCtx *)client; in NwebSpawnCloneChildProcess()
|