Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8890
b: refs/heads/master
c: c389649
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse committed Aug 17, 2005
1 parent 41dd8ae commit 7101056
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 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: 413a1c7520ad6207c9122a749983c500f29e3e32
refs/heads/master: c3896495942392f1a792da1cafba7a573cbf6fc2
22 changes: 12 additions & 10 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,20 +513,23 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk,
struct list_head *list)
{
struct audit_entry *e;
enum audit_state state;
int word = AUDIT_WORD(ctx->major);
int bit = AUDIT_BIT(ctx->major);
enum audit_state state;

if (audit_pid && tsk->tgid == audit_pid)
return AUDIT_DISABLED;

rcu_read_lock();
list_for_each_entry_rcu(e, list, list) {
if ((e->rule.mask[word] & bit) == bit
&& audit_filter_rules(tsk, &e->rule, ctx, &state)) {
rcu_read_unlock();
return state;
}
if (!list_empty(list)) {
int word = AUDIT_WORD(ctx->major);
int bit = AUDIT_BIT(ctx->major);

list_for_each_entry_rcu(e, list, list) {
if ((e->rule.mask[word] & bit) == bit
&& audit_filter_rules(tsk, &e->rule, ctx, &state)) {
rcu_read_unlock();
return state;
}
}
}
rcu_read_unlock();
return AUDIT_BUILD_CONTEXT;
Expand Down Expand Up @@ -1023,7 +1026,6 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code)
} else {
audit_free_names(context);
audit_free_aux(context);
audit_zero_context(context, context->state);
tsk->audit_context = context;
}
out:
Expand Down

0 comments on commit 7101056

Please sign in to comment.