1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

Implement mpo_copy_{mbuf,pipe,vnode}_label() entry points for

mac_stub and mac_test.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
This commit is contained in:
Robert Watson 2003-11-16 18:28:58 +00:00
parent 9e71dd0feb
commit 0196273b2d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=122808
2 changed files with 36 additions and 0 deletions

View File

@ -127,6 +127,12 @@ stub_destroy_label(struct label *label)
}
static void
stub_copy_label(struct label *src, struct label *dest)
{
}
static int
stub_externalize_label(struct label *label, char *element_name,
struct sbuf *sb, int *claimed)
@ -1024,6 +1030,9 @@ static struct mac_policy_ops mac_stub_ops =
.mpo_destroy_socket_label = stub_destroy_label,
.mpo_destroy_socket_peer_label = stub_destroy_label,
.mpo_destroy_vnode_label = stub_destroy_label,
.mpo_copy_mbuf_label = stub_copy_label,
.mpo_copy_pipe_label = stub_copy_label,
.mpo_copy_vnode_label = stub_copy_label,
.mpo_externalize_cred_label = stub_externalize_label,
.mpo_externalize_ifnet_label = stub_externalize_label,
.mpo_externalize_pipe_label = stub_externalize_label,

View File

@ -553,6 +553,30 @@ mac_test_destroy_vnode_label(struct label *label)
}
}
static void
mac_test_copy_mbuf_label(struct label *src, struct label *dest)
{
ASSERT_MBUF_LABEL(src);
ASSERT_MBUF_LABEL(dest);
}
static void
mac_test_copy_pipe_label(struct label *src, struct label *dest)
{
ASSERT_PIPE_LABEL(src);
ASSERT_PIPE_LABEL(dest);
}
static void
mac_test_copy_vnode_label(struct label *src, struct label *dest)
{
ASSERT_VNODE_LABEL(src);
ASSERT_VNODE_LABEL(dest);
}
static int
mac_test_externalize_label(struct label *label, char *element_name,
struct sbuf *sb, int *claimed)
@ -1779,6 +1803,9 @@ static struct mac_policy_ops mac_test_ops =
.mpo_destroy_socket_label = mac_test_destroy_socket_label,
.mpo_destroy_socket_peer_label = mac_test_destroy_socket_peer_label,
.mpo_destroy_vnode_label = mac_test_destroy_vnode_label,
.mpo_copy_mbuf_label = mac_test_copy_mbuf_label,
.mpo_copy_pipe_label = mac_test_copy_pipe_label,
.mpo_copy_vnode_label = mac_test_copy_vnode_label,
.mpo_externalize_cred_label = mac_test_externalize_label,
.mpo_externalize_ifnet_label = mac_test_externalize_label,
.mpo_externalize_pipe_label = mac_test_externalize_label,