Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8861
b: refs/heads/master
c: f7056d6
h: refs/heads/master
i:
  8859: 9c6c985
v: v3
  • Loading branch information
David Woodhouse committed Jun 20, 2005
1 parent 12fc4a9 commit e75d213
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: d6e0e1585a1a9a15e48ec47206a809828afe4450
refs/heads/master: f7056d64ae101d910f965a2e39831f635ef7891b
10 changes: 8 additions & 2 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,9 @@ static enum audit_state audit_filter_syscall(struct task_struct *tsk,
int word = AUDIT_WORD(ctx->major);
int bit = AUDIT_BIT(ctx->major);

if (audit_pid && ctx->pid == audit_pid)
return AUDIT_DISABLED;

rcu_read_lock();
list_for_each_entry_rcu(e, list, list) {
if ((e->rule.mask[word] & bit) == bit
Expand All @@ -494,6 +497,9 @@ int audit_filter_user(struct task_struct *tsk, int type)
struct audit_entry *e;
enum audit_state state;

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

rcu_read_lock();
list_for_each_entry_rcu(e, &audit_filter_list[AUDIT_FILTER_USER], list) {
if (audit_filter_rules(tsk, &e->rule, NULL, &state)) {
Expand Down Expand Up @@ -816,7 +822,7 @@ void audit_free(struct task_struct *tsk)

/* Check for system calls that do not go through the exit
* function (e.g., exit_group), then free context block. */
if (context->in_syscall && context->auditable && context->pid != audit_pid)
if (context->in_syscall && context->auditable)
audit_log_exit(context);

audit_free_context(context);
Expand Down Expand Up @@ -921,7 +927,7 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code)
if (likely(!context))
return;

if (context->in_syscall && context->auditable && context->pid != audit_pid)
if (context->in_syscall && context->auditable)
audit_log_exit(context);

context->in_syscall = 0;
Expand Down

0 comments on commit e75d213

Please sign in to comment.