audit: fix oops removing watch if audit disabled
PATCH 1/1 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)
---
kernel/auditfilter.c +1 -1
@@ -947,7 +947,7 @@ static void audit_update_watch(struct au/* 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);
Quoted 18 lines · On Wed, 20 Jun 2007 15:38:20 -0700 Tony Jones <[email protected]> wrote:
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]>---
kernel/auditfilter.c +0
-0
kernel/auditfilter.c static void audit_update_watch(struct au · line 952
Quoted 7 lines
kernel/auditfilter.c +1
-1@@ -947,7 +947,7 @@ static void audit_update_watch(struct au/* 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);
This looks like 2.6.22 material to me.
Question is: is it also 2.6.21.x material?
23 Haz 2007 Cts tarihinde, Andrew Morton şunları yazmıştı:
Quoted 3 lines
This looks like 2.6.22 material to me.
Question is: is it also 2.6.21.x material?
I even can reproduce same oops with 2.6.18 :)
Cheers
Signature · 4 lines
S.Çağlar Onur <[email protected]> http://cekirdek.pardus.org.tr/~caglar/ Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
Quoted 3 lines · Andrew Morton
This looks like 2.6.22 material to me.
Question is: is it also 2.6.21.x material?
Yes, it is.
Quoted 6 lines · On Sat, 23 Jun 2007 20:16:09 +0100 Al Viro <[email protected]> wrote:
Quoted 3 lines · Andrew Morton
This looks like 2.6.22 material to me.
Question is: is it also 2.6.21.x material?
Yes, it is.
OK, thanks, I queued it for both kernels.