aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-07-16 06:43:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2006-08-03 10:59:51 -0400
commit3f2792ffbd88dc1cd41d226674cc428914981e98 (patch)
tree40d176c192eed972df3acd494079d56e6b0e9a34 /kernel
parent5ac3a9c26c1cc4861d9cdd8b293fecbfcdc81afe (diff)
[PATCH] take filling ->pid, etc. out of audit_get_context()
move that stuff downstream and into the only branch where it'll be used. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/auditsc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index f571c7e925e6..efc1b74bebf3 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -534,17 +534,7 @@ static inline struct audit_context *audit_get_context(struct task_struct *tsk,
534 } 534 }
535 535
536get_context: 536get_context:
537 context->pid = tsk->pid; 537
538 context->ppid = sys_getppid(); /* sic. tsk == current in all cases */
539 context->uid = tsk->uid;
540 context->gid = tsk->gid;
541 context->euid = tsk->euid;
542 context->suid = tsk->suid;
543 context->fsuid = tsk->fsuid;
544 context->egid = tsk->egid;
545 context->sgid = tsk->sgid;
546 context->fsgid = tsk->fsgid;
547 context->personality = tsk->personality;
548 tsk->audit_context = NULL; 538 tsk->audit_context = NULL;
549 return context; 539 return context;
550} 540}
@@ -753,6 +743,17 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
753 const char *tty; 743 const char *tty;
754 744
755 /* tsk == current */ 745 /* tsk == current */
746 context->pid = tsk->pid;
747 context->ppid = sys_getppid(); /* sic. tsk == current in all cases */
748 context->uid = tsk->uid;
749 context->gid = tsk->gid;
750 context->euid = tsk->euid;
751 context->suid = tsk->suid;
752 context->fsuid = tsk->fsuid;
753 context->egid = tsk->egid;
754 context->sgid = tsk->sgid;
755 context->fsgid = tsk->fsgid;
756 context->personality = tsk->personality;
756 757
757 ab = audit_log_start(context, GFP_KERNEL, AUDIT_SYSCALL); 758 ab = audit_log_start(context, GFP_KERNEL, AUDIT_SYSCALL);
758 if (!ab) 759 if (!ab)