Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15564ff0 authored by Richard Guy Briggs's avatar Richard Guy Briggs Committed by Paul Moore
Browse files

audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

Audit link denied events emit disjointed records when audit is disabled.
No records should be emitted when audit is disabled.

See: https://github.com/linux-audit/audit-kernel/issues/21



Signed-off-by: default avatarRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 11dd2666
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2315,6 +2315,9 @@ void audit_log_link_denied(const char *operation, const struct path *link)
	struct audit_buffer *ab;
	struct audit_names *name;

	if (!audit_enabled || audit_dummy_context())
		return;

	name = kzalloc(sizeof(*name), GFP_NOFS);
	if (!name)
		return;