提交 15564ff0 编写于 作者: R Richard Guy Briggs 提交者: Paul Moore

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/21Signed-off-by: NRichard Guy Briggs <rgb@redhat.com>
Signed-off-by: NPaul Moore <paul@paul-moore.com>
上级 11dd2666
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册