af_unix: Allow SO_PEERCRED to work across namespaces.
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 13 Jun 2010 03:30:14 +0000 (03:30 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Jun 2010 21:55:55 +0000 (14:55 -0700)
Use struct pid and struct cred to store the peer credentials on struct
sock.  This gives enough information to convert the peer credential
information to a value relative to whatever namespace the socket is in
at the time.

This removes nasty surprises when using SO_PEERCRED on socket
connetions where the processes on either side are in different pid and
user namespaces.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found