提交 a808011e 编写于 作者: Y yichengzhao

check permission

Signed-off-by: Nyichengzhao <yichengzhao1@huawei.com>
Change-Id: I9895bf3bd0d42575afafe05470f3dc447136ea85
上级 18080436
...@@ -274,7 +274,8 @@ static int GetServiceArgs(const cJSON *argJson, const char *name, int maxCount, ...@@ -274,7 +274,8 @@ static int GetServiceArgs(const cJSON *argJson, const char *name, int maxCount,
args->argv[i] = NULL; args->argv[i] = NULL;
} }
// ServiceArgs have a variety of uses, some requiring a NULL ending, some not // ServiceArgs have a variety of uses, some requiring a NULL ending, some not
if (strcmp(name, D_CAPS_STR_IN_CFG) != 0) { if (strcmp(name, D_CAPS_STR_IN_CFG) != 0 && strcmp(name, "permission_acls") != 0 &&
strcmp(name, "permission") != 0) {
args->count = count + 1; args->count = count + 1;
} else { } else {
args->count = count; args->count = count;
...@@ -611,7 +612,8 @@ static int CheckServiceKeyName(const cJSON *curService) ...@@ -611,7 +612,8 @@ static int CheckServiceKeyName(const cJSON *curService)
char *cfgServiceKeyList[] = { char *cfgServiceKeyList[] = {
"name", "path", "uid", "gid", "once", "importance", "caps", "disabled", "name", "path", "uid", "gid", "once", "importance", "caps", "disabled",
"writepid", "critical", "socket", "console", "file", "ondemand", "writepid", "critical", "socket", "console", "file", "ondemand",
"d-caps", "apl", "jobs", "start-mode", "end-mode", "cpucore", "secon", "sandbox" "d-caps", "apl", "jobs", "start-mode", "end-mode", "cpucore", "secon", "sandbox",
"permission", "permission_acls"
}; };
INIT_CHECK_RETURN_VALUE(curService != NULL, SERVICE_FAILURE); INIT_CHECK_RETURN_VALUE(curService != NULL, SERVICE_FAILURE);
cJSON *child = curService->child; cJSON *child = curService->child;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册