[AUDIT] LOGIN message credentials

Attached is a new patch that solves the issue of getting valid credentials 
into the LOGIN message. The current code was assuming that the audit context 
had already been copied. This is not always the case for LOGIN messages.

To solve the problem, the patch passes the task struct to the function that 
emits the message where it can get valid credentials.

Signed-off-by: Steve Grubb <sgrubb@redhat.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
Steve Grubb
2005-04-29 17:30:07 +01:00
committed by
parent 37509e749d
commit 456be6cd90
3 changed files with 7 additions and 6 deletions

View File

@@ -820,7 +820,7 @@ static ssize_t proc_loginuid_write(struct file * file, const char __user * buf,
goto out_free_page;
}
length = audit_set_loginuid(task->audit_context, loginuid);
length = audit_set_loginuid(task, loginuid);
if (likely(length == 0))
length = count;