diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index db9a70e99..973e8435c 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -45,6 +45,7 @@ * dgram receiver. * Artur Skawina : Hash function optimizations * Alexey Kuznetsov : Full scale SMP. Lot of bugs are introduced 8) + * Malcolm Beattie : Set peercred for socketpair * * * Known differences from reference BSD that was tested: @@ -982,6 +983,9 @@ static int unix_socketpair(struct socket *socka, struct socket *sockb) sock_hold(skb); unix_peer(ska)=skb; unix_peer(skb)=ska; + ska->peercred.pid = skb->peercred.pid = current->pid; + ska->peercred.uid = skb->peercred.uid = current->euid; + ska->peercred.gid = skb->peercred.gid = current->egid; if (ska->type != SOCK_DGRAM) { |