audit: connect LOGIN record to its syscall record
authorRichard Guy Briggs <rgb@redhat.com>
Tue, 19 Mar 2019 19:23:29 +0000 (15:23 -0400)
committerPaul Moore <paul@paul-moore.com>
Thu, 21 Mar 2019 00:57:48 +0000 (20:57 -0400)
Currently the AUDIT_LOGIN event is a standalone record that isn't
connected to any other records that may be part of its syscall event. To
avoid the confusion of generating two events, connect the records by
using its syscall context.

Please see the github issue
https://github.com/linux-audit/audit-kernel/issues/110

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
kernel/audit.c

index c89ea48c70a6ef70adef41122dfc2bda62cebc36..b96bf69183f4df299f1623f49a0107200e4d7b02 100644 (file)
@@ -2220,7 +2220,7 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid,
        if (!audit_enabled)
                return;
 
-       ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_LOGIN);
+       ab = audit_log_start(audit_context(), GFP_KERNEL, AUDIT_LOGIN);
        if (!ab)
                return;