提交 43529c97 编写于 作者: D David Howells 提交者: Linus Torvalds

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: NSteve Dickson <steved@redhat.com>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Acked-by: NSteve Dickson <steved@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0de33681
......@@ -506,6 +506,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册