Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23985
b: refs/heads/master
c: d884596
h: refs/heads/master
i:
  23983: 0fce221
v: v3
  • Loading branch information
David Woodhouse authored and Al Viro committed Mar 20, 2006
1 parent bb3c463 commit 3ebb32f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fe7752bab26a9ac0651b695ad4f55659761f68f7
refs/heads/master: d884596f44ef5a0bcd8a66405dc04902aeaa6fc7
11 changes: 4 additions & 7 deletions trunk/kernel/auditfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline int audit_copy_rule(struct audit_rule *d, struct audit_rule *s)
/* Check to see if two rules are identical. It is called from
* audit_add_rule during AUDIT_ADD and
* audit_del_rule during AUDIT_DEL. */
static inline int audit_compare_rule(struct audit_rule *a, struct audit_rule *b)
static int audit_compare_rule(struct audit_rule *a, struct audit_rule *b)
{
int i;

Expand Down Expand Up @@ -107,19 +107,18 @@ static inline int audit_add_rule(struct audit_rule *rule,
/* Do not use the _rcu iterator here, since this is the only
* addition routine. */
list_for_each_entry(entry, list, list) {
if (!audit_compare_rule(rule, &entry->rule)) {
if (!audit_compare_rule(rule, &entry->rule))
return -EEXIST;
}
}

for (i = 0; i < rule->field_count; i++) {
if (rule->fields[i] & AUDIT_UNUSED_BITS)
return -EINVAL;
if ( rule->fields[i] & AUDIT_NEGATE )
if ( rule->fields[i] & AUDIT_NEGATE)
rule->fields[i] |= AUDIT_NOT_EQUAL;
else if ( (rule->fields[i] & AUDIT_OPERATORS) == 0 )
rule->fields[i] |= AUDIT_EQUAL;
rule->fields[i] &= (~AUDIT_NEGATE);
rule->fields[i] &= ~AUDIT_NEGATE;
}

if (!(entry = kmalloc(sizeof(*entry), GFP_KERNEL)))
Expand Down Expand Up @@ -374,5 +373,3 @@ int audit_filter_type(int type)
rcu_read_unlock();
return result;
}


0 comments on commit 3ebb32f

Please sign in to comment.