aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
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)