diff options
author | 2008-05-23 15:51:12 +0000 | |
---|---|---|
committer | 2008-05-23 15:51:12 +0000 | |
commit | 621c015e2fbe65fdf3205e452a522f5ed4896427 (patch) | |
tree | 55b799dfbba135124ee55d9ea801968c48dce9b3 /sys/kern/uipc_socket2.c | |
parent | - remove USER_LDT, it was never in a state where it would copile, nor will (diff) | |
download | wireguard-openbsd-621c015e2fbe65fdf3205e452a522f5ed4896427.tar.xz wireguard-openbsd-621c015e2fbe65fdf3205e452a522f5ed4896427.zip |
Deal with the situation when TCP nfs mounts timeout and processes
get hung in nfs_reconnect() because they do not have the proper
privilages to bind to a socket, by adding a struct proc * argument
to sobind() (and the *_usrreq() routines, and finally in{6}_pcbbind)
and do the sobind() with proc0 in nfs_connect.
OK markus@, blambert@.
"go ahead" deraadt@.
Fixes an issue reported by bernd@ (Tested by bernd@).
Fixes PR5135 too.
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r-- | sys/kern/uipc_socket2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index c5b9a9c246e..1cf4403f75d 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket2.c,v 1.43 2007/09/19 15:08:29 blambert Exp $ */ +/* $OpenBSD: uipc_socket2.c,v 1.44 2008/05/23 15:51:12 thib Exp $ */ /* $NetBSD: uipc_socket2.c,v 1.11 1996/02/04 02:17:55 christos Exp $ */ /* @@ -194,8 +194,8 @@ sonewconn(struct socket *head, int connstatus) (void) soreserve(so, snd_sb_hiwat, rcv_sb_hiwat); soqinsque(head, so, soqueue); - if ((*so->so_proto->pr_usrreq)(so, PRU_ATTACH, - (struct mbuf *)0, (struct mbuf *)0, (struct mbuf *)0)) { + if ((*so->so_proto->pr_usrreq)(so, PRU_ATTACH, NULL, NULL, NULL, + curproc)) { (void) soqremque(so, soqueue); pool_put(&socket_pool, so); return ((struct socket *)0); |