summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/in6_src.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-03-27 21:05:46 +0000
committerpjd <pjd@FreeBSD.org>2004-03-27 21:05:46 +0000
commit49554d1bd86202a6694cfff7c5fdc77511af0d50 (patch)
treec845ffa71d0beb0ebbebdf12f6a9ebe3e3c71f52 /sys/netinet6/in6_src.c
parent02bc13377989c8a404cdeacd93dd1dabc710c44a (diff)
downloadFreeBSD-src-49554d1bd86202a6694cfff7c5fdc77511af0d50.zip
FreeBSD-src-49554d1bd86202a6694cfff7c5fdc77511af0d50.tar.gz
Reduce 'td' argument to 'cred' (struct ucred) argument in those functions:
- in_pcbbind(), - in_pcbbind_setup(), - in_pcbconnect(), - in_pcbconnect_setup(), - in6_pcbbind(), - in6_pcbconnect(), - in6_pcbsetport(). "It should simplify/clarify things a great deal." --rwatson Requested by: rwatson Reviewed by: rwatson, ume
Diffstat (limited to 'sys/netinet6/in6_src.c')
-rw-r--r--sys/netinet6/in6_src.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 24fa3d7..f6d9668 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -742,10 +742,10 @@ in6_selecthlim(in6p, ifp)
* share this function by all *bsd*...
*/
int
-in6_pcbsetport(laddr, inp, td)
+in6_pcbsetport(laddr, inp, cred)
struct in6_addr *laddr;
struct inpcb *inp;
- struct thread *td;
+ struct ucred *cred;
{
struct socket *so = inp->inp_socket;
u_int16_t lport = 0, first, last, *lastport;
@@ -763,7 +763,7 @@ in6_pcbsetport(laddr, inp, td)
last = ipport_hilastauto;
lastport = &pcbinfo->lasthi;
} else if (inp->inp_flags & INP_LOWPORT) {
- if (td && (error = suser(td)))
+ if ((error = suser_cred(cred, 0)))
return error;
first = ipport_lowfirstauto; /* 1023 */
last = ipport_lowlastauto; /* 600 */
OpenPOWER on IntegriCloud