Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
795d673a
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
795d673a
编写于
4月 26, 2019
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
audit_compare_dname_path(): switch to const struct qstr *
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6921d4eb
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
8 addition
and
9 deletion
+8
-9
kernel/audit.h
kernel/audit.h
+1
-1
kernel/audit_fsnotify.c
kernel/audit_fsnotify.c
+1
-1
kernel/audit_watch.c
kernel/audit_watch.c
+1
-2
kernel/auditfilter.c
kernel/auditfilter.c
+3
-3
kernel/auditsc.c
kernel/auditsc.c
+2
-2
未找到文件。
kernel/audit.h
浏览文件 @
795d673a
...
...
@@ -231,7 +231,7 @@ extern int audit_comparator(const u32 left, const u32 op, const u32 right);
extern
int
audit_uid_comparator
(
kuid_t
left
,
u32
op
,
kuid_t
right
);
extern
int
audit_gid_comparator
(
kgid_t
left
,
u32
op
,
kgid_t
right
);
extern
int
parent_len
(
const
char
*
path
);
extern
int
audit_compare_dname_path
(
const
cha
r
*
dname
,
const
char
*
path
,
int
plen
);
extern
int
audit_compare_dname_path
(
const
struct
qst
r
*
dname
,
const
char
*
path
,
int
plen
);
extern
struct
sk_buff
*
audit_make_reply
(
int
seq
,
int
type
,
int
done
,
int
multi
,
const
void
*
payload
,
int
size
);
extern
void
audit_panic
(
const
char
*
message
);
...
...
kernel/audit_fsnotify.c
浏览文件 @
795d673a
...
...
@@ -188,7 +188,7 @@ static int audit_mark_handle_event(struct fsnotify_group *group,
}
if
(
mask
&
(
FS_CREATE
|
FS_MOVED_TO
|
FS_DELETE
|
FS_MOVED_FROM
))
{
if
(
audit_compare_dname_path
(
dname
->
name
,
audit_mark
->
path
,
AUDIT_NAME_FULL
))
if
(
audit_compare_dname_path
(
dname
,
audit_mark
->
path
,
AUDIT_NAME_FULL
))
return
0
;
audit_update_mark
(
audit_mark
,
inode
);
}
else
if
(
mask
&
(
FS_DELETE_SELF
|
FS_UNMOUNT
|
FS_MOVE_SELF
))
...
...
kernel/audit_watch.c
浏览文件 @
795d673a
...
...
@@ -261,13 +261,12 @@ static void audit_update_watch(struct audit_parent *parent,
struct
audit_watch
*
owatch
,
*
nwatch
,
*
nextw
;
struct
audit_krule
*
r
,
*
nextr
;
struct
audit_entry
*
oentry
,
*
nentry
;
const
unsigned
char
*
name
=
dname
->
name
;
mutex_lock
(
&
audit_filter_mutex
);
/* Run all of the watches on this parent looking for the one that
* matches the given dname */
list_for_each_entry_safe
(
owatch
,
nextw
,
&
parent
->
watches
,
wlist
)
{
if
(
audit_compare_dname_path
(
name
,
owatch
->
path
,
if
(
audit_compare_dname_path
(
d
name
,
owatch
->
path
,
AUDIT_NAME_FULL
))
continue
;
...
...
kernel/auditfilter.c
浏览文件 @
795d673a
...
...
@@ -1290,12 +1290,12 @@ int parent_len(const char *path)
* @parentlen: length of the parent if known. Passing in AUDIT_NAME_FULL
* here indicates that we must compute this value.
*/
int
audit_compare_dname_path
(
const
cha
r
*
dname
,
const
char
*
path
,
int
parentlen
)
int
audit_compare_dname_path
(
const
struct
qst
r
*
dname
,
const
char
*
path
,
int
parentlen
)
{
int
dlen
,
pathlen
;
const
char
*
p
;
dlen
=
strlen
(
dname
)
;
dlen
=
dname
->
len
;
pathlen
=
strlen
(
path
);
if
(
pathlen
<
dlen
)
return
1
;
...
...
@@ -1306,7 +1306,7 @@ int audit_compare_dname_path(const char *dname, const char *path, int parentlen)
p
=
path
+
parentlen
;
return
strncmp
(
p
,
dname
,
dlen
);
return
strncmp
(
p
,
dname
->
name
,
dlen
);
}
int
audit_filter
(
int
msgtype
,
unsigned
int
listtype
)
...
...
kernel/auditsc.c
浏览文件 @
795d673a
...
...
@@ -2045,7 +2045,7 @@ void __audit_inode_child(struct inode *parent,
{
struct
audit_context
*
context
=
audit_context
();
struct
inode
*
inode
=
d_backing_inode
(
dentry
);
const
char
*
dname
=
dentry
->
d_name
.
name
;
const
struct
qstr
*
dname
=
&
dentry
->
d_
name
;
struct
audit_names
*
n
,
*
found_parent
=
NULL
,
*
found_child
=
NULL
;
struct
audit_entry
*
e
;
struct
list_head
*
list
=
&
audit_filter_list
[
AUDIT_FILTER_FS
];
...
...
@@ -2099,7 +2099,7 @@ void __audit_inode_child(struct inode *parent,
(
n
->
type
!=
type
&&
n
->
type
!=
AUDIT_TYPE_UNKNOWN
))
continue
;
if
(
!
strcmp
(
dname
,
n
->
name
->
name
)
||
if
(
!
strcmp
(
dname
->
name
,
n
->
name
->
name
)
||
!
audit_compare_dname_path
(
dname
,
n
->
name
->
name
,
found_parent
?
found_parent
->
name_len
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录