Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26456
b: refs/heads/master
c: 2ad312d
h: refs/heads/master
v: v3
  • Loading branch information
Steve Grubb authored and Al Viro committed May 1, 2006
1 parent 4a1585c commit d89db33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 073115d6b29c7910feaa08241c6484637f5ca958
refs/heads/master: 2ad312d2093ae506ae0fa184d8d026b559083087
11 changes: 7 additions & 4 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,9 @@ static int audit_filter_rules(struct task_struct *tsk,
struct audit_context *ctx,
enum audit_state *state)
{
int i, j;
int i, j, need_sid = 1;
u32 sid;

selinux_task_ctxid(tsk, &sid);

for (i = 0; i < rule->field_count; i++) {
struct audit_field *f = &rule->fields[i];
int result = 0;
Expand Down Expand Up @@ -271,11 +269,16 @@ static int audit_filter_rules(struct task_struct *tsk,
match for now to avoid losing information that
may be wanted. An error message will also be
logged upon error */
if (f->se_rule)
if (f->se_rule) {
if (need_sid) {
selinux_task_ctxid(tsk, &sid);
need_sid = 0;
}
result = selinux_audit_rule_match(sid, f->type,
f->op,
f->se_rule,
ctx);
}
break;
case AUDIT_ARG0:
case AUDIT_ARG1:
Expand Down

0 comments on commit d89db33

Please sign in to comment.