Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
e086e739
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看板
未验证
提交
e086e739
编写于
1月 17, 2023
作者:
O
openharmony_ci
提交者:
Gitee
1月 17, 2023
浏览文件
操作
浏览文件
下载
差异文件
!1701 FIX:修改编译告警,挑单monthly
Merge pull request !1701 from cheng_jinsong/cherry-pick-1673856143
上级
096c4f19
388bba7b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
14 addition
and
7 deletion
+14
-7
services/etc/param/param_fixer.py
services/etc/param/param_fixer.py
+4
-1
services/modules/seccomp/scripts/generate_code_from_policy.py
...ices/modules/seccomp/scripts/generate_code_from_policy.py
+6
-1
services/modules/selinux/selinux_adp.c
services/modules/selinux/selinux_adp.c
+3
-3
services/param/trigger/trigger_checker.c
services/param/trigger/trigger_checker.c
+1
-2
未找到文件。
services/etc/param/param_fixer.py
浏览文件 @
e086e739
...
...
@@ -17,6 +17,7 @@ import optparse
import
os
import
sys
import
json
import
stat
sys
.
path
.
append
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
os
.
pardir
,
os
.
pardir
,
os
.
pardir
,
os
.
pardir
,
os
.
pardir
,
os
.
pardir
,
"build"
))
...
...
@@ -66,7 +67,9 @@ def fix_para_file(options):
if
options
.
extra
:
parse_extra_params
(
options
.
extra
,
contents
)
with
open
(
options
.
output
,
'w'
)
as
f
:
flags
=
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_EXCL
modes
=
stat
.
S_IWUSR
|
stat
.
S_IRUSR
|
stat
.
S_IWGRP
|
stat
.
S_IRGRP
with
os
.
fdopen
(
os
.
open
(
options
.
output
,
flags
,
modes
),
'w'
)
as
f
:
for
key
in
contents
:
f
.
write
(
""
.
join
([
key
,
"="
,
contents
[
key
],
'
\n
'
]))
...
...
services/modules/seccomp/scripts/generate_code_from_policy.py
浏览文件 @
e086e739
...
...
@@ -20,6 +20,8 @@ import sys
import
argparse
import
textwrap
import
re
import
os
import
stat
supported_parse_item
=
[
'arch'
,
'labelName'
,
'priority'
,
'allowList'
,
'blockList'
,
'priorityWithArgs'
,
\
'allowListWithArgs'
,
'headFiles'
,
'selfDefineSyscall'
,
'returnValue'
,
'mode'
]
...
...
@@ -834,7 +836,10 @@ class SeccompPolicyParser:
content
=
header
+
'
\n
'
.
join
(
extra_header_list
)
+
array_name
+
\
' '
+
'
\n
'
.
join
(
self
.
bpf_generator
.
bpf_policy
)
+
footer
with
open
(
args
.
dstfile
,
'w'
)
as
output_file
:
flags
=
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_EXCL
modes
=
stat
.
S_IWUSR
|
stat
.
S_IRUSR
|
stat
.
S_IWGRP
|
stat
.
S_IRGRP
with
os
.
fdopen
(
os
.
open
(
args
.
dstfile
,
flags
,
modes
),
'w'
)
as
output_file
:
output_file
.
write
(
content
)
@
staticmethod
...
...
services/modules/selinux/selinux_adp.c
浏览文件 @
e086e739
...
...
@@ -36,7 +36,7 @@ extern char *__progname;
static
int
LoadSelinuxPolicy
(
int
id
,
const
char
*
name
,
int
argc
,
const
char
**
argv
)
{
int
ret
;
char
process
_c
ontext
[
MAX_SECON_LEN
];
char
process
C
ontext
[
MAX_SECON_LEN
];
UNUSED
(
id
);
UNUSED
(
name
);
...
...
@@ -50,11 +50,11 @@ static int LoadSelinuxPolicy(int id, const char *name, int argc, const char **ar
PLUGIN_LOGI
(
"main, load_policy success."
);
}
ret
=
snprintf_s
(
process
_context
,
sizeof
(
process_context
),
sizeof
(
process_c
ontext
)
-
1
,
"u:r:%s:s0"
,
__progname
);
ret
=
snprintf_s
(
process
Context
,
sizeof
(
processContext
),
sizeof
(
processC
ontext
)
-
1
,
"u:r:%s:s0"
,
__progname
);
if
(
ret
==
-
1
)
{
setcon
(
"u:r:init:s0"
);
}
else
{
setcon
(
process
_c
ontext
);
setcon
(
process
C
ontext
);
}
(
void
)
RestoreconRecurse
(
"/dev"
);
return
0
;
...
...
services/param/trigger/trigger_checker.c
浏览文件 @
e086e739
...
...
@@ -329,8 +329,7 @@ int CheckMatchSubCondition(const char *condition, const char *input, int length)
PARAM_CHECK
(
condition
!=
NULL
,
return
0
,
"Invalid condition"
);
PARAM_CHECK
(
input
!=
NULL
,
return
0
,
"Invalid input"
);
const
char
*
tmp
=
strstr
(
condition
,
input
);
while
(
tmp
!=
NULL
)
{
while
(
tmp
!=
NULL
)
{
PARAM_LOGV
(
"CheckMatchSubCondition Condition: '%s' content: '%s' length %d"
,
condition
,
input
,
length
);
if
(((
int
)
strlen
(
tmp
)
<=
length
)
||
(
tmp
[
length
]
!=
'='
))
{
return
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录