mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] audit: don't generate loginuid log when audit disabled
@ 2014-03-03 22:30 Richard Guy Briggs
       [not found] ` <20140303224904.GA26305@kroah.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Guy Briggs @ 2014-03-03 22:30 UTC (permalink / raw)
  To: stable, linux-kernel, linux-audit
  Cc: Gao feng, eparis, sgrubb, Richard Guy Briggs

From: Gao feng <gaofeng@cn.fujitsu.com>

If audit is disabled, we shouldn't generate loginuid audit
log.

Cc: stable@vger.kernel.org # v3.13-rc1
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>
---

Already upstream in 3.14-rc1.  This fixes a bug introduced by:
	da0a6104 audit: loginuid functions coding style


 kernel/auditsc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

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.7.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] audit: don't generate loginuid log when audit disabled
       [not found] ` <20140303224904.GA26305@kroah.com>
@ 2014-03-03 22:51   ` Richard Guy Briggs
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Guy Briggs @ 2014-03-03 22:51 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, linux-kernel, linux-audit, Gao feng, eparis, sgrubb

On 14/03/03, Greg KH wrote:
> On Mon, Mar 03, 2014 at 05:30:50PM -0500, Richard Guy Briggs wrote:
> > From: Gao feng <gaofeng@cn.fujitsu.com>
> > 
> > If audit is disabled, we shouldn't generate loginuid audit
> > log.
> > 
> > Cc: stable@vger.kernel.org # v3.13-rc1
> > 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>
> > ---
> > 
> > Already upstream in 3.14-rc1.  This fixes a bug introduced by:
> > 	da0a6104 audit: loginuid functions coding style
> 
> What is the git id of the patch in Linus's tree?

Sorry, here you go: c2412d9

> greg k-h

- RGB

--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer, Kernel Security, AMER ENG Base Operating Systems, Red Hat
Remote, Ottawa, Canada
Voice: +1.647.777.2635, Internal: (81) 32635, Alt: +1.613.693.0684x3545

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-03 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03 22:30 [PATCH] audit: don't generate loginuid log when audit disabled Richard Guy Briggs
     [not found] ` <20140303224904.GA26305@kroah.com>
2014-03-03 22:51   ` Richard Guy Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®