Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8a17ef9d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
170
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看板
提交
8a17ef9d
编写于
9月 21, 2016
作者:
J
James Morris
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'stable-4.9' of
git://git.infradead.org/users/pcmoore/selinux
into next
上级
de2f4b34
43af5de7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
8 deletion
+23
-8
include/linux/lsm_audit.h
include/linux/lsm_audit.h
+2
-0
security/lsm_audit.c
security/lsm_audit.c
+13
-0
security/selinux/hooks.c
security/selinux/hooks.c
+8
-8
未找到文件。
include/linux/lsm_audit.h
浏览文件 @
8a17ef9d
...
...
@@ -59,6 +59,7 @@ struct common_audit_data {
#define LSM_AUDIT_DATA_INODE 9
#define LSM_AUDIT_DATA_DENTRY 10
#define LSM_AUDIT_DATA_IOCTL_OP 11
#define LSM_AUDIT_DATA_FILE 12
union
{
struct
path
path
;
struct
dentry
*
dentry
;
...
...
@@ -75,6 +76,7 @@ struct common_audit_data {
#endif
char
*
kmod_name
;
struct
lsm_ioctlop_audit
*
op
;
struct
file
*
file
;
}
u
;
/* this union contains LSM specific data */
union
{
...
...
security/lsm_audit.c
浏览文件 @
8a17ef9d
...
...
@@ -245,6 +245,19 @@ static void dump_common_audit_data(struct audit_buffer *ab,
}
break
;
}
case
LSM_AUDIT_DATA_FILE
:
{
struct
inode
*
inode
;
audit_log_d_path
(
ab
,
" path="
,
&
a
->
u
.
file
->
f_path
);
inode
=
file_inode
(
a
->
u
.
file
);
if
(
inode
)
{
audit_log_format
(
ab
,
" dev="
);
audit_log_untrustedstring
(
ab
,
inode
->
i_sb
->
s_id
);
audit_log_format
(
ab
,
" ino=%lu"
,
inode
->
i_ino
);
}
break
;
}
case
LSM_AUDIT_DATA_IOCTL_OP
:
{
struct
inode
*
inode
;
...
...
security/selinux/hooks.c
浏览文件 @
8a17ef9d
...
...
@@ -1761,8 +1761,8 @@ static inline int file_path_has_perm(const struct cred *cred,
{
struct
common_audit_data
ad
;
ad
.
type
=
LSM_AUDIT_DATA_
PATH
;
ad
.
u
.
path
=
file
->
f_path
;
ad
.
type
=
LSM_AUDIT_DATA_
FILE
;
ad
.
u
.
file
=
file
;
return
inode_has_perm
(
cred
,
file_inode
(
file
),
av
,
&
ad
);
}
...
...
@@ -1784,8 +1784,8 @@ static int file_has_perm(const struct cred *cred,
u32
sid
=
cred_sid
(
cred
);
int
rc
;
ad
.
type
=
LSM_AUDIT_DATA_
PATH
;
ad
.
u
.
path
=
file
->
f_path
;
ad
.
type
=
LSM_AUDIT_DATA_
FILE
;
ad
.
u
.
file
=
file
;
if
(
sid
!=
fsec
->
sid
)
{
rc
=
avc_has_perm
(
sid
,
fsec
->
sid
,
...
...
@@ -2365,8 +2365,8 @@ static int selinux_bprm_set_creds(struct linux_binprm *bprm)
new_tsec
->
sid
=
old_tsec
->
sid
;
}
ad
.
type
=
LSM_AUDIT_DATA_
PATH
;
ad
.
u
.
path
=
bprm
->
file
->
f_path
;
ad
.
type
=
LSM_AUDIT_DATA_
FILE
;
ad
.
u
.
file
=
bprm
->
file
;
if
(
new_tsec
->
sid
==
old_tsec
->
sid
)
{
rc
=
avc_has_perm
(
old_tsec
->
sid
,
isec
->
sid
,
...
...
@@ -3833,8 +3833,8 @@ static int selinux_kernel_module_from_file(struct file *file)
/* finit_module */
ad
.
type
=
LSM_AUDIT_DATA_
PATH
;
ad
.
u
.
path
=
file
->
f_path
;
ad
.
type
=
LSM_AUDIT_DATA_
FILE
;
ad
.
u
.
file
=
file
;
fsec
=
file
->
f_security
;
if
(
sid
!=
fsec
->
sid
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录