/base/startup/appspawn/util/include/ |
D | sandbox_utils.h | 46 …static int32_t DoSandboxFileCommonBind(const ClientSocket::AppProperty *appProperty, nlohmann::jso… 47 static int32_t DoSandboxFileCommonSymlink(const ClientSocket::AppProperty *appProperty, 49 …static int32_t DoSandboxFilePrivateBind(const ClientSocket::AppProperty *appProperty, nlohmann::js… 50 static int32_t DoSandboxFilePrivateSymlink(const ClientSocket::AppProperty *appProperty, 52 … static int32_t DoSandboxFilePrivateFlagsPointHandle(const ClientSocket::AppProperty *appProperty, 54 static int32_t DoSandboxFileCommonFlagsPointHandle(const ClientSocket::AppProperty *appProperty, 56 static int32_t HandleFlagsPoint(const ClientSocket::AppProperty *appProperty, 58 static int32_t SetPrivateAppSandboxProperty(const ClientSocket::AppProperty *appProperty); 59 static int32_t SetCommonAppSandboxProperty(const ClientSocket::AppProperty *appProperty, 61 …static int32_t MountAllHsp(const ClientSocket::AppProperty *appProperty, std::string &sandboxPacka… [all …]
|
/base/startup/appspawn/lite/ |
D | appspawn_process.c | 86 AppSpawnClientLite *appProperty = (AppSpawnClientLite *)client; in SetProcessName() local 87 return prctl(PR_SET_NAME, appProperty->message.bundleName); in SetProcessName() 104 AppSpawnClientLite *appProperty = (AppSpawnClientLite *)client; in SetUidGid() local 105 APPSPAWN_LOGE("SetUidGid %d %d", appProperty->message.uID, appProperty->message.gID); in SetUidGid() 106 if (setgid(appProperty->message.gID) != 0) { in SetUidGid() 107 … APPSPAWN_LOGE("[appspawn] setgid failed, gID %u, err: %d.", appProperty->message.gID, errno); in SetUidGid() 111 if (setuid(appProperty->message.uID) != 0) { in SetUidGid() 112 … APPSPAWN_LOGE("[appspawn] setuid failed, uID %u, err: %d.", appProperty->message.uID, errno); in SetUidGid() 117 … if (appProperty->message.gID >= LOWER_BOUND_GID && appProperty->message.gID <= UPPER_BOUND_GID) { in SetUidGid() 118 groups[0] = appProperty->message.gID; in SetUidGid() [all …]
|
/base/startup/appspawn/util/src/ |
D | sandbox_utils.cpp | 287 string SandboxUtils::ConvertToRealPath(const ClientSocket::AppProperty *appProperty, std::string pa… in ConvertToRealPath() argument 290 std::string bundleNameIndex = appProperty->bundleName; in ConvertToRealPath() 291 bundleNameIndex = bundleNameIndex + "_" + std::to_string(appProperty->bundleIndex); in ConvertToRealPath() 296 path = replace_all(path, g_packageName, appProperty->bundleName); in ConvertToRealPath() 300 path = replace_all(path, g_userId, std::to_string(appProperty->uid / UID_BASE)); in ConvertToRealPath() 306 std::string SandboxUtils::GetSbxPathByConfig(const ClientSocket::AppProperty *appProperty, nlohmann… in GetSbxPathByConfig() argument 311 sandboxRoot = ConvertToRealPath(appProperty, sandboxRoot); in GetSbxPathByConfig() 313 sandboxRoot = g_sandBoxDir + appProperty->bundleName; in GetSbxPathByConfig() 315 "app name is %{public}s", appProperty->bundleName); in GetSbxPathByConfig() 336 static bool CheckMountConfig(nlohmann::json &mntPoint, const ClientSocket::AppProperty *appProperty, in CheckMountConfig() argument [all …]
|
/base/startup/appspawn/standard/ |
D | appspawn_process.c | 53 AppParameter *appProperty = &((AppSpawnClientExt *)client)->property; in SetAsanEnabledEnv() local 54 char *bundleName = appProperty->bundleName; in SetAsanEnabledEnv() 56 if ((appProperty->flags & APP_ASANENABLED) != 0) { in SetAsanEnabledEnv() 82 AppParameter *appProperty = &appPropertyExt->property; in SetProcessName() local 83 size_t len = strlen(appProperty->processName); in SetProcessName() 90 const char *pos = appProperty->processName; in SetProcessName() 107 isRet = strncpy_s(longProcName, longProcNameLen, appProperty->processName, len) != EOK; in SetProcessName() 116 AppSpawnClientExt *appProperty = (AppSpawnClientExt *)client; in SetKeepCapabilities() local 118 if (appProperty->property.uid != 0) { in SetKeepCapabilities() 169 AppSpawnClientExt *appProperty = (AppSpawnClientExt *)client; in InitDebugParams() local [all …]
|
D | appspawn_service.c | 265 static void HandleSpecial(AppSpawnClientExt *appProperty) in HandleSpecial() argument 273 if (strcmp(appProperty->property.bundleName, specialBundleNames[i]) == 0) { in HandleSpecial() 274 if (appProperty->property.gidCount < APP_MAX_GIDS) { in HandleSpecial() 275 appProperty->property.gidTable[appProperty->property.gidCount++] = GID_USER_DATA_RW; in HandleSpecial() 276 appProperty->property.gidTable[appProperty->property.gidCount++] = GID_FILE_ACCESS; in HandleSpecial() 283 static int WaitChild(int fd, int pid, const AppSpawnClientExt *appProperty) in WaitChild() argument 296 appProperty->property.processName, pid, fd); in WaitChild() 299 … APPSPAWN_LOGI("Error for child %{public}s %{public}d", appProperty->property.processName, pid); in WaitChild() 308 static void CheckColdAppEnabled(AppSpawnClientExt *appProperty) in CheckColdAppEnabled() argument 310 if ((appProperty->property.flags & 0x01) != 0) { in CheckColdAppEnabled() [all …]
|
/base/startup/appspawn/adapter/ |
D | appspawn_adapter.cpp | 41 AppSpawnClientExt *appProperty = reinterpret_cast<AppSpawnClientExt *>(client); in SetAppAccessToken() local 46 tokenId = tokenIdKit.GetRenderTokenID(appProperty->property.accessTokenIdEx); in SetAppAccessToken() 53 tokenId = appProperty->property.accessTokenIdEx; in SetAppAccessToken() 62 static_cast<unsigned long long>(appProperty->property.accessTokenIdEx), ret, getuid()); in SetAppAccessToken() 73 AppSpawnClientExt *appProperty = reinterpret_cast<AppSpawnClientExt *>(client); in SetSelinuxCon() local 76 hapDomainInfo.apl = appProperty->property.apl; in SetSelinuxCon() 77 hapDomainInfo.packageName = appProperty->property.processName; in SetSelinuxCon() 78 hapDomainInfo.hapFlags = appProperty->property.hapFlags; in SetSelinuxCon() 79 if ((appProperty->property.flags & APP_DEBUGGABLE) != 0) { in SetSelinuxCon() 85 errno, appProperty->property.apl); in SetSelinuxCon()
|
D | appspawn_nweb.cpp | 100 AppSpawnClientExt *appProperty = reinterpret_cast<AppSpawnClientExt *>(client); in RunChildProcessorNweb() local 109 funcNWebRenderMain(appProperty->property.renderCmd); in RunChildProcessorNweb() 188 AppSpawnClientExt *appProperty = reinterpret_cast<AppSpawnClientExt *>(client); in GetProcessTerminationStatus() local 189 APPSPAWN_CHECK(appProperty != nullptr, return -1, "Invalid client"); in GetProcessTerminationStatus() 191 int ret = GetProcessTerminationStatusInner(appProperty->property.pid, &exitStatus); in GetProcessTerminationStatus() 196 exitStatus, appProperty->property.pid, appProperty->property.uid, in GetProcessTerminationStatus() 197 appProperty->property.processName, appProperty->property.bundleName); in GetProcessTerminationStatus()
|
D | appspawn_ace.cpp | 137 AppSpawnClientExt *appProperty = reinterpret_cast<AppSpawnClientExt *>(client); in RunChildProcessor() local 138 if (appProperty->property.code == SPAWN_NATIVE_PROCESS) { in RunChildProcessor() 139 APPSPAWN_LOGI("renderCmd %{public}s", appProperty->property.renderCmd); in RunChildProcessor() 140 (void)system(appProperty->property.renderCmd); in RunChildProcessor()
|
/base/startup/appspawn/test/unittest/app_spawn_standard_test/ |
D | app_spawn_sandbox_test.cpp | 1086 static void InvalidJsonTest(ClientSocket::AppProperty* appProperty, std::string &testBundle) in InvalidJsonTest() argument 1089 appProperty->hspList = {strlen(hspListStr), 0, hspListStr}; in InvalidJsonTest() 1090 int ret = OHOS::AppSpawn::SandboxUtils::MountAllHsp(appProperty, testBundle); in InvalidJsonTest() 1094 static void NoBundleTest(ClientSocket::AppProperty* appProperty, std::string &testBundle) in NoBundleTest() argument 1100 appProperty->hspList = {strlen(hspListStr), 0, hspListStr}; in NoBundleTest() 1101 int ret = OHOS::AppSpawn::SandboxUtils::MountAllHsp(appProperty, testBundle); in NoBundleTest() 1105 static void NoModulesTest(ClientSocket::AppProperty* appProperty, std::string &testBundle) in NoModulesTest() argument 1111 appProperty->hspList = {strlen(hspListStr), 0, hspListStr}; in NoModulesTest() 1112 int ret = OHOS::AppSpawn::SandboxUtils::MountAllHsp(appProperty, testBundle); in NoModulesTest() 1116 static void NoVersionsTest(ClientSocket::AppProperty* appProperty, std::string &testBundle) in NoVersionsTest() argument [all …]
|
D | app_spawn_standard_test.cpp | 52 bool ReceiveRequestData(const TaskHandle taskHandle, AppSpawnClientExt *appProperty,
|