Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
5ac3a9c2
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5ac3a9c2
编写于
7月 16, 2006
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] don't bother with aux entires for dummy context
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
d51374ad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
16 deletion
+16
-16
fs/namei.c
fs/namei.c
+2
-2
include/linux/audit.h
include/linux/audit.h
+11
-11
kernel/auditsc.c
kernel/auditsc.c
+3
-3
未找到文件。
fs/namei.c
浏览文件 @
5ac3a9c2
...
...
@@ -159,7 +159,7 @@ char * getname(const char __user * filename)
#ifdef CONFIG_AUDITSYSCALL
void
putname
(
const
char
*
name
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
audit_putname
(
name
);
else
__putname
(
name
);
...
...
@@ -1125,7 +1125,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
retval
=
link_path_walk
(
name
,
nd
);
out:
if
(
likely
(
retval
==
0
))
{
if
(
unlikely
(
current
->
audit_context
&&
nd
&&
nd
->
dentry
&&
if
(
unlikely
(
!
audit_dummy_context
()
&&
nd
&&
nd
->
dentry
&&
nd
->
dentry
->
d_inode
))
audit_inode
(
name
,
nd
->
dentry
->
d_inode
);
}
...
...
include/linux/audit.h
浏览文件 @
5ac3a9c2
...
...
@@ -336,21 +336,21 @@ static inline int audit_dummy_context(void)
}
static
inline
void
audit_getname
(
const
char
*
name
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_getname
(
name
);
}
static
inline
void
audit_inode
(
const
char
*
name
,
const
struct
inode
*
inode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode
(
name
,
inode
);
}
static
inline
void
audit_inode_child
(
const
char
*
dname
,
const
struct
inode
*
inode
,
const
struct
inode
*
parent
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode_child
(
dname
,
inode
,
parent
);
}
static
inline
void
audit_inode_update
(
const
struct
inode
*
inode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
__audit_inode_update
(
inode
);
}
...
...
@@ -375,43 +375,43 @@ extern int __audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat);
static
inline
int
audit_ipc_obj
(
struct
kern_ipc_perm
*
ipcp
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_ipc_obj
(
ipcp
);
return
0
;
}
static
inline
int
audit_ipc_set_perm
(
unsigned
long
qbytes
,
uid_t
uid
,
gid_t
gid
,
mode_t
mode
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_ipc_set_perm
(
qbytes
,
uid
,
gid
,
mode
);
return
0
;
}
static
inline
int
audit_mq_open
(
int
oflag
,
mode_t
mode
,
struct
mq_attr
__user
*
u_attr
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_open
(
oflag
,
mode
,
u_attr
);
return
0
;
}
static
inline
int
audit_mq_timedsend
(
mqd_t
mqdes
,
size_t
msg_len
,
unsigned
int
msg_prio
,
const
struct
timespec
__user
*
u_abs_timeout
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_timedsend
(
mqdes
,
msg_len
,
msg_prio
,
u_abs_timeout
);
return
0
;
}
static
inline
int
audit_mq_timedreceive
(
mqd_t
mqdes
,
size_t
msg_len
,
unsigned
int
__user
*
u_msg_prio
,
const
struct
timespec
__user
*
u_abs_timeout
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_timedreceive
(
mqdes
,
msg_len
,
u_msg_prio
,
u_abs_timeout
);
return
0
;
}
static
inline
int
audit_mq_notify
(
mqd_t
mqdes
,
const
struct
sigevent
__user
*
u_notification
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_notify
(
mqdes
,
u_notification
);
return
0
;
}
static
inline
int
audit_mq_getsetattr
(
mqd_t
mqdes
,
struct
mq_attr
*
mqstat
)
{
if
(
unlikely
(
current
->
audit_context
))
if
(
unlikely
(
!
audit_dummy_context
()
))
return
__audit_mq_getsetattr
(
mqdes
,
mqstat
);
return
0
;
}
...
...
kernel/auditsc.c
浏览文件 @
5ac3a9c2
...
...
@@ -1676,7 +1676,7 @@ int audit_bprm(struct linux_binprm *bprm)
unsigned
long
p
,
next
;
void
*
to
;
if
(
likely
(
!
audit_enabled
||
!
context
))
if
(
likely
(
!
audit_enabled
||
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
PAGE_SIZE
*
MAX_ARG_PAGES
-
bprm
->
p
,
...
...
@@ -1714,7 +1714,7 @@ int audit_socketcall(int nargs, unsigned long *args)
struct
audit_aux_data_socketcall
*
ax
;
struct
audit_context
*
context
=
current
->
audit_context
;
if
(
likely
(
!
context
))
if
(
likely
(
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
nargs
*
sizeof
(
unsigned
long
),
GFP_KERNEL
);
...
...
@@ -1742,7 +1742,7 @@ int audit_sockaddr(int len, void *a)
struct
audit_aux_data_sockaddr
*
ax
;
struct
audit_context
*
context
=
current
->
audit_context
;
if
(
likely
(
!
context
))
if
(
likely
(
!
context
||
context
->
dummy
))
return
0
;
ax
=
kmalloc
(
sizeof
(
*
ax
)
+
len
,
GFP_KERNEL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录