Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
8651e1d6
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
8651e1d6
编写于
7月 10, 2013
作者:
J
John Johansen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
apparmor: make free_profile available outside of policy.c
Signed-off-by:
N
John Johansen
<
john.johansen@canonical.com
>
上级
742058b0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
security/apparmor/include/policy.h
security/apparmor/include/policy.h
+1
-0
security/apparmor/policy.c
security/apparmor/policy.c
+4
-5
security/apparmor/policy_unpack.c
security/apparmor/policy_unpack.c
+2
-2
未找到文件。
security/apparmor/include/policy.h
浏览文件 @
8651e1d6
...
...
@@ -228,6 +228,7 @@ struct aa_namespace *aa_find_namespace(struct aa_namespace *root,
void
aa_free_replacedby_kref
(
struct
kref
*
kref
);
struct
aa_profile
*
aa_alloc_profile
(
const
char
*
name
);
struct
aa_profile
*
aa_new_null_profile
(
struct
aa_profile
*
parent
,
int
hat
);
void
aa_free_profile
(
struct
aa_profile
*
profile
);
void
aa_free_profile_kref
(
struct
kref
*
kref
);
struct
aa_profile
*
aa_find_child
(
struct
aa_profile
*
parent
,
const
char
*
name
);
struct
aa_profile
*
aa_lookup_profile
(
struct
aa_namespace
*
ns
,
const
char
*
name
);
...
...
security/apparmor/policy.c
浏览文件 @
8651e1d6
...
...
@@ -307,7 +307,6 @@ static struct aa_namespace *alloc_namespace(const char *prefix,
return
NULL
;
}
static
void
free_profile
(
struct
aa_profile
*
profile
);
/**
* free_namespace - free a profile namespace
* @ns: the namespace to free (MAYBE NULL)
...
...
@@ -324,7 +323,7 @@ static void free_namespace(struct aa_namespace *ns)
aa_put_namespace
(
ns
->
parent
);
ns
->
unconfined
->
ns
=
NULL
;
free_profile
(
ns
->
unconfined
);
aa_
free_profile
(
ns
->
unconfined
);
kzfree
(
ns
);
}
...
...
@@ -568,7 +567,7 @@ void aa_free_replacedby_kref(struct kref *kref)
}
/**
* free_profile - free a profile
*
aa_
free_profile - free a profile
* @profile: the profile to free (MAYBE NULL)
*
* Free a profile, its hats and null_profile. All references to the profile,
...
...
@@ -577,7 +576,7 @@ void aa_free_replacedby_kref(struct kref *kref)
* If the profile was referenced from a task context, free_profile() will
* be called from an rcu callback routine, so we must not sleep here.
*/
static
void
free_profile
(
struct
aa_profile
*
profile
)
void
aa_
free_profile
(
struct
aa_profile
*
profile
)
{
AA_DEBUG
(
"%s(%p)
\n
"
,
__func__
,
profile
);
...
...
@@ -612,7 +611,7 @@ static void aa_free_profile_rcu(struct rcu_head *head)
if
(
p
->
flags
&
PFLAG_NS_COUNT
)
free_namespace
(
p
->
ns
);
else
free_profile
(
p
);
aa_
free_profile
(
p
);
}
/**
...
...
security/apparmor/policy_unpack.c
浏览文件 @
8651e1d6
...
...
@@ -616,7 +616,7 @@ static struct aa_profile *unpack_profile(struct aa_ext *e)
else
if
(
!
name
)
name
=
"unknown"
;
audit_iface
(
profile
,
name
,
"failed to unpack profile"
,
e
,
error
);
aa_
put
_profile
(
profile
);
aa_
free
_profile
(
profile
);
return
ERR_PTR
(
error
);
}
...
...
@@ -763,7 +763,7 @@ int aa_unpack(void *udata, size_t size, struct list_head *lh, const char **ns)
error
=
verify_profile
(
profile
);
if
(
error
)
{
aa_
put
_profile
(
profile
);
aa_
free
_profile
(
profile
);
goto
fail
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录