diff options
author | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-09-12 08:38:13 +0000 |
commit | 5596676e6c6c1e81e899cd0531f9b1c28a292669 (patch) | |
tree | b1a19fcdf05759281fab0d89efb13f0fdf42102e /sys/netinet6/ip6_output.c | |
parent | 83e00d4274950d2b531c24692cd123538ffbddb9 (diff) | |
download | FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.zip FreeBSD-src-5596676e6c6c1e81e899cd0531f9b1c28a292669.tar.gz |
KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
Diffstat (limited to 'sys/netinet6/ip6_output.c')
-rw-r--r-- | sys/netinet6/ip6_output.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index 41b25b6c..99e8ddd 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -74,6 +74,7 @@ #include <sys/param.h> #include <sys/malloc.h> #include <sys/mbuf.h> +#include <sys/proc.h> #include <sys/errno.h> #include <sys/protosw.h> #include <sys/socket.h> @@ -1271,20 +1272,20 @@ ip6_ctloutput(so, sopt) int error, optval; int level, op, optname; int optlen; - struct proc *p; + struct thread *td; if (sopt) { level = sopt->sopt_level; op = sopt->sopt_dir; optname = sopt->sopt_name; optlen = sopt->sopt_valsize; - p = sopt->sopt_p; + td = sopt->sopt_td; } else { panic("ip6_ctloutput: arg soopt is NULL"); } error = optval = 0; - privileged = (p == 0 || suser(p)) ? 0 : 1; + privileged = (td == 0 || suser_td(td)) ? 0 : 1; if (level == IPPROTO_IPV6) { switch (op) { @@ -1440,7 +1441,7 @@ do { \ break; } /* XXX */ - MGET(m, sopt->sopt_p ? M_TRYWAIT : M_DONTWAIT, MT_HEADER); + MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_HEADER); if (m == 0) { error = ENOBUFS; break; @@ -1708,7 +1709,7 @@ ip6_pcbopts(pktopt, m, so, sopt) { struct ip6_pktopts *opt = *pktopt; int error = 0; - struct proc *p = sopt->sopt_p; + struct thread *td = sopt->sopt_td; int priv = 0; /* turn off any old options. */ @@ -1734,7 +1735,7 @@ ip6_pcbopts(pktopt, m, so, sopt) } /* set options specified by user. */ - if (p && !suser(p)) + if (td && !suser_td(td)) priv = 1; if ((error = ip6_setpktoptions(m, opt, priv, 1)) != 0) { ip6_clearpktopts(opt, 1, -1); /* XXX: discard all options */ @@ -1895,7 +1896,7 @@ ip6_setmoptions(optname, im6op, m) struct route_in6 ro; struct sockaddr_in6 *dst; struct in6_multi_mship *imm; - struct proc *p = curproc; /* XXX */ + struct thread *td = curthread; /* XXX */ if (im6o == NULL) { /* @@ -1990,7 +1991,7 @@ ip6_setmoptions(optname, im6op, m) * all multicast addresses. Only super user is allowed * to do this. */ - if (suser(p)) + if (suser_td(td)) { error = EACCES; break; @@ -2097,7 +2098,7 @@ ip6_setmoptions(optname, im6op, m) } mreq = mtod(m, struct ipv6_mreq *); if (IN6_IS_ADDR_UNSPECIFIED(&mreq->ipv6mr_multiaddr)) { - if (suser(p)) { + if (suser_td(td)) { error = EACCES; break; } |