public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Steve Grubb <sgrubb@redhat.com>
Cc: linux-audit@redhat.com
Subject: Re: Audit issue
Date: Thu, 08 Nov 2007 09:35:01 -0500	[thread overview]
Message-ID: <1194532501.5429.1.camel@localhost.localdomain> (raw)
In-Reply-To: <200711080927.14472.sgrubb@redhat.com>


On Thu, 2007-11-08 at 09:27 -0500, Steve Grubb wrote:
> On Thursday 08 November 2007 09:19:26 Alexander Viro wrote:
> > Have fun...
> 
> Thanks for posting this patch. Is it impossible to "repair " processes by 
> simply adding a context if the pointer is NULL?
> 
> 
> > diff --git a/kernel/audit.c b/kernel/audit.c
> > index f93c271..83227f8 100644
> > --- a/kernel/audit.c
> > +++ b/kernel/audit.c
> > @@ -70,6 +70,7 @@ static int	audit_initialized;
> >   * 1 - auditing enabled
> >   * 2 - auditing enabled and configuration is locked/unchangeable. */
> >  int		audit_enabled;
> > +int		audit_ever_enabled;
> >
> >  /* Default state when kernel boots without any parameters. */
> >  static int	audit_default;
> > @@ -965,6 +968,7 @@ static int __init audit_init(void)
> >  	skb_queue_head_init(&audit_skb_queue);
> >  	audit_initialized = 1;
> >  	audit_enabled = audit_default;
> > +	audit_ever_enabled |= !!audit_default;
> 
> Should the declaration of audit_ever_enabled set a default value like 0 since 
> this is being or'ed in? Or should this just be an assignment?

No, global defined variables like this are initialized to 0 in the
kernel.  So this already does what you are thinking.

-Eric

      parent reply	other threads:[~2007-11-08 14:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200710301248.24261.sgrubb@redhat.com>
     [not found] ` <200710301907.29505.sgrubb@redhat.com>
     [not found]   ` <20071030231525.GG12499@devserv.devel.redhat.com>
     [not found]     ` <200710311740.19981.sgrubb@redhat.com>
2007-11-08 14:19       ` Audit issue Alexander Viro
2007-11-08 14:27         ` Steve Grubb
2007-11-08 14:32           ` Alexander Viro
2007-11-08 14:47             ` Steve Grubb
2007-11-08 14:56               ` Alexander Viro
2007-11-08 14:59                 ` Steve Grubb
2007-11-09  0:28                   ` Steve Grubb
2007-11-08 14:35           ` Eric Paris [this message]

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=1194532501.5429.1.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox