Re: [PATCH ghak21 V2 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

2018-03-12 Thread Paul Moore
On Mon, Mar 12, 2018 at 2:31 AM, Richard Guy Briggs  wrote:
> 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: Richard Guy Briggs 
> ---
>  kernel/audit.c | 3 +++
>  1 file changed, 3 insertions(+)

As stated previously, this has already been merged.  Ignoring.

> diff --git a/kernel/audit.c b/kernel/audit.c
> index 1a3e75d..7026d69 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -2308,6 +2308,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;
> --
> 1.8.3.1

-- 
paul moore
www.paul-moore.com

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


[PATCH ghak21 V2 1/4] audit: make ANOM_LINK obey audit_enabled and audit_dummy_context

2018-03-11 Thread Richard Guy Briggs
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: Richard Guy Briggs 
---
 kernel/audit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/audit.c b/kernel/audit.c
index 1a3e75d..7026d69 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -2308,6 +2308,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;
-- 
1.8.3.1

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