diff options
-rw-r--r-- | kernel/auditsc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 818778d5b6ad..78d7a13fc86f 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -169,6 +169,8 @@ struct audit_entry { | |||
169 | struct audit_rule rule; | 169 | struct audit_rule rule; |
170 | }; | 170 | }; |
171 | 171 | ||
172 | extern int audit_pid; | ||
173 | |||
172 | /* Check to see if two rules are identical. It is called from | 174 | /* Check to see if two rules are identical. It is called from |
173 | * audit_del_rule during AUDIT_DEL. */ | 175 | * audit_del_rule during AUDIT_DEL. */ |
174 | static int audit_compare_rule(struct audit_rule *a, struct audit_rule *b) | 176 | static int audit_compare_rule(struct audit_rule *a, struct audit_rule *b) |
@@ -768,7 +770,7 @@ void audit_free(struct task_struct *tsk) | |||
768 | 770 | ||
769 | /* Check for system calls that do not go through the exit | 771 | /* Check for system calls that do not go through the exit |
770 | * function (e.g., exit_group), then free context block. */ | 772 | * function (e.g., exit_group), then free context block. */ |
771 | if (context->in_syscall && context->auditable) | 773 | if (context->in_syscall && context->auditable && context->pid != audit_pid) |
772 | audit_log_exit(context); | 774 | audit_log_exit(context); |
773 | 775 | ||
774 | audit_free_context(context); | 776 | audit_free_context(context); |
@@ -903,7 +905,7 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code) | |||
903 | if (likely(!context)) | 905 | if (likely(!context)) |
904 | return; | 906 | return; |
905 | 907 | ||
906 | if (context->in_syscall && context->auditable) | 908 | if (context->in_syscall && context->auditable && context->pid != audit_pid) |
907 | audit_log_exit(context); | 909 | audit_log_exit(context); |
908 | 910 | ||
909 | context->in_syscall = 0; | 911 | context->in_syscall = 0; |
@@ -1126,7 +1128,6 @@ void audit_signal_info(int sig, struct task_struct *t) | |||
1126 | { | 1128 | { |
1127 | extern pid_t audit_sig_pid; | 1129 | extern pid_t audit_sig_pid; |
1128 | extern uid_t audit_sig_uid; | 1130 | extern uid_t audit_sig_uid; |
1129 | extern int audit_pid; | ||
1130 | 1131 | ||
1131 | if (unlikely(audit_pid && t->pid == audit_pid)) { | 1132 | if (unlikely(audit_pid && t->pid == audit_pid)) { |
1132 | if (sig == SIGTERM || sig == SIGHUP) { | 1133 | if (sig == SIGTERM || sig == SIGHUP) { |