diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index bce9ecdb7712..bd4e0a2443fb 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -1804,8 +1804,9 @@ int audit_set_loginuid(struct task_struct *task, uid_t loginuid) | |||
1804 | * | 1804 | * |
1805 | * Returns the context's loginuid or -1 if @ctx is NULL. | 1805 | * Returns the context's loginuid or -1 if @ctx is NULL. |
1806 | */ | 1806 | */ |
1807 | uid_t audit_get_loginuid(struct audit_context *ctx) | 1807 | uid_t audit_get_loginuid(struct task_struct *task) |
1808 | { | 1808 | { |
1809 | struct audit_context *ctx = task->audit_context; | ||
1809 | return ctx ? ctx->loginuid : -1; | 1810 | return ctx ? ctx->loginuid : -1; |
1810 | } | 1811 | } |
1811 | 1812 | ||
@@ -2273,7 +2274,7 @@ void audit_core_dumps(long signr) | |||
2273 | 2274 | ||
2274 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); | 2275 | ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_ANOM_ABEND); |
2275 | audit_log_format(ab, "auid=%u uid=%u gid=%u", | 2276 | audit_log_format(ab, "auid=%u uid=%u gid=%u", |
2276 | audit_get_loginuid(current->audit_context), | 2277 | audit_get_loginuid(current), |
2277 | current->uid, current->gid); | 2278 | current->uid, current->gid); |
2278 | selinux_get_task_sid(current, &sid); | 2279 | selinux_get_task_sid(current, &sid); |
2279 | if (sid) { | 2280 | if (sid) { |