summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-24 04:56:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-08-24 04:56:41 +0000
commit4c3e26f1485b97d9a69743b237cc9b7c9da2a69c (patch)
tree7a1bb40ea77f4b234f6d3dec05e4e6e9cde9ffc3 /sys/kern
parentf76668533ca23936cf5dbbe1e7befe5263033e97 (diff)
change to so_uid, also fix a missing credential found by dm
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/uipc_socket.c6
-rw-r--r--sys/kern/uipc_socket2.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
index 6d0d9862a64..9cfe26d7f68 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket.c,v 1.5 1996/08/14 07:26:21 deraadt Exp $ */
+/* $OpenBSD: uipc_socket.c,v 1.6 1996/08/24 04:56:36 deraadt Exp $ */
/* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */
/*
@@ -83,7 +83,7 @@ socreate(dom, aso, type, proto)
so->so_type = type;
if (p->p_ucred->cr_uid == 0)
so->so_state = SS_PRIV;
- so->so_ucred = crdup(p->p_ucred);
+ so->so_uid = p->p_ucred->cr_uid;
so->so_proto = prp;
error =
(*prp->pr_usrreq)(so, PRU_ATTACH, NULL, (struct mbuf *)(long)proto,
@@ -152,8 +152,6 @@ sofree(so)
}
sbrelease(&so->so_snd);
sorflush(so);
- if (so->so_ucred)
- crfree(so->so_ucred);
FREE(so, M_SOCKET);
}
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index b414175685f..66b22eb336e 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_socket2.c,v 1.2 1996/03/03 17:20:20 niklas Exp $ */
+/* $OpenBSD: uipc_socket2.c,v 1.3 1996/08/24 04:56:37 deraadt Exp $ */
/* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */
/*
@@ -173,6 +173,7 @@ 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;
(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,