diff options
author | bz <bz@FreeBSD.org> | 2009-01-09 16:22:32 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2009-01-09 16:22:32 +0000 |
commit | ad0a16b1e5f8575bc775b5694c5436651856c617 (patch) | |
tree | 039cf037eafb30cf02c9ecaabd328cc91273f442 /sys | |
parent | e2eee65f2168a3fcb7a12e27d463de4003f878c8 (diff) | |
download | FreeBSD-src-ad0a16b1e5f8575bc775b5694c5436651856c617.zip FreeBSD-src-ad0a16b1e5f8575bc775b5694c5436651856c617.tar.gz |
Take the cred from curthread rather than curproc as curproc would need
locking but the credential from curthread (usually) never changes.
Discussed with: jhb
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/rtsock.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 3c1436c..3575c94 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1344,7 +1344,7 @@ done: return (error); } -int +static int sysctl_ifmalist(int af, struct walkarg *w) { INIT_VNET_NET(curvnet); @@ -1365,8 +1365,8 @@ sysctl_ifmalist(int af, struct walkarg *w) TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { if (af && af != ifma->ifma_addr->sa_family) continue; - if (jailed(curproc->p_ucred) && - !prison_if(curproc->p_ucred, ifma->ifma_addr)) + if (jailed(curthread->td_ucred) && + !prison_if(curthread->td_ucred, ifma->ifma_addr)) continue; info.rti_info[RTAX_IFA] = ifma->ifma_addr; info.rti_info[RTAX_GATEWAY] = |