[PATCH 5/5] Delete some invalid code from auditctl.c
Steve Grubb
sgrubb at redhat.com
Wed Aug 6 19:35:46 UTC 2008
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
More information about the Linux-audit
mailing list