diff options
author | bz <bz@FreeBSD.org> | 2008-10-17 12:54:28 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-10-17 12:54:28 +0000 |
commit | 14874ad4f167cbb8503db0ed6e07a2335716d1cf (patch) | |
tree | 16051145502fe2d8217296914207d7efee1a05a5 /sys/security/mac/mac_inet.c | |
parent | 8e885f7f2de6daa7d3e9482c0aa90c25be08d12a (diff) | |
download | FreeBSD-src-14874ad4f167cbb8503db0ed6e07a2335716d1cf.zip FreeBSD-src-14874ad4f167cbb8503db0ed6e07a2335716d1cf.tar.gz |
Add mac_inpcb_check_visible MAC Framework entry point, which is similar
to mac_socket_check_visible but operates on the inpcb.
Reviewed by: rwatson
MFC after: 3 months (set timer, decide then)
Diffstat (limited to 'sys/security/mac/mac_inet.c')
-rw-r--r-- | sys/security/mac/mac_inet.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/security/mac/mac_inet.c b/sys/security/mac/mac_inet.c index 6d731ce..b11f5b7 100644 --- a/sys/security/mac/mac_inet.c +++ b/sys/security/mac/mac_inet.c @@ -313,6 +313,18 @@ mac_inpcb_check_deliver(struct inpcb *inp, struct mbuf *m) return (error); } +int +mac_inpcb_check_visible(struct ucred *cred, struct inpcb *inp) +{ + int error; + + INP_LOCK_ASSERT(inp); + + MAC_CHECK(inpcb_check_visible, cred, inp, inp->inp_label); + + return (error); +} + void mac_inpcb_sosetlabel(struct socket *so, struct inpcb *inp) { |