提交 6a351122 编写于 作者: Y yichengzhao

add acls

Signed-off-by: Nyichengzhao <yichengzhao1@huawei.com>
Change-Id: I44e797fd2afab94b5d5088fcecd5c36ef7e7ef8f
上级 46752101
......@@ -142,6 +142,7 @@ typedef struct Service_ {
char apl[MAX_APL_NAME + 1];
ServiceArgs capsArgs;
ServiceArgs permArgs;
ServiceArgs permAclsArgs;
Perms servPerm;
ServiceArgs pathArgs;
ServiceArgs extraArgs;
......
......@@ -205,6 +205,7 @@ void ReleaseService(Service *service)
FreeServiceArg(&service->writePidArgs);
FreeServiceArg(&service->capsArgs);
FreeServiceArg(&service->permArgs);
FreeServiceArg(&service->permAclsArgs);
if (service->servPerm.caps != NULL) {
free(service->servPerm.caps);
......@@ -809,6 +810,7 @@ int ParseOneService(const cJSON *curItem, Service *service)
(void)GetServiceArgs(curItem, "writepid", MAX_WRITEPID_FILES, &service->writePidArgs);
(void)GetServiceArgs(curItem, D_CAPS_STR_IN_CFG, MAX_WRITEPID_FILES, &service->capsArgs);
(void)GetServiceArgs(curItem, "permission", MAX_WRITEPID_FILES, &service->permArgs);
(void)GetServiceArgs(curItem, "permission_acls", MAX_WRITEPID_FILES, &service->permAclsArgs);
(void)GetStringItem(curItem, APL_STR_IN_CFG, service->apl, MAX_APL_NAME);
(void)GetCpuArgs(curItem, CPU_CORE_STR_IN_CFG, service);
ret = GetServiceSandbox(curItem, service);
......
......@@ -151,8 +151,10 @@ void GetAccessToken(void)
NativeTokenInfoParams nativeTokenInfoParams = {
service->capsArgs.count,
service->permArgs.count,
service->permAclsArgs.count,
(const char **)service->capsArgs.argv,
(const char **)service->permArgs.argv,
(const char **)service->permAclsArgs.argv,
service->name,
service->apl,
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册