Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
5379a331
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5379a331
编写于
6月 09, 2017
作者:
J
John Johansen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
apparmor: support v7 transition format compatible with label_parse
Signed-off-by:
N
John Johansen
<
john.johansen@canonical.com
>
上级
064dc947
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
7 deletion
+15
-7
security/apparmor/apparmorfs.c
security/apparmor/apparmorfs.c
+2
-0
security/apparmor/policy_unpack.c
security/apparmor/policy_unpack.c
+13
-7
未找到文件。
security/apparmor/apparmorfs.c
浏览文件 @
5379a331
...
...
@@ -2103,6 +2103,8 @@ static struct aa_sfs_entry aa_sfs_entry_domain[] = {
static
struct
aa_sfs_entry
aa_sfs_entry_versions
[]
=
{
AA_SFS_FILE_BOOLEAN
(
"v5"
,
1
),
AA_SFS_FILE_BOOLEAN
(
"v6"
,
1
),
AA_SFS_FILE_BOOLEAN
(
"v7"
,
1
),
{
}
};
...
...
security/apparmor/policy_unpack.c
浏览文件 @
5379a331
...
...
@@ -466,7 +466,7 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
profile
->
file
.
trans
.
size
=
size
;
for
(
i
=
0
;
i
<
size
;
i
++
)
{
char
*
str
;
int
c
,
j
,
size2
=
unpack_strdup
(
e
,
&
str
,
NULL
);
int
c
,
j
,
pos
,
size2
=
unpack_strdup
(
e
,
&
str
,
NULL
);
/* unpack_strdup verifies that the last character is
* null termination byte.
*/
...
...
@@ -478,19 +478,25 @@ static bool unpack_trans_table(struct aa_ext *e, struct aa_profile *profile)
goto
fail
;
/* count internal # of internal \0 */
for
(
c
=
j
=
0
;
j
<
size2
-
2
;
j
++
)
{
if
(
!
str
[
j
])
for
(
c
=
j
=
0
;
j
<
size2
-
1
;
j
++
)
{
if
(
!
str
[
j
])
{
pos
=
j
;
c
++
;
}
}
if
(
*
str
==
':'
)
{
/* first character after : must be valid */
if
(
!
str
[
1
])
goto
fail
;
/* beginning with : requires an embedded \0,
* verify that exactly 1 internal \0 exists
* trailing \0 already verified by unpack_strdup
*
* convert \0 back to : for label_parse
*/
if
(
c
!=
1
)
goto
fail
;
/* first character after : must be valid */
if
(
!
str
[
1
])
if
(
c
==
1
)
str
[
pos
]
=
':'
;
else
if
(
c
>
1
)
goto
fail
;
}
else
if
(
c
)
/* fail - all other cases with embedded \0 */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录