linux-audit.redhat.com archive mirror
 help / color / mirror / Atom feed
* [PATCH ghak122 v1] audit: store event sockaddr in case of no rules
@ 2020-07-03 17:17 Richard Guy Briggs
  2020-07-08 22:49 ` Paul Moore
  0 siblings, 1 reply; 14+ messages in thread
From: Richard Guy Briggs @ 2020-07-03 17:17 UTC (permalink / raw)
  To: Linux-Audit Mailing List; +Cc: Richard Guy Briggs, eparis

When there are no rules present, the event SOCKADDR record is not
generated due to audit_dummy_context() generated at syscall entry from
audit_n_rules.  Store this information if there is a context present to
store it so that mandatory events are more complete (startup, LSMs...).

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

Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
---
Passes audit-testsuite.

 include/linux/audit.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/audit.h b/include/linux/audit.h
index 03c4035a532b..07fecd99741a 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -448,7 +448,7 @@ static inline int audit_socketcall_compat(int nargs, u32 *args)
 
 static inline int audit_sockaddr(int len, void *addr)
 {
-	if (unlikely(!audit_dummy_context()))
+	if (audit_context())
 		return __audit_sockaddr(len, addr);
 	return 0;
 }
-- 
1.8.3.1

--
Linux-audit mailing list
Linux-audit@redhat.com
https://www.redhat.com/mailman/listinfo/linux-audit


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-07-14  2:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-03 17:17 [PATCH ghak122 v1] audit: store event sockaddr in case of no rules Richard Guy Briggs
2020-07-08 22:49 ` Paul Moore
2020-07-13 17:40   ` Richard Guy Briggs
2020-07-13 17:55     ` Casey Schaufler
2020-07-13 20:02       ` Richard Guy Briggs
2020-07-13 23:08         ` Casey Schaufler
2020-07-14  0:11           ` Paul Moore
2020-07-14  0:28             ` Casey Schaufler
2020-07-14  0:47               ` Paul Moore
2020-07-14  1:08             ` Richard Guy Briggs
2020-07-14  1:19               ` Paul Moore
2020-07-14  2:37                 ` Casey Schaufler
2020-07-13 22:30     ` Paul Moore
2020-07-13 22:37       ` Steve Grubb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).