audit: add tty field to LOGIN event
authorRichard Guy Briggs <rgb@redhat.com>
Thu, 21 Apr 2016 18:14:01 +0000 (14:14 -0400)
committerivanmeler <i_ivan@windowslive.com>
Wed, 13 Apr 2022 21:13:43 +0000 (21:13 +0000)
commitf65bd0a772b48db679e06166d90c338184f138f7
treec1a0922574df6924a8753b995d35eeb45dd2510a
parentf60d25928832474198146af4629bc1782dcbb00b
audit: add tty field to LOGIN event

commit db0a6fb5d97afe01fd9c47d37c6daa82d4d4001d upstream.

The tty field was missing from AUDIT_LOGIN events.

Refactor code to create a new function audit_get_tty(), using it to
replace the call in audit_log_task_info() and to add it to
audit_log_set_loginuid().  Lock and bump the kref to protect it, adding
audit_put_tty() alias to decrement it.

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/audit.h
kernel/audit.c
kernel/auditsc.c