Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
77077f8e
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
77077f8e
编写于
6月 27, 2023
作者:
O
openharmony_ci
提交者:
Gitee
6月 27, 2023
浏览文件
操作
浏览文件
下载
差异文件
!2051 新增webspawn的seccomp策略名单
Merge pull request !2051 from 夏不白/nwebspawn_seccomp
上级
3c098ca8
bcc4cacc
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
94 addition
and
2 deletion
+94
-2
services/modules/seccomp/BUILD.gn
services/modules/seccomp/BUILD.gn
+18
-2
services/modules/seccomp/seccomp_policy/nwebspawn.seccomp.policy
...s/modules/seccomp/seccomp_policy/nwebspawn.seccomp.policy
+42
-0
services/modules/seccomp/seccomp_policy_constants.h
services/modules/seccomp/seccomp_policy_constants.h
+34
-0
未找到文件。
services/modules/seccomp/BUILD.gn
浏览文件 @
77077f8e
...
...
@@ -59,10 +59,10 @@ ohos_prebuilt_seccomp("appspawn_filter") {
install_images = [ "system" ]
}
ohos_prebuilt_seccomp("
nwebspawn
_filter") {
ohos_prebuilt_seccomp("
renderer
_filter") {
sources = [ "seccomp_policy/renderer.seccomp.policy" ]
filtername = "
nwebspawn
"
filtername = "
renderer
"
process_type = "app"
part_name = INIT_PART
...
...
@@ -72,6 +72,21 @@ ohos_prebuilt_seccomp("nwebspawn_filter") {
install_images = [ "system" ]
}
ohos_prebuilt_seccomp("nwebspawn_filter") {
sources = [ "seccomp_policy/nwebspawn.seccomp.policy" ]
filtername = "nwebspawn"
process_type = "system"
part_name = INIT_PART
subsystem_name = "startup"
include_dirs = [ "." ]
install_enable = true
install_images = [ "system" ]
}
ohos_prebuilt_seccomp("app_filter") {
sources = [ "seccomp_policy/app.seccomp.policy" ]
...
...
@@ -140,6 +155,7 @@ group("seccomp_filter") {
deps += [
":appspawn_filter",
":nwebspawn_filter",
":renderer_filter",
]
}
}
services/modules/seccomp/seccomp_policy/nwebspawn.seccomp.policy
0 → 100644
浏览文件 @
77077f8e
# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# For now, it supports architechture of ['arm', 'arm64'].
@returnValue
TRAP
@headFiles
"seccomp_policy_constants.h"
@mode
ONLY_CHECK_ARGS
@allowListWithArgs
setresuid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS && arg2 >= START_UID_FOR_RENDER_PROCESS && arg2 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setresgid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS && arg2 >= START_UID_FOR_RENDER_PROCESS && arg2 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setresuid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS && arg2 >= START_UID_FOR_RENDER_PROCESS && arg2 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setresgid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS && arg2 >= START_UID_FOR_RENDER_PROCESS && arg2 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setuid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setgid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setuid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setgid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setreuid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setregid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setreuid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setregid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS && arg1 >= START_UID_FOR_RENDER_PROCESS && arg1 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setfsuid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setfsgid: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;all
setfsuid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
setfsgid32: if arg0 >= START_UID_FOR_RENDER_PROCESS && arg0 <= END_UID_FOR_RENDER_PROCESS; return ALLOW; else return TRAP;arm
services/modules/seccomp/seccomp_policy_constants.h
0 → 100644
浏览文件 @
77077f8e
/*
* Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef SECCOMP_POLICY_CONSTANTS_H
#define SECCOMP_POLICY_CONSTANTS_H
#ifdef __cplusplus
#if __cplusplus
extern
"C"
{
#endif
#endif
#define START_UID_FOR_RENDER_PROCESS (1000000)
#define END_UID_FOR_RENDER_PROCESS (1099999)
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif // SECCOMP_POLICY_CONSTANTS_H
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录