Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23991
b: refs/heads/master
c: d9d9ec6
h: refs/heads/master
i:
  23989: e4ead7c
  23987: c96c69f
  23983: 0fce221
v: v3
  • Loading branch information
Dustin Kirkland authored and Al Viro committed Mar 20, 2006
1 parent 7ed422c commit 48d21c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: 5bdb98868062c1b14025883049551af343233187
refs/heads/master: d9d9ec6e2c45b22282cd36cf92fcb23d504350a8
18 changes: 12 additions & 6 deletions trunk/kernel/auditfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,17 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)
f->val = rule->values[i];

entry->rule.vers_ops = (f->op & AUDIT_OPERATORS) ? 2 : 1;

/* Support for legacy operators where
* AUDIT_NEGATE bit signifies != and otherwise assumes == */
if (f->op & AUDIT_NEGATE)
f->op |= AUDIT_NOT_EQUAL;
else if (!(f->op & AUDIT_OPERATORS))
f->op |= AUDIT_EQUAL;
f->op &= ~AUDIT_NEGATE;
f->op = AUDIT_NOT_EQUAL;
else if (!f->op)
f->op = AUDIT_EQUAL;
else if (f->op == AUDIT_OPERATORS) {
err = -EINVAL;
goto exit_free;
}
}

exit_nofree:
Expand Down Expand Up @@ -533,9 +539,9 @@ int audit_comparator(const u32 left, const u32 op, const u32 right)
return (left > right);
case AUDIT_GREATER_THAN_OR_EQUAL:
return (left >= right);
default:
return -EINVAL;
}
BUG();
return 0;
}


Expand Down

0 comments on commit 48d21c5

Please sign in to comment.