aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2009-01-09 11:13:46 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-09 14:53:53 -0500
commit43529c97122f2c851126447963eedcb8cba74fbe (patch)
tree4bcba354186ae52e84d57920012f94d47bf0f72b /kernel
parent0de336814107358bc8c4173bf9ce2d42445173fe (diff)
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@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Steve Dickson <steved@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cred.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/cred.c b/kernel/cred.c
index fc222e4acfb0..043f78c133c4 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -506,6 +506,7 @@ struct cred *prepare_kernel_cred(struct task_struct *daemon)
506 else 506 else
507 old = get_cred(&init_cred); 507 old = get_cred(&init_cred);
508 508
509 *new = *old;
509 get_uid(new->user); 510 get_uid(new->user);
510 get_group_info(new->group_info); 511 get_group_info(new->group_info);
511 512