summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_socket.c5
-rw-r--r--sys/kern/uipc_socket2.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 20693e50441..2ccc5dfe900 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.20 1998/01/06 23:49:48 deraadt Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.21 1998/02/14 10:55:09 deraadt Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -90,7 +90,8 @@ socreate(dom, aso, type, proto)
so->so_type = type;
if (p->p_ucred->cr_uid == 0)
so->so_state = SS_PRIV;
- so->so_uid = p->p_ucred->cr_uid;
+ so->so_ruid = p->p_cred->p_ruid;
+ so->so_euid = p->p_ucred->cr_uid;
so->so_proto = prp;
error =
(*prp->pr_usrreq)(so, PRU_ATTACH, NULL, (struct mbuf *)(long)proto,
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index 2455a06c052..4cbca6650f9 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.6 1997/08/31 20:42:26 deraadt Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.7 1998/02/14 10:55:09 deraadt Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -173,7 +173,8 @@ sonewconn1(head, connstatus)
so->so_proto = head->so_proto;
so->so_timeo = head->so_timeo;
so->so_pgid = head->so_pgid;
- so->so_uid = head->so_uid;
+ so->so_euid = head->so_euid;
+ so->so_ruid = head->so_ruid;
(void) soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat);
soqinsque(head, so, soqueue);
if ((*so->so_proto->pr_usrreq)(so, PRU_ATTACH,