summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_socket.c
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/uipc_socket.c
parentf76668533ca23936cf5dbbe1e7befe5263033e97 (diff)
change to so_uid, also fix a missing credential found by dm
Diffstat (limited to 'sys/kern/uipc_socket.c')
-rw-r--r--sys/kern/uipc_socket.c6
1 files changed, 2 insertions, 4 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);
}