Hi all, Today's linux-next merge of the net-next tree got a conflict in include/net/scm.h between commit 83f1b4ba917d ("net: fix incorrect credentials passing") from Linus' tree and commit 6b0ee8c036ec ("scm: Stop passing struct cred") from the net-next tree. I fixed it up (see below) and can carry the fix as necessary (no action is required). I also applied the following merge fix patch (I am not sure if this is correct, but it seems to be consistent): From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Date: Mon, 22 Apr 2013 13:06:10 +1000 Subject: [PATCH] net: af_unix fix for incorrect credentials passing Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> --- net/unix/af_unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5ca1631..9efe011 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1414,7 +1414,7 @@ static void maybe_add_creds(struct sk_buff *skb, const struct socket *sock, !other->sk_socket || test_bit(SOCK_PASSCRED, &other->sk_socket->flags)) { UNIXCB(skb).pid = get_pid(task_tgid(current)); - current_euid_egid(&UNIXCB(skb).uid, &UNIXCB(skb).gid); + current_uid_gid(&UNIXCB(skb).uid, &UNIXCB(skb).gid); } } -- Cheers, Stephen Rothwell sfr@xxxxxxxxxxxxxxxx diff --cc include/net/scm.h index b117081,5a4c6a9..0000000 --- a/include/net/scm.h +++ b/include/net/scm.h @@@ -81,8 -75,10 +75,10 @@@ static __inline__ int scm_send(struct s struct scm_cookie *scm, bool forcecreds) { memset(scm, 0, sizeof(*scm)); + scm->creds.uid = INVALID_UID; + scm->creds.gid = INVALID_GID; if (forcecreds) - scm_set_cred(scm, task_tgid(current), current_cred()); - scm_set_cred(scm, task_tgid(current), current_euid(), current_egid()); ++ scm_set_cred(scm, task_tgid(current), current_uid(), current_gid()); unix_get_peersec_dgram(sock, scm); if (msg->msg_controllen <= 0) return 0;
Attachment:
pgp_E190MSpo0.pgp
Description: PGP signature