diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-05-06 08:22:52 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-06-20 05:25:22 -0400 |
commit | f46038ff7d23ae092d61b366332c05aab8227b48 (patch) | |
tree | b1615e261d90cd6f83065b3d8350a6b2cd7176a2 /kernel/auditsc.c | |
parent | e1396065e0489f98b35021b97907ab4edbfb24e1 (diff) |
[PATCH] log ppid
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 4ca913daa7da..4fc3867fa25a 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -60,6 +60,7 @@ | |||
60 | #include <linux/tty.h> | 60 | #include <linux/tty.h> |
61 | #include <linux/selinux.h> | 61 | #include <linux/selinux.h> |
62 | #include <linux/binfmts.h> | 62 | #include <linux/binfmts.h> |
63 | #include <linux/syscalls.h> | ||
63 | 64 | ||
64 | #include "audit.h" | 65 | #include "audit.h" |
65 | 66 | ||
@@ -156,7 +157,7 @@ struct audit_context { | |||
156 | struct audit_aux_data *aux; | 157 | struct audit_aux_data *aux; |
157 | 158 | ||
158 | /* Save things to print about task_struct */ | 159 | /* Save things to print about task_struct */ |
159 | pid_t pid; | 160 | pid_t pid, ppid; |
160 | uid_t uid, euid, suid, fsuid; | 161 | uid_t uid, euid, suid, fsuid; |
161 | gid_t gid, egid, sgid, fsgid; | 162 | gid_t gid, egid, sgid, fsgid; |
162 | unsigned long personality; | 163 | unsigned long personality; |
@@ -379,6 +380,7 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk, | |||
379 | } | 380 | } |
380 | 381 | ||
381 | context->pid = tsk->pid; | 382 | context->pid = tsk->pid; |
383 | context->ppid = sys_getppid(); /* sic. tsk == current in all cases */ | ||
382 | context->uid = tsk->uid; | 384 | context->uid = tsk->uid; |
383 | context->gid = tsk->gid; | 385 | context->gid = tsk->gid; |
384 | context->euid = tsk->euid; | 386 | context->euid = tsk->euid; |
@@ -614,7 +616,7 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts | |||
614 | tty = "(none)"; | 616 | tty = "(none)"; |
615 | audit_log_format(ab, | 617 | audit_log_format(ab, |
616 | " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" | 618 | " a0=%lx a1=%lx a2=%lx a3=%lx items=%d" |
617 | " pid=%d auid=%u uid=%u gid=%u" | 619 | " ppid=%d pid=%d auid=%u uid=%u gid=%u" |
618 | " euid=%u suid=%u fsuid=%u" | 620 | " euid=%u suid=%u fsuid=%u" |
619 | " egid=%u sgid=%u fsgid=%u tty=%s", | 621 | " egid=%u sgid=%u fsgid=%u tty=%s", |
620 | context->argv[0], | 622 | context->argv[0], |
@@ -622,6 +624,7 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts | |||
622 | context->argv[2], | 624 | context->argv[2], |
623 | context->argv[3], | 625 | context->argv[3], |
624 | context->name_count, | 626 | context->name_count, |
627 | context->ppid, | ||
625 | context->pid, | 628 | context->pid, |
626 | context->loginuid, | 629 | context->loginuid, |
627 | context->uid, | 630 | context->uid, |