All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Paul Moore <pmoore@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: [RFC PATCH 5/5] audit: use audit_set_enabled() in audit_enable()
Date: Sun, 3 Sep 2017 00:52:53 -0400	[thread overview]
Message-ID: <20170903045253.GE29957@madcap2.tricolour.ca> (raw)
In-Reply-To: <150427350579.12725.7949106416861363253.stgit@sifl>

On 2017-09-01 09:45, Paul Moore wrote:
> From: Paul Moore <paul@paul-moore.com>
> 
> Use audit_set_enabled() to enable auditing during early boot.  This
> obviously won't emit an audit change record, but it will work anyway
> and should help prevent in future problems by consolidating the
> enable/disable code in one function.
> 
> Signed-off-by: Paul Moore <paul@paul-moore.com>

Reviewed-by: Richard Guy Briggs <rgb@redhat.com>

> ---
>  kernel/audit.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 01bf1e479a8c..842237f5182b 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -1574,8 +1574,8 @@ static int __init audit_enable(char *str)
>  
>  	if (audit_default == AUDIT_OFF)
>  		audit_initialized = AUDIT_DISABLED;
> -	audit_enabled = audit_default;
> -	audit_ever_enabled = !!audit_enabled;
> +	if (audit_set_enabled(audit_default))
> +		panic("audit: error setting audit state (%d)\n", audit_default);
>  
>  	pr_info("%s\n", audit_default ?
>  		"enabled (after initialization)" : "disabled (until reboot)");
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

- RGB

--
Richard Guy Briggs <rgb@redhat.com>
Sr. S/W Engineer, Kernel Security, Base Operating Systems
Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635

  reply	other threads:[~2017-09-03  4:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 13:44 [RFC PATCH 0/5] Fix some early boot audit problems Paul Moore
2017-09-01 13:44 ` [RFC PATCH 1/5] audit: ensure that 'audit=1' actually enables audit for PID 1 Paul Moore
2017-09-02  5:55   ` Richard Guy Briggs
2017-09-01 13:44 ` [RFC PATCH 2/5] audit: initialize the audit subsystem as early as possible Paul Moore
2017-09-02  6:09   ` Richard Guy Briggs
2017-09-01 13:44 ` [RFC PATCH 3/5] audit: don't use simple_strtol() anymore Paul Moore
2017-09-03  4:50   ` Richard Guy Briggs
2017-09-01 13:44 ` [RFC PATCH 4/5] audit: convert audit_ever_enabled to a boolean Paul Moore
2017-09-03  3:41   ` Richard Guy Briggs
2017-09-01 13:45 ` [RFC PATCH 5/5] audit: use audit_set_enabled() in audit_enable() Paul Moore
2017-09-03  4:52   ` Richard Guy Briggs [this message]
2017-09-20 18:55 ` [RFC PATCH 0/5] Fix some early boot audit problems Paul Moore

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170903045253.GE29957@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=pmoore@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.