summaryrefslogtreecommitdiffstats
path: root/sys/netinet/udp_usrreq.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2001-11-08 02:13:18 +0000
committerrwatson <rwatson@FreeBSD.org>2001-11-08 02:13:18 +0000
commit8cf42b482a9aa3f9ec41071c44bc18a0ea425abf (patch)
treef48964de5180c6b27c3272456da3b93d16bd1ea3 /sys/netinet/udp_usrreq.c
parentc4a9f1d3ab184e9dddf4227f8e0781b59d1a82b7 (diff)
downloadFreeBSD-src-8cf42b482a9aa3f9ec41071c44bc18a0ea425abf.zip
FreeBSD-src-8cf42b482a9aa3f9ec41071c44bc18a0ea425abf.tar.gz
o Replace reference to 'struct proc' with 'struct thread' in 'struct
sysctl_req', which describes in-progress sysctl requests. This permits sysctl handlers to have access to the current thread, permitting work on implementing td->td_ucred, migration of suser() to using struct thread to derive the appropriate ucred, and allowing struct thread to be passed down to other code, such as network code where td is not currently available (and curproc is used). o Note: netncp and netsmb are not updated to reflect this change, as they are not currently KSE-adapted. Reviewed by: julian Obtained from: TrustedBSD Project
Diffstat (limited to 'sys/netinet/udp_usrreq.c')
-rw-r--r--sys/netinet/udp_usrreq.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 8090911..6eeb3a1 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -583,7 +583,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
for (inp = LIST_FIRST(udbinfo.listhead), i = 0; inp && i < n;
inp = LIST_NEXT(inp, inp_list)) {
if (inp->inp_gencnt <= gencnt) {
- if (cr_cansee(req->p->p_ucred,
+ if (cr_cansee(req->td->td_proc->p_ucred,
inp->inp_socket->so_cred))
continue;
inp_list[i++] = inp;
@@ -635,7 +635,7 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
struct inpcb *inp;
int error, s;
- error = suser_xxx(0, req->p, PRISON_ROOT);
+ error = suser_xxx(0, req->td->td_proc, PRISON_ROOT);
if (error)
return (error);
error = SYSCTL_IN(req, addrs, sizeof(addrs));
@@ -648,7 +648,7 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
error = ENOENT;
goto out;
}
- error = cr_cansee(req->p->p_ucred, inp->inp_socket->so_cred);
+ error = cr_cansee(req->td->td_proc->p_ucred, inp->inp_socket->so_cred);
if (error)
goto out;
bzero(&xuc, sizeof(xuc));
OpenPOWER on IntegriCloud