summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-03-30 21:54:50 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-03-30 21:54:50 +0000
commit7462bb1b86b895dab1b1b555c941578365367199 (patch)
tree2be23589f75ab6cd1bd1180a4f063217d94820de /sys/kern/uipc_socket.c
parent4eb2d12b27096ee78c5daf9473a287c1b1ea15f7 (diff)
Eliminates struct pcred by moving the real and saved ugids into
struct ucred; struct process then directly links to the ucred Based on a discussion at c2k10 or so before noting that FreeBSD and NetBSD did this too. ok matthew@
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 583c6514ed1..64239b2d8a7 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.125 2014/03/28 08:33:51 sthen Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.126 2014/03/30 21:54:48 guenther Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -120,9 +120,9 @@ socreate(int dom, struct socket **aso, int type, int proto)
so->so_type = type;
if (suser(p, 0) == 0)
so->so_state = SS_PRIV;
- so->so_ruid = p->p_cred->p_ruid;
+ so->so_ruid = p->p_ucred->cr_ruid;
so->so_euid = p->p_ucred->cr_uid;
- so->so_rgid = p->p_cred->p_rgid;
+ so->so_rgid = p->p_ucred->cr_rgid;
so->so_egid = p->p_ucred->cr_gid;
so->so_cpid = p->p_p->ps_pid;
so->so_proto = prp;