diff options
-rw-r--r-- | sys/kern/uipc_sockbuf.c | 15 | ||||
-rw-r--r-- | sys/kern/uipc_socket2.c | 15 | ||||
-rw-r--r-- | sys/kern/uipc_usrreq.c | 2 |
3 files changed, 3 insertions, 29 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 122fcda..ae6ba02 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -218,16 +218,6 @@ sonewconn(head, connstatus) register struct socket *head; int connstatus; { - - return (sonewconn3(head, connstatus, NULL)); -} - -struct socket * -sonewconn3(head, connstatus, td) - register struct socket *head; - int connstatus; - struct thread *td; -{ register struct socket *so; if (head->so_qlen > 3 * head->so_qlimit / 2) @@ -242,10 +232,7 @@ sonewconn3(head, connstatus, td) so->so_state = head->so_state | SS_NOFDREF; so->so_proto = head->so_proto; so->so_timeo = head->so_timeo; - if (td != NULL) - so->so_cred = crhold(td->td_proc->p_ucred); - else - so->so_cred = crhold(head->so_cred); + so->so_cred = crhold(head->so_cred); if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) || (*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) { sotryfree(so); diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c index 122fcda..ae6ba02 100644 --- a/sys/kern/uipc_socket2.c +++ b/sys/kern/uipc_socket2.c @@ -218,16 +218,6 @@ sonewconn(head, connstatus) register struct socket *head; int connstatus; { - - return (sonewconn3(head, connstatus, NULL)); -} - -struct socket * -sonewconn3(head, connstatus, td) - register struct socket *head; - int connstatus; - struct thread *td; -{ register struct socket *so; if (head->so_qlen > 3 * head->so_qlimit / 2) @@ -242,10 +232,7 @@ sonewconn3(head, connstatus, td) so->so_state = head->so_state | SS_NOFDREF; so->so_proto = head->so_proto; so->so_timeo = head->so_timeo; - if (td != NULL) - so->so_cred = crhold(td->td_proc->p_ucred); - else - so->so_cred = crhold(head->so_cred); + so->so_cred = crhold(head->so_cred); if (soreserve(so, head->so_snd.sb_hiwat, head->so_rcv.sb_hiwat) || (*so->so_proto->pr_usrreqs->pru_attach)(so, 0, NULL)) { sotryfree(so); diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 0cd408f..a7ffcff 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -691,7 +691,7 @@ unp_connect(so, nam, td) } if (so->so_proto->pr_flags & PR_CONNREQUIRED) { if ((so2->so_options & SO_ACCEPTCONN) == 0 || - (so3 = sonewconn3(so2, 0, td)) == 0) { + (so3 = sonewconn(so2, 0)) == 0) { error = ECONNREFUSED; goto bad; } |