summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mac.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2002-08-15 18:51:26 +0000
committerrwatson <rwatson@FreeBSD.org>2002-08-15 18:51:26 +0000
commit9725be3a61bad07fdfb0fb8789d43a39078736fd (patch)
treedae06df9c9c89cda20d8dca2706025bf4118d390 /sys/kern/kern_mac.c
parent2439b56e982b8465a7d01d031ff79476aec61ab2 (diff)
downloadFreeBSD-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.c20
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);
}
OpenPOWER on IntegriCloud