From: Tim Chen Date: Tue, 9 Aug 2011 06:48:32 +0000 (+0000) Subject: scm: Capture the full credentials of the scm sender X-Git-Tag: v3.0.5~61 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=265d5c2eb22550566cf4193df46596dac439374c;p=karo-tx-linux.git scm: Capture the full credentials of the scm sender [ Upstream commit e33f7a9f37d486f4c6cce5de18a6eea11d68f64f ] This patch corrects an erroneous update of credential's gid with uid introduced in commit 257b5358b32f17 since 2.6.36. Signed-off-by: Tim Chen Acked-by: Eric Dumazet Reviewed-by: James Morris Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/core/scm.c b/net/core/scm.c index 4c1ef026d695..811b53fb330e 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -192,7 +192,7 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) goto error; cred->uid = cred->euid = p->creds.uid; - cred->gid = cred->egid = p->creds.uid; + cred->gid = cred->egid = p->creds.gid; put_cred(p->cred); p->cred = cred; }