Re: [PATCH] audit: Reactive rules

From: Miloslav Trmac
Date: Wed Mar 31 2010 - 15:10:42 EST


Hello,
----- "Juraj Hlista" <juro.hlista@xxxxxxxxx> wrote:
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> @@ -415,7 +424,8 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
> - int i;
> + int i, j = 0;
> + int k;
> @@ -425,7 +435,7 @@ static struct audit_entry
> *audit_data_to_entry(struct audit_rule_data *data,
> for (i = 0; i < data->field_count; i++) {
> - struct audit_field *f = &entry->rule.fields[i];
> + struct audit_field *f = &entry->rule.fields[i - j];
It would be more clear to have a "source index" (used for "data"), and a "destination index" (used for entry->rule.fields); "j" is currently a difference between the two.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/