Lines Matching refs:root
543 static int ParseNameGroupsConfig(AppSpawnSandboxCfg *sandbox, const cJSON *root)
545 APPSPAWN_CHECK(root != NULL, return APPSPAWN_SANDBOX_INVALID, "Invalid config ");
546 cJSON *configs = cJSON_GetObjectItemCaseSensitive(root, "name-groups");
592 static int ParseGlobalSandboxConfig(AppSpawnSandboxCfg *sandbox, const cJSON *root)
594 cJSON *json = cJSON_GetObjectItemCaseSensitive(root, "global");
597 char *rootPath = GetStringFromJsonObj(json, "sandbox-root");
598 APPSPAWN_CHECK(rootPath != NULL, return APPSPAWN_SYSTEM_ERROR, "No root path in config");
603 APPSPAWN_CHECK(sandbox->rootPath != NULL, return APPSPAWN_SYSTEM_ERROR, "Failed to copy root path");
613 APPSPAWN_STATIC int ParseAppSandboxConfig(const cJSON *root, ParseJsonContext *context)
615 APPSPAWN_CHECK(root != NULL && context != NULL && context->sandboxCfg != NULL,
618 int ret = ParseGlobalSandboxConfig(sandbox, root); // "global":
620 ret = ParseNameGroupsConfig(sandbox, root); // name-groups
624 cJSON *required = cJSON_GetObjectItemCaseSensitive(root, "required");
647 cJSON *json = cJSON_GetObjectItemCaseSensitive(root, "conditional");