Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a64e6494
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
a64e6494
编写于
11月 12, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] return records for fork() both to child and parent
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
a3f07114
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
20 addition
and
0 deletion
+20
-0
include/linux/audit.h
include/linux/audit.h
+2
-0
kernel/auditsc.c
kernel/auditsc.c
+17
-0
kernel/fork.c
kernel/fork.c
+1
-0
未找到文件。
include/linux/audit.h
浏览文件 @
a64e6494
...
@@ -391,6 +391,7 @@ extern int audit_classify_arch(int arch);
...
@@ -391,6 +391,7 @@ extern int audit_classify_arch(int arch);
#ifdef CONFIG_AUDITSYSCALL
#ifdef CONFIG_AUDITSYSCALL
/* These are defined in auditsc.c */
/* These are defined in auditsc.c */
/* Public API */
/* Public API */
extern
void
audit_finish_fork
(
struct
task_struct
*
child
);
extern
int
audit_alloc
(
struct
task_struct
*
task
);
extern
int
audit_alloc
(
struct
task_struct
*
task
);
extern
void
audit_free
(
struct
task_struct
*
task
);
extern
void
audit_free
(
struct
task_struct
*
task
);
extern
void
audit_syscall_entry
(
int
arch
,
extern
void
audit_syscall_entry
(
int
arch
,
...
@@ -504,6 +505,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
...
@@ -504,6 +505,7 @@ static inline int audit_mq_getsetattr(mqd_t mqdes, struct mq_attr *mqstat)
extern
int
audit_n_rules
;
extern
int
audit_n_rules
;
extern
int
audit_signals
;
extern
int
audit_signals
;
#else
#else
#define audit_finish_fork(t)
#define audit_alloc(t) ({ 0; })
#define audit_alloc(t) ({ 0; })
#define audit_free(t) do { ; } while (0)
#define audit_free(t) do { ; } while (0)
#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
#define audit_syscall_entry(ta,a,b,c,d,e) do { ; } while (0)
...
...
kernel/auditsc.c
浏览文件 @
a64e6494
...
@@ -1548,6 +1548,23 @@ void audit_syscall_entry(int arch, int major,
...
@@ -1548,6 +1548,23 @@ void audit_syscall_entry(int arch, int major,
context
->
ppid
=
0
;
context
->
ppid
=
0
;
}
}
void
audit_finish_fork
(
struct
task_struct
*
child
)
{
struct
audit_context
*
ctx
=
current
->
audit_context
;
struct
audit_context
*
p
=
child
->
audit_context
;
if
(
!
p
||
!
ctx
||
!
ctx
->
auditable
)
return
;
p
->
arch
=
ctx
->
arch
;
p
->
major
=
ctx
->
major
;
memcpy
(
p
->
argv
,
ctx
->
argv
,
sizeof
(
ctx
->
argv
));
p
->
ctime
=
ctx
->
ctime
;
p
->
dummy
=
ctx
->
dummy
;
p
->
auditable
=
ctx
->
auditable
;
p
->
in_syscall
=
ctx
->
in_syscall
;
p
->
filterkey
=
kstrdup
(
ctx
->
filterkey
,
GFP_KERNEL
);
p
->
ppid
=
current
->
pid
;
}
/**
/**
* audit_syscall_exit - deallocate audit context after a system call
* audit_syscall_exit - deallocate audit context after a system call
* @tsk: task being audited
* @tsk: task being audited
...
...
kernel/fork.c
浏览文件 @
a64e6494
...
@@ -1398,6 +1398,7 @@ long do_fork(unsigned long clone_flags,
...
@@ -1398,6 +1398,7 @@ long do_fork(unsigned long clone_flags,
init_completion
(
&
vfork
);
init_completion
(
&
vfork
);
}
}
audit_finish_fork
(
p
);
tracehook_report_clone
(
trace
,
regs
,
clone_flags
,
nr
,
p
);
tracehook_report_clone
(
trace
,
regs
,
clone_flags
,
nr
,
p
);
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录