Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=175fc484256e9c85e043f599ec2f6bc0d2e6c443
Commit:     175fc484256e9c85e043f599ec2f6bc0d2e6c443
Parent:     9dc83afdbefd184bf29f347e8fcbb6d8a2b5e6fe
Author:     Al Viro <[EMAIL PROTECTED]>
AuthorDate: Wed Aug 8 00:01:46 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Aug 7 19:58:56 2007 -0700

    fix oops in __audit_signal_info()
    
        The check for audit_signals is misplaced and the check for
    audit_dummy_context() is missing; as the result, if we send a signal to
    auditd from task with NULL ->audit_context while we have audit_signals
    != 0 we end up with an oops.
    
    Signed-off-by: Al Viro <[EMAIL PROTECTED]>
    Acked-by: James Morris <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/auditsc.c |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index a777d37..3401293 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1992,19 +1992,19 @@ int __audit_signal_info(int sig, struct task_struct *t)
        extern uid_t audit_sig_uid;
        extern u32 audit_sig_sid;
 
-       if (audit_pid && t->tgid == audit_pid &&
-           (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1)) {
-               audit_sig_pid = tsk->pid;
-               if (ctx)
-                       audit_sig_uid = ctx->loginuid;
-               else
-                       audit_sig_uid = tsk->uid;
-               selinux_get_task_sid(tsk, &audit_sig_sid);
+       if (audit_pid && t->tgid == audit_pid) {
+               if (sig == SIGTERM || sig == SIGHUP || sig == SIGUSR1) {
+                       audit_sig_pid = tsk->pid;
+                       if (ctx)
+                               audit_sig_uid = ctx->loginuid;
+                       else
+                               audit_sig_uid = tsk->uid;
+                       selinux_get_task_sid(tsk, &audit_sig_sid);
+               }
+               if (!audit_signals || audit_dummy_context())
+                       return 0;
        }
 
-       if (!audit_signals) /* audit_context checked in wrapper */
-               return 0;
-
        /* optimize the common case by putting first signal recipient directly
         * in audit_context */
        if (!ctx->target_pid) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to