public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
From: Steve Grubb <sgrubb@redhat.com>
To: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
Cc: Linux Audit <linux-audit@redhat.com>
Subject: Re: [PATCH 5/5] Delete some invalid code from auditctl.c
Date: Wed, 6 Aug 2008 15:35:46 -0400	[thread overview]
Message-ID: <200808061535.47097.sgrubb@redhat.com> (raw)
In-Reply-To: <48995D95.1060808@cn.fujitsu.com>

On Wednesday 06 August 2008 04:15:17 Zhang Xiliang wrote:
> I found some code is invalid in auditctl.
> So I suggested to delete it.

OK, I guess this needs cleanup after changing PERM to require new rule format.

> diff --git a/src/auditctl.c b/src/auditctl.c
> index b356faa..93e84a0 100644
> --- a/src/auditctl.c
> +++ b/src/auditctl.c
> @@ -737,12 +737,7 @@ static int setopt(int count, char *vars[])
>                 switch (rc)
>                 {
>                         case 0:
> -                               if (which == OLD &&
> -                                       rule.fields[rule.field_count-1] ==
> -                                               AUDIT_PERM)
> -                                       audit_permadded = 1;
> -                               else if (which == NEW &&
> -                                 
>  rule_new->fields[rule_new->field_count-1] ==
> +                               if
> (rule_new->fields[rule_new->field_count-1] == AUDIT_PERM)
>                                         audit_permadded = 1;
>                                 break;

I think I want to "and" this with which == NEW to make sure we don't index 
past something if the rules were still the old form.

Updated and applied. Thanks for the patch !

-Steve

      reply	other threads:[~2008-08-06 19:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  8:15 [PATCH 5/5] Delete some invalid code from auditctl.c Zhang Xiliang
2008-08-06 19:35 ` Steve Grubb [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=200808061535.47097.sgrubb@redhat.com \
    --to=sgrubb@redhat.com \
    --cc=linux-audit@redhat.com \
    --cc=zhangxiliang@cn.fujitsu.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