[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090109161346.13371.62067.stgit@warthog.procyon.org.uk>
Date: Fri, 09 Jan 2009 16:13:46 +0000
From: David Howells <dhowells@...hat.com>
To: torvalds@...l.org, jmorris@...ei.org, akpm@...ux-foundation.org
Cc: dhowells@...hat.com, steved@...hat.com,
linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org
Subject: [PATCH 2/2] CRED: Must initialise the new creds in
prepare_kernel_cred()
The newly allocated creds in prepare_kernel_cred() must be initialised before
get_uid() and get_group_info() can access them. They should be copied from
the old credentials.
Reported-by: Steve Dickson <steved@...hat.com>
Signed-off-by: David Howells <dhowells@...hat.com>
Acked-by: Steve Dickson <steved@...hat.com>
---
kernel/cred.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/kernel/cred.c b/kernel/cred.c
index 400e608..3a03918 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -507,6 +507,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
else
old = get_cred(&init_cred);
+ *new = *old;
get_uid(new->user);
get_group_info(new->group_info);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists