diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-11-12 18:37:41 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-12-09 02:27:38 -0500 |
commit | a64e64944f4b8ce3288519555dbaa0232414b8ac (patch) | |
tree | 6b37f5444c49379580b6b4fead84a75ca474d0ab /kernel/auditsc.c | |
parent | a3f07114e3359fb98683069ae397220e8992a24a (diff) |
[PATCH] return records for fork() both to child and parent
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index cf5bc2f5f9c3..de8468050afa 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1548,6 +1548,23 @@ void audit_syscall_entry(int arch, int major, | |||
1548 | context->ppid = 0; | 1548 | context->ppid = 0; |
1549 | } | 1549 | } |
1550 | 1550 | ||
1551 | void audit_finish_fork(struct task_struct *child) | ||
1552 | { | ||
1553 | struct audit_context *ctx = current->audit_context; | ||
1554 | struct audit_context *p = child->audit_context; | ||
1555 | if (!p || !ctx || !ctx->auditable) | ||
1556 | return; | ||
1557 | p->arch = ctx->arch; | ||
1558 | p->major = ctx->major; | ||
1559 | memcpy(p->argv, ctx->argv, sizeof(ctx->argv)); | ||
1560 | p->ctime = ctx->ctime; | ||
1561 | p->dummy = ctx->dummy; | ||
1562 | p->auditable = ctx->auditable; | ||
1563 | p->in_syscall = ctx->in_syscall; | ||
1564 | p->filterkey = kstrdup(ctx->filterkey, GFP_KERNEL); | ||
1565 | p->ppid = current->pid; | ||
1566 | } | ||
1567 | |||
1551 | /** | 1568 | /** |
1552 | * audit_syscall_exit - deallocate audit context after a system call | 1569 | * audit_syscall_exit - deallocate audit context after a system call |
1553 | * @tsk: task being audited | 1570 | * @tsk: task being audited |