mac_stub.c (172953) | mac_stub.c (172955) |
---|---|
1/*- 2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson 3 * Copyright (c) 2001-2005 McAfee, Inc. 4 * Copyright (c) 2005-2006 SPARTA, Inc. 5 * All rights reserved. 6 * 7 * This software was developed by Robert Watson for the TrustedBSD Project. 8 * --- 21 unchanged lines hidden (view full) --- 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * | 1/*- 2 * Copyright (c) 1999-2002, 2007 Robert N. M. Watson 3 * Copyright (c) 2001-2005 McAfee, Inc. 4 * Copyright (c) 2005-2006 SPARTA, Inc. 5 * All rights reserved. 6 * 7 * This software was developed by Robert Watson for the TrustedBSD Project. 8 * --- 21 unchanged lines hidden (view full) --- 30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * |
38 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 172953 2007-10-25 07:49:47Z rwatson $ | 38 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 172955 2007-10-25 11:31:11Z rwatson $ |
39 */ 40 41/* 42 * Developed by the TrustedBSD Project. 43 * 44 * Stub module that implements a NOOP for most (if not all) MAC Framework 45 * policy entry points. 46 */ --- 1382 unchanged lines hidden (view full) --- 1429 1430static int 1431stub_priv_grant(struct ucred *cred, int priv) 1432{ 1433 1434 return (EPERM); 1435} 1436 | 39 */ 40 41/* 42 * Developed by the TrustedBSD Project. 43 * 44 * Stub module that implements a NOOP for most (if not all) MAC Framework 45 * policy entry points. 46 */ --- 1382 unchanged lines hidden (view full) --- 1429 1430static int 1431stub_priv_grant(struct ucred *cred, int priv) 1432{ 1433 1434 return (EPERM); 1435} 1436 |
1437static struct mac_policy_ops mac_stub_ops = | 1437static struct mac_policy_ops stub_ops = |
1438{ 1439 .mpo_destroy = stub_destroy, 1440 .mpo_init = stub_init, 1441 .mpo_syscall = stub_syscall, 1442 .mpo_bpfdesc_init_label = stub_init_label, 1443 .mpo_cred_init_label = stub_init_label, 1444 .mpo_devfs_init_label = stub_init_label, 1445 .mpo_ifnet_init_label = stub_init_label, --- 209 unchanged lines hidden (view full) --- 1655 .mpo_priv_check = stub_priv_check, 1656 .mpo_priv_grant = stub_priv_grant, 1657 .mpo_init_syncache_label = stub_init_label_waitcheck, 1658 .mpo_destroy_syncache_label = stub_destroy_label, 1659 .mpo_init_syncache_from_inpcb = stub_init_syncache_from_inpcb, 1660 .mpo_create_mbuf_from_syncache = stub_create_mbuf_from_syncache, 1661}; 1662 | 1438{ 1439 .mpo_destroy = stub_destroy, 1440 .mpo_init = stub_init, 1441 .mpo_syscall = stub_syscall, 1442 .mpo_bpfdesc_init_label = stub_init_label, 1443 .mpo_cred_init_label = stub_init_label, 1444 .mpo_devfs_init_label = stub_init_label, 1445 .mpo_ifnet_init_label = stub_init_label, --- 209 unchanged lines hidden (view full) --- 1655 .mpo_priv_check = stub_priv_check, 1656 .mpo_priv_grant = stub_priv_grant, 1657 .mpo_init_syncache_label = stub_init_label_waitcheck, 1658 .mpo_destroy_syncache_label = stub_destroy_label, 1659 .mpo_init_syncache_from_inpcb = stub_init_syncache_from_inpcb, 1660 .mpo_create_mbuf_from_syncache = stub_create_mbuf_from_syncache, 1661}; 1662 |
1663MAC_POLICY_SET(&mac_stub_ops, mac_stub, "TrustedBSD MAC/Stub", | 1663MAC_POLICY_SET(&stub_ops, mac_stub, "TrustedBSD MAC/Stub", |
1664 MPC_LOADTIME_FLAG_UNLOADOK, NULL); | 1664 MPC_LOADTIME_FLAG_UNLOADOK, NULL); |