diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-08-15 18:51:26 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-08-15 18:51:26 +0000 |
commit | 9725be3a61bad07fdfb0fb8789d43a39078736fd (patch) | |
tree | dae06df9c9c89cda20d8dca2706025bf4118d390 /sys/kern/kern_mac.c | |
parent | 2439b56e982b8465a7d01d031ff79476aec61ab2 (diff) | |
download | FreeBSD-src-9725be3a61bad07fdfb0fb8789d43a39078736fd.zip FreeBSD-src-9725be3a61bad07fdfb0fb8789d43a39078736fd.tar.gz |
Rename mac_check_socket_receive() to mac_check_socket_deliver() so that
we can use the names _receive() and _send() for the receive() and send()
checks. Rename related constants, policy implementations, etc.
PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from: TrustedBSD Project
Sponsored by: DARPA, NAI Labs
MFC after:
Diffstat (limited to 'sys/kern/kern_mac.c')
-rw-r--r-- | sys/kern/kern_mac.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/kern/kern_mac.c b/sys/kern/kern_mac.c index 23c6a7c..66e16e9 100644 --- a/sys/kern/kern_mac.c +++ b/sys/kern/kern_mac.c @@ -693,12 +693,12 @@ mac_policy_register(struct mac_policy_conf *mpc) mpc->mpc_ops->mpo_check_socket_connect = mpe->mpe_function; break; - case MAC_CHECK_SOCKET_LISTEN: - mpc->mpc_ops->mpo_check_socket_listen = + case MAC_CHECK_SOCKET_DELIVER: + mpc->mpc_ops->mpo_check_socket_deliver = mpe->mpe_function; break; - case MAC_CHECK_SOCKET_RECEIVE: - mpc->mpc_ops->mpo_check_socket_receive = + case MAC_CHECK_SOCKET_LISTEN: + mpc->mpc_ops->mpo_check_socket_listen = mpe->mpe_function; break; case MAC_CHECK_SOCKET_RELABEL: @@ -2534,28 +2534,28 @@ mac_check_socket_connect(struct ucred *cred, struct socket *socket, } int -mac_check_socket_listen(struct ucred *cred, struct socket *socket) +mac_check_socket_deliver(struct socket *socket, struct mbuf *mbuf) { int error; if (!mac_enforce_socket) return (0); - MAC_CHECK(check_socket_listen, cred, socket, &socket->so_label); + MAC_CHECK(check_socket_deliver, socket, &socket->so_label, mbuf, + &mbuf->m_pkthdr.label); + return (error); } int -mac_check_socket_receive(struct socket *socket, struct mbuf *mbuf) +mac_check_socket_listen(struct ucred *cred, struct socket *socket) { int error; if (!mac_enforce_socket) return (0); - MAC_CHECK(check_socket_receive, socket, &socket->so_label, mbuf, - &mbuf->m_pkthdr.label); - + MAC_CHECK(check_socket_listen, cred, socket, &socket->so_label); return (error); } |