Deleted Added
full compact
mac_stub.c (180059) mac_stub.c (182063)
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.
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 * Copyright (c) 2008 Apple Inc.
5 * All rights reserved.
6 *
7 * This software was developed by Robert Watson for the TrustedBSD Project.
8 *
9 * This software was developed for the FreeBSD Project in part by McAfee
10 * Research, the Security Research Division of McAfee, Inc. under
11 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA
12 * CHATS research program.

--- 17 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 *
6 * All rights reserved.
7 *
8 * This software was developed by Robert Watson for the TrustedBSD Project.
9 *
10 * This software was developed for the FreeBSD Project in part by McAfee
11 * Research, the Security Research Division of McAfee, Inc. under
12 * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA
13 * CHATS research program.

--- 17 unchanged lines hidden (view full) ---

31 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 * SUCH DAMAGE.
38 *
38 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 180059 2008-06-27 05:39:04Z jhb $
39 * $FreeBSD: head/sys/security/mac_stub/mac_stub.c 182063 2008-08-23 15:26:36Z 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 */

--- 1702 unchanged lines hidden (view full) ---

1749 .mpo_vnode_execve_will_transition = stub_vnode_execve_will_transition,
1750 .mpo_vnode_externalize_label = stub_externalize_label,
1751 .mpo_vnode_init_label = stub_init_label,
1752 .mpo_vnode_internalize_label = stub_internalize_label,
1753 .mpo_vnode_relabel = stub_vnode_relabel,
1754 .mpo_vnode_setlabel_extattr = stub_vnode_setlabel_extattr,
1755};
1756
40 */
41
42/*
43 * Developed by the TrustedBSD Project.
44 *
45 * Stub module that implements a NOOP for most (if not all) MAC Framework
46 * policy entry points.
47 */

--- 1702 unchanged lines hidden (view full) ---

1750 .mpo_vnode_execve_will_transition = stub_vnode_execve_will_transition,
1751 .mpo_vnode_externalize_label = stub_externalize_label,
1752 .mpo_vnode_init_label = stub_init_label,
1753 .mpo_vnode_internalize_label = stub_internalize_label,
1754 .mpo_vnode_relabel = stub_vnode_relabel,
1755 .mpo_vnode_setlabel_extattr = stub_vnode_setlabel_extattr,
1756};
1757
1758#define STUB_OBJECTS (MPC_OBJECT_CRED | \
1759 /* XXX: MPC_OBJECT_PROC | */ \
1760 MPC_OBJECT_VNODE | \
1761 MPC_OBJECT_INPCB | \
1762 MPC_OBJECT_SOCKET | \
1763 MPC_OBJECT_DEVFS | \
1764 MPC_OBJECT_MBUF | \
1765 MPC_OBJECT_IPQ | \
1766 MPC_OBJECT_IFNET | \
1767 MPC_OBJECT_BPFDESC | \
1768 MPC_OBJECT_PIPE | \
1769 MPC_OBJECT_MOUNT | \
1770 MPC_OBJECT_POSIXSEM | \
1771 MPC_OBJECT_POSIXSHM | \
1772 MPC_OBJECT_SYSVMSG | \
1773 MPC_OBJECT_SYSVMSQ | \
1774 MPC_OBJECT_SYSVSEM | \
1775 MPC_OBJECT_SYSVSHM | \
1776 MPC_OBJECT_SYNCACHE)
1777
1757MAC_POLICY_SET(&stub_ops, mac_stub, "TrustedBSD MAC/Stub",
1778MAC_POLICY_SET(&stub_ops, mac_stub, "TrustedBSD MAC/Stub",
1758 MPC_LOADTIME_FLAG_UNLOADOK, NULL);
1779 MPC_LOADTIME_FLAG_UNLOADOK, NULL, STUB_OBJECTS);