diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-05-23 15:51:13 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-05-23 15:51:13 +0000 |
commit | 114f984d932b1f6810293178a80279f30cd2bd27 (patch) | |
tree | 1a1f583d1f42425cfd75dad816a48f3121aff8d0 /sys/kern/uipc_socket2.c | |
parent | b9a20684fa94a5082c8e1df0b6f92099a2f7cb63 (diff) |
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); |