Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b018b2888b32284e09bba9cccb5cd2e12199feb
Commit:     7b018b2888b32284e09bba9cccb5cd2e12199feb
Parent:     266f5aa0970409bf1ebdf9fc4e65a1186eeed3c2
Author:     Tony Jones <[EMAIL PROTECTED]>
AuthorDate: Sat Jun 23 17:16:47 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Jun 24 08:59:12 2007 -0700

    audit: fix oops removing watch if audit disabled
    
    Removing a watched file will oops if audit is disabled (auditctl -e 0).
    
    To reproduce:
    - auditctl -e 1
    - touch /tmp/foo
    - auditctl -w /tmp/foo
    - auditctl -e 0
    - rm /tmp/foo (or mv)
    
    Signed-off-by: Tony Jones <[EMAIL PROTECTED]>
    Cc: Al Viro <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/auditfilter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 74cc0fc..ce61f42 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -947,7 +947,7 @@ static void audit_update_watch(struct audit_parent *parent,
 
                /* If the update involves invalidating rules, do the inode-based
                 * filtering now, so we don't omit records. */
-               if (invalidating &&
+               if (invalidating && current->audit_context &&
                    audit_filter_inodes(current, current->audit_context) == 
AUDIT_RECORD_CONTEXT)
                        audit_set_auditable(current->audit_context);
 
-
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