Fix overly verbose audit logs (rhbz 1066064)

This commit is contained in:
Josh Boyer 2014-03-03 12:11:04 -05:00
parent 05d1c5eae2
commit e03ee0de7f
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,36 @@
Bugzilla: 1066064
Upstream-status: 3.14-rc1
From c2412d91c68426e22add16550f97ae5cd988a159 Mon Sep 17 00:00:00 2001
From: Gao feng <gaofeng@cn.fujitsu.com>
Date: Fri, 1 Nov 2013 19:34:45 +0800
Subject: [PATCH] audit: don't generate loginuid log when audit disabled
If audit is disabled, we shouldn't generate loginuid audit
log.
Acked-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
Signed-off-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
---
kernel/auditsc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index df1e685..9ab02fa 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -1971,6 +1971,9 @@ static void audit_log_set_loginuid(kuid_t koldloginuid, kuid_t kloginuid,
struct audit_buffer *ab;
uid_t uid, ologinuid, nloginuid;
+ if (!audit_enabled)
+ return;
+
uid = from_kuid(&init_user_ns, task_uid(current));
ologinuid = from_kuid(&init_user_ns, koldloginuid);
nloginuid = from_kuid(&init_user_ns, kloginuid),
--
1.8.5.3

View File

@ -779,6 +779,9 @@ Patch25027: kvm-x86-fix-emulator-buffer-overflow.patch
#rhbz 1065087
Patch25028: tty-Fix-low_latency-BUG.patch
#rhbz 1066064
Patch25029: audit-don-t-generate-loginuid-log-when-audit-disable.patch
# END OF PATCH DEFINITIONS
%endif
@ -1504,6 +1507,9 @@ ApplyPatch kvm-x86-fix-emulator-buffer-overflow.patch
#rhbz 1065087
ApplyPatch tty-Fix-low_latency-BUG.patch
#rhbz 1066064
ApplyPatch audit-don-t-generate-loginuid-log-when-audit-disable.patch
# END OF PATCH APPLICATIONS
%endif
@ -2316,6 +2322,9 @@ fi
# and build.
%changelog
* Mon Mar 03 2014 Josh Boyer <jwboyer@fedoraproject.org>
- Fix overly verbose audit logs (rhbz 1066064)
* Mon Mar 03 2014 Josh Boyer <jwboyer@fedoraproject.org> - 3.13.5-102
- CVE-2014-0049 kvm: mmio_fragments out-of-bounds access (rhbz 1062368 1071837)
- Fix atomic sched BUG in tty low_latency (rhbz 1065087)