Skip to content

Commit

Permalink
scm: Capture the full credentials of the scm sender
Browse files Browse the repository at this point in the history
This patch corrects an erroneous update of credential's gid with uid
introduced in commit 257b535 since 2.6.36.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Tim Chen authored and David S. Miller committed Aug 11, 2011
1 parent f0e3d06 commit e33f7a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e33f7a9

Please sign in to comment.