diff options
author | bz <bz@FreeBSD.org> | 2008-10-17 16:26:16 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-10-17 16:26:16 +0000 |
commit | 4d4d2d367d9471f9de363f0ca2ed82871e0030d0 (patch) | |
tree | 5281cd8b122823b07a0da3d73d1b7dd5592afe3d /sys/netinet/ip_divert.c | |
parent | 62616a7acbbd781617169a513e88cc20a5ad44ba (diff) | |
download | FreeBSD-src-4d4d2d367d9471f9de363f0ca2ed82871e0030d0.zip FreeBSD-src-4d4d2d367d9471f9de363f0ca2ed82871e0030d0.tar.gz |
Add cr_canseeinpcb() doing checks using the cached socket
credentials from inp_cred which is also available after the
socket is gone.
Switch cr_canseesocket consumers to cr_canseeinpcb.
This removes an extra acquisition of the socket lock.
Reviewed by: rwatson
MFC after: 3 months (set timer; decide then)
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r-- | sys/netinet/ip_divert.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index aea0d61..bac4534 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -627,7 +627,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS) inp = LIST_NEXT(inp, inp_list)) { INP_RLOCK(inp); if (inp->inp_gencnt <= gencnt && - cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0) + cr_canseeinpcb(req->td->td_ucred, inp) == 0) inp_list[i++] = inp; INP_RUNLOCK(inp); } |