diff options
author | Eric Paris | 2008-01-08 23:38:31 +0100 |
---|---|---|
committer | Al Viro | 2008-02-01 20:24:45 +0100 |
commit | b593d384efcff7bdf6beb1bc1bc69927977aee26 (patch) | |
tree | 9055ef0decc84dcbf0da67135535f0746e602e8e /kernel/auditsc.c | |
parent | [AUDIT] clean up audit_receive_msg() (diff) | |
download | kernel-qcow2-linux-b593d384efcff7bdf6beb1bc1bc69927977aee26.tar.gz kernel-qcow2-linux-b593d384efcff7bdf6beb1bc1bc69927977aee26.tar.xz kernel-qcow2-linux-b593d384efcff7bdf6beb1bc1bc69927977aee26.zip |
[AUDIT] create context if auditing was ever enabled
Disabling audit at runtime by auditctl doesn't mean that we can
stop allocating contexts for new processes; we don't want to miss them
when that sucker is reenabled.
(based on work from Al Viro in the RHEL kernel series)
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index 6e03322e155b..1c06ecf38d7b 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -70,6 +70,7 @@ #include "audit.h" extern struct list_head audit_filter_list[]; +extern int audit_ever_enabled; /* AUDIT_NAMES is the number of slots we reserve in the audit_context * for saving names from getname(). */ @@ -838,7 +839,7 @@ int audit_alloc(struct task_struct *tsk) struct audit_context *context; enum audit_state state; - if (likely(!audit_enabled)) + if (likely(!audit_ever_enabled)) return 0; /* Return if not auditing. */ state = audit_filter_task(tsk); |